diff --git a/.appveyor.cmd b/.appveyor.cmd new file mode 100644 index 0000000..8e66851 --- /dev/null +++ b/.appveyor.cmd @@ -0,0 +1,66 @@ +@echo off +call :%* +goto :eof + +:perl_setup +if not defined perl_type set perl_type=strawberry +cinst -y curl +if "%perl_type%" == "cygwin" ( + start /wait c:\cygwin\setup-x86.exe -q -g -P perl -P binutils -P make -P gcc -P gcc-core -P gcc-g++ -P make -P pkg-config -P libcrypt-devel -P openssl-devel -P curl + set "PATH=C:\cygwin\usr\local\bin;C:\cygwin\bin;%PATH%" +) else if "%perl_type%" == "strawberry" ( + if not defined perl_version ( + cinst -y StrawberryPerl + ) else ( + cinst -y StrawberryPerl --version %perl_version% + ) + if errorlevel 1 ( + type C:\ProgramData\chocolatey\logs\chocolatey.log + exit /b 1 + ) + set "PATH=C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;%PATH%" +) else ( + echo.Unknown perl type "%perl_type%"! 1>&2 + exit /b 1 +) +for /f "usebackq delims=" %%d in (`perl -MConfig -e"print $Config{make}"`) do set "make=%%d" +set "perl=perl" +set "cpanm=call .appveyor.cmd cpanm" +set "cpan=%perl% -S cpan" +set TAR_OPTIONS=--warning=no-unknown-keyword +goto :eof + +:cpanm +%perl% -S cpanm >NUL 2>&1 +if ERRORLEVEL 1 ( + curl -V >NUL 2>&1 + if ERRORLEVEL 1 cinst -y curl + curl -k -L https://cpanmin.us/ -o "%TEMP%\cpanm" + %perl% "%TEMP%\cpanm" -n App::cpanminus +) +set "cpanm=%perl% -S cpanm" +%cpanm% %* +goto :eof + +:local_lib +if "%perl_type%" == "cygwin" goto :local_lib_cygwin +%perl% -Ilib -Mlocal::lib=--shelltype=cmd %* > %TEMP%\local-lib.bat +call %TEMP%\local-lib.bat +del %TEMP%\local-lib.bat +goto :eof + +:local_lib_cygwin +for /f "usebackq delims=" %%d in (`sh -c "cygpath -w $HOME/perl5"`) do ( + c:\perl\bin\perl.exe -Ilib -Mlocal::lib - %%d --shelltype=cmd > "%TEMP%\local-lib.bat" +) +setlocal + call "%TEMP%\local-lib.bat" +endlocal & set "PATH=%PATH%" +set "PATH_BACK=%PATH%" +%perl% -Ilib -Mlocal::lib - --shelltype=cmd > "%TEMP%\local-lib.bat" +call "%TEMP%\local-lib.bat" +set "PATH=%PATH_BACK%" +del "%TEMP%\local-lib.bat" +goto :eof + +:eof diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..ced0542 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,42 @@ +version: '{build}' +shallow_clone: true + +matrix: + fast_finish: true + +environment: + matrix: + - perl_type: strawberry + perl_version: 5.30.1.1 + - perl_type: strawberry + perl_version: 5.28.2.1 + - perl_type: strawberry + perl_version: 5.26.3.1 + - perl_type: strawberry + perl_version: 5.24.4.1 + - perl_type: strawberry + perl_version: 5.22.3.1 + - perl_type: strawberry + perl_version: 5.20.3.3 + - perl_type: strawberry + perl_version: 5.18.4.1 + - perl_type: strawberry + perl_version: 5.16.3.20170202 + - perl_type: strawberry + perl_version: 5.14.4.1 + - perl_type: strawberry + perl_version: 5.12.3.20180709 + - perl_type: strawberry + perl_version: 5.10.1.5 + - perl_type: strawberry + perl_version: 5.8.9.5 + +install: + - 'call .appveyor.cmd perl_setup' + - '%perl% -V' + - '%cpanm% --installdeps -n .' + +build: off + +test_script: + - '%cpanm% --test-only -v .' diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..39abf2f --- /dev/null +++ b/.clang-format @@ -0,0 +1,5 @@ +--- +Language: Cpp +BasedOnStyle: Mozilla +IndentWidth: 4 +SortIncludes: false diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..193d7b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,27 @@ +Build +/MANIFEST.SKIP.bak +/MANIFEST.bak +META.YML +MYMETA* +Makefile +Makefile.old +SSL +blib +blib/ +.build/ +_build/ +cover_db/ +/_eumm/ +Win32-NetAdmin-*/ +Win32-NetAdmin-*.tar.gz +.perl-version +pm_to_blib +*.sw* +*.tar.gz +xx* +*.bs +*.o +NetAdmin.cpp +NetAdmin.o +NetAdmin.def +.vscode/ \ No newline at end of file diff --git a/.mailmap b/.mailmap new file mode 100644 index 0000000..d523fd2 --- /dev/null +++ b/.mailmap @@ -0,0 +1,4 @@ +# https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html#_mapping_authors +Chase Whitener +Chase Whitener +Florian Manschwetus manschwetusCS <30724946+manschwetusCS@users.noreply.github.com> diff --git a/.perltidyrc b/.perltidyrc new file mode 100644 index 0000000..b05a78a --- /dev/null +++ b/.perltidyrc @@ -0,0 +1,13 @@ +-pbp # Start with Perl Best Practices +-nst # undo -st from -pbp, to allow for command line use +-w # Show all warnings +-iob # Ignore old breakpoints +-l=80 # 80 characters per line +-mbl=2 # No more than 2 blank lines +-i=4 # Indentation is 4 columns +-ci=4 # Continuation indentation is 4 columns +-vt=0 # Less vertical tightness +-pt=2 # High parenthesis tightness +-bt=2 # High brace tightness +-sbt=2 # High square bracket tightness +-isbc # Don't indent comments without leading space