Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add helper files to the dist. #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions .appveyor.cmd
Original file line number Diff line number Diff line change
@@ -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
42 changes: 42 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -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 .'
5 changes: 5 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
Language: Cpp
BasedOnStyle: Mozilla
IndentWidth: 4
SortIncludes: false
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -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/
4 changes: 4 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# https://www.kernel.org/pub/software/scm/git/docs/git-shortlog.html#_mapping_authors
Chase Whitener <[email protected]> <[email protected]>
Chase Whitener <[email protected]> <[email protected]>
Florian Manschwetus <[email protected]> manschwetusCS <[email protected]>
13 changes: 13 additions & 0 deletions .perltidyrc
Original file line number Diff line number Diff line change
@@ -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