Browse Source

Updated gitignore and avy/build.bat ;];;];]

Wazakindjes 1 year ago
parent
commit
f86c3589de
2 changed files with 44 additions and 15 deletions
  1. 1 0
      .gitignore
  2. 43 15
      avy/build.bat

+ 1 - 0
.gitignore

@@ -2,3 +2,4 @@
 ._.DS_Store
 .*.swp
 /test
+/appveyor-*.yml

+ 43 - 15
avy/build.bat

@@ -1,7 +1,8 @@
 rem Partially ripped from Syzop's Unreal repo =]]]]
-rem Build script for appveyor
+rem Build script for AppVey0r
 
 rem Initialize Visual Studio variables
+rem Keeping the if for future reference, there's no real need for it atm lol
 if "%TARGET%" == "Visual Studio 2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
 
 rem Installing basic tools lol
@@ -19,10 +20,15 @@ mkdir _dll\u4
 mkdir _dll\uncommon
 mkdir unrealircd-deps
 
-rem Grabbing UnrealIRCD sauce
-wget https://www.unrealircd.org/unrealircd4/unrealircd-4.0.16.tar.gz
-7z e unrealircd-4.0.16.tar.gz && 7z x unrealircd-4.0.16.tar
-ren unrealircd-4.0.16 unrealircd
+rem Grabbing UnrealIRCD sauce y0
+if "%GOTTEMVERSION%" == "git" (
+	git clone -q --branch=unreal40 https://github.com/unrealircd/unrealircd.git c:\projects\unrealircd
+) else (
+	wget https://www.unrealircd.org/unrealircd4/unrealircd-%GOTTEMVERSION%.tar.gz
+	7z e unrealircd-%GOTTEMVERSION%.tar.gz && 7z x unrealircd-%GOTTEMVERSION%.tar
+	rem Rename for good measure imo
+	ren unrealircd-%GOTTEMVERSION% unrealircd
+)
 
 rem Copying module sources (not using br0ken and templates obv fambi)
 cd unrealircd-mods
@@ -35,8 +41,15 @@ xcopy uncommon\*.c \projects\unrealircd\src\modules\third /y
 rem Installing UnrealIRCd dependencies
 cd \projects\unrealircd-deps
 wget https://www.unrealircd.org/files/dev/win/SetACL.exe
-wget https://www.unrealircd.org/files/dev/win/libs/unrealircd-libraries-4.0.16.zip
-unzip unrealircd-libraries-4.0.16.zip
+
+rem Different format for git builds ;];]
+if "%GOTTEMVERSION%" == "git" (
+	wget https://www.unrealircd.org/files/dev/win/libs/unrealircd-libraries-devel.zip
+	unzip unrealircd-libraries-devel.zip
+) else (
+	wget https://www.unrealircd.org/files/dev/win/libs/unrealircd-libraries-%GOTTEMVERSION%.zip
+	unzip unrealircd-libraries-%GOTTEMVERSION%.zip
+)
 
 rem Now the actual build
 cd \projects\unrealircd
@@ -52,18 +65,33 @@ rem And we re-run the exact same command:
 call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat
 if %ERRORLEVEL% NEQ 0 EXIT /B 1
 
-rem Now compile all mods broski
-call \projects\unrealircd-mods\avy\%SHORTNAME%.bat
-if %ERRORLEVEL% NEQ 0 EXIT /B 1
+rem Now need to patch the Unreal repo's build script for 4.0.16 only as it has been modified later on =]
+rem Dirty regex to not break muh Sublime's syntax highlighting nor actual functionality xdxd
+if "%GOTTEMVERSION%" == "4.0.16" sed -i "s/\(PCRE2LIB.*\.lib[\"\"] *$\)/\1 %1 %2/" extras\build-tests\windows\compilecmd\%SHORTNAME%.bat
+
+rem Now compile all mods broski, we can do this with Unreal's own build skrip thanks to Syzop ;];]
+set BAILEM=0
+for /R "src\modules\third" %%f in (*.c) do (
+	call extras\build-tests\windows\compilecmd\%SHORTNAME%.bat CUSTOMMODULE MODULEFILE=%%~nf
+	if %ERRORLEVEL% NEQ 0 (
+		set BAILEM=%ERRORLEVEL%
+	) else (
+		if exist \projects\unrealircd-mods\malv\%%~nf.c xcopy src\modules\third\%%~nf.dll \projects\_dll\malv /y
+		if exist \projects\unrealircd-mods\spec\%%~nf.c xcopy src\modules\third\%%~nf.dll \projects\_dll\spec /y
+		if exist \projects\unrealircd-mods\u4\%%~nf.c xcopy src\modules\third\%%~nf.dll \projects\_dll\u4 /y
+		if exist \projects\unrealircd-mods\uncommon\%%~nf.c xcopy src\modules\third\%%~nf.dll \projects\_dll\uncommon /y
+	)
+)
+if %BAILEM% NEQ 0 EXIT /B 1
 
 rem Zip em up and show some proof
 cd \projects\_dll
-7z a -xr!*.zip -r unrealircd-mods-4.0.16.zip *
-dir unrealircd-mods-4.0.16.zip
-sha256sum unrealircd-mods-4.0.16.zip
+7z a -xr!*.zip -r unrealircd-mods-%GOTTEMVERSION%.zip *
+dir unrealircd-mods-%GOTTEMVERSION%.zip
+sha256sum unrealircd-mods-%GOTTEMVERSION%.zip
 
 rem Upload artifact
-mv unrealircd-mods-4.0.16.zip \projects\unrealircd-mods
+mv unrealircd-mods-%GOTTEMVERSION%.zip \projects\unrealircd-mods
 cd \projects\unrealircd-mods
-appveyor PushArtifact unrealircd-mods-4.0.16.zip
+appveyor PushArtifact unrealircd-mods-%GOTTEMVERSION%.zip
 if %ERRORLEVEL% NEQ 0 EXIT /B 1