Repository navigation
Expand file tree
/
Copy pathBuildWin64.bat
More file actions
80 lines (68 loc) · 2.86 KB
/
Copy pathBuildWin64.bat
File metadata and controls
80 lines (68 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@echo off
setlocal DisableDelayedExpansion
if "%~dp0"=="" exit /b 1
pushd "%~dp0" || exit /b 1
call "%~dp0app_info_setup.bat"
if errorlevel 1 goto failed
cd /d "%~dp0" || goto failed
if not defined APP_NAME goto failed
if not defined UNITY_EXE goto failed
if not defined RT_UTIL goto failed
if not defined RT_PROJECTS goto failed
SET FILENAME=%APP_NAME%
:Actually do the unity build
echo Building project...
if "%~1"=="--editor" (
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\BuildInOpenEditor.ps1"
if errorlevel 1 goto failed
) else (
if not "%~1"=="" goto failed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\CleanBuildOutput.ps1" -Phase Reset
if errorlevel 1 goto failed
%UNITY_EXE% -quit -batchmode -logFile log.txt -executeMethod Win64Builder.BuildRelease -projectPath "%cd%" -activeBuildProfile "Assets/Settings/Build Profiles/ReleaseBuildProfile.asset"
if errorlevel 1 goto failed
)
echo Finished building.
if not exist "build\win\%APP_NAME%.exe" (
echo Error with build!
echo See "%~dp0log.txt" for Unity diagnostics.
goto failed
)
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\BuildScreenCapture.ps1" -Check
if errorlevel 1 goto failed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\ReleasePackage.ps1" -Phase Stage
if errorlevel 1 goto failed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\CleanBuildOutput.ps1" -Phase Package
if errorlevel 1 goto failed
call "%RT_PROJECTS%\Signing\sign.bat" "build/win/%APP_NAME%.exe" "Seth's AI Tools" "rtsoft.com"
if errorlevel 1 goto failed
call "%RT_PROJECTS%\Signing\sign.bat" "build/win/utils/RTClip.exe" "RTClip" "rtsoft.com"
if errorlevel 1 goto failed
call "%RT_PROJECTS%\Signing\sign.bat" "build/win/utils/RTClip.dll" "RTClip" "rtsoft.com"
if errorlevel 1 goto failed
call "%RT_PROJECTS%\Signing\sign.bat" "build/win/utils/ScreenCapture/AIToolsCapture.exe" "AI Tools Screen Recorder" "rtsoft.com"
if errorlevel 1 goto failed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\ReleasePackage.ps1" -Phase Verify
if errorlevel 1 goto failed
:create the archive
set ZIP_FNAME=SethsAIToolsWindows.zip
if exist "%~dp0SethsAIToolsWindows.zip" del /Q "%~dp0SethsAIToolsWindows.zip"
cd /d "%~dp0build" || goto failed
"%RT_UTIL%\7za.exe" a -tzip "%~dp0SethsAIToolsWindows.zip" .\win\
if errorlevel 1 goto failed
cd /d "%~dp0" || goto failed
:Rename the root folder
"%RT_UTIL%\7z.exe" rn "%~dp0SethsAIToolsWindows.zip" win\ aitools_client\
if errorlevel 1 goto failed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\ReleasePackage.ps1" -Phase VerifyArchive
if errorlevel 1 goto failed
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0scripts\SmokeReleaseZip.ps1"
if errorlevel 1 goto failed
if "%NO_PAUSE%"=="" pause
popd
exit /b 0
:failed
echo Build failed. Packaging stopped.
if "%NO_PAUSE%"=="" pause
popd
exit /b 1