unrealircd- supernets unrealircd source & configuration |
git clone git://git.acid.vegas/unrealircd.git |
Log | Files | Refs | Archive | README | LICENSE |
build.bat (3859B)
1 echo on 2 3 rem Temporarily hardcoded: 4 set TARGET=Visual Studio 2019 5 set SHORTNAME=vs2019 6 7 rem Initialize Visual Studio variables 8 if "%TARGET%" == "Visual Studio 2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" 9 if "%TARGET%" == "Visual Studio 2019" call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" 10 11 rem Installing tools 12 rem only for appveyor: 13 rem cinst unrar -y 14 rem cinst unzip -y 15 rem cinst innosetup -y 16 17 rem Installing UnrealIRCd dependencies 18 cd \projects 19 mkdir unrealircd-6-libs 20 cd unrealircd-6-libs 21 curl -fsS -o unrealircd-libraries-6-devel.zip https://www.unrealircd.org/files/dev/win/libs/unrealircd-libraries-6-devel.zip 22 unzip unrealircd-libraries-6-devel.zip 23 copy dlltool.exe \users\user\worker\unreal6-w10\build /y 24 25 rem for appveyor, use: cd \projects\unrealircd 26 cd \users\user\worker\unreal6-w10\build 27 28 rem Install 'unrealircd-tests' 29 cd .. 30 rd /q/s unrealircd-tests 31 git clone -q --branch unreal60 https://github.com/unrealircd/unrealircd-tests.git unrealircd-tests 32 if %ERRORLEVEL% NEQ 0 EXIT /B 1 33 cd build 34 35 rem Now the actual build 36 rem - First this, otherwise JOM will fail 37 IF NOT EXIST src\version.c nmake -f Makefile.windows CONF 38 rem - Then build most of UnrealIRCd.exe etc 39 call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat UNREALSVC.EXE UnrealIRCd.exe unrealircdctl.exe 40 rem - It will fail due to missing symbolfile, which we create here.. 41 nmake -f makefile.windows SYMBOLFILE 42 rem - Then we finalize building UnrealIRCd.exe: should be no error 43 call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat UNREALSVC.EXE UnrealIRCd.exe unrealircdctl.exe 44 if %ERRORLEVEL% NEQ 0 EXIT /B 1 45 rem - Build all the modules (DLL files): should be no error 46 call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat MODULES 47 if %ERRORLEVEL% NEQ 0 EXIT /B 1 48 49 rem Compile dependencies for unrealircd-tests -- this doesn't belong here though.. 50 copy ..\unrealircd-tests\serverconfig\unrealircd\modules\fakereputation.c src\modules\third /Y 51 call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat CUSTOMMODULE MODULEFILE=fakereputation 52 if %ERRORLEVEL% NEQ 0 EXIT /B 1 53 54 rem Convert c:\dev to c:\projects\unrealircd-6-libs 55 rem TODO: should use environment variable in innosetup script? 56 sed -i "s/c:\\dev\\unrealircd-6-libs/c:\\projects\\unrealircd-6-libs/gi" src\windows\unrealinst.iss 57 58 rem Build installer file 59 "c:\Program Files (x86)\Inno Setup 5\iscc.exe" /Q- src\windows\unrealinst.iss 60 if %ERRORLEVEL% NEQ 0 EXIT /B 1 61 62 rem Show some proof 63 ren mysetup.exe unrealircd-dev-build.exe 64 dir unrealircd-dev-build.exe 65 sha256sum unrealircd-dev-build.exe 66 67 rem Kill any old instances, just to be sure 68 taskkill -im unrealircd.exe -f 69 sleep 2 70 rem Just a safety measure so we don't end up testing 71 rem some old version... 72 del "C:\Program Files\UnrealIRCd 6\bin\unrealircd.exe" 73 74 echo Running installer... 75 start /WAIT unrealircd-dev-build.exe /VERYSILENT /LOG=setup.log 76 if %ERRORLEVEL% NEQ 0 goto installerfailed 77 78 rem Upload artifact 79 rem appveyor PushArtifact unrealircd-dev-build.exe 80 rem if %ERRORLEVEL% NEQ 0 EXIT /B 1 81 82 cd ..\unrealircd-tests 83 dir 84 85 rem All tests except db: 86 "C:\Program Files\Git\bin\bash.exe" ./runwin 87 if %ERRORLEVEL% NEQ 0 EXIT /B 1 88 89 rem Test unencrypted db's: 90 "C:\Program Files\Git\bin\bash.exe" ./runwin -boot tests/db/writing/* 91 if %ERRORLEVEL% NEQ 0 EXIT /B 1 92 "C:\Program Files\Git\bin\bash.exe" ./runwin -keepdbs -boot tests/db/reading/* 93 if %ERRORLEVEL% NEQ 0 EXIT /B 1 94 95 rem Test encrypted db's: 96 "C:\Program Files\Git\bin\bash.exe" ./runwin -include db_crypted.conf -boot tests/db/writing/* 97 if %ERRORLEVEL% NEQ 0 EXIT /B 1 98 "C:\Program Files\Git\bin\bash.exe" ./runwin -include db_crypted.conf -keepdbs -boot tests/db/reading/* 99 if %ERRORLEVEL% NEQ 0 EXIT /B 1 100 101 goto end 102 103 104 105 :installerfailed 106 type setup.log 107 echo INSTALLATION FAILED 108 EXIT /B 1 109 110 :end