Skip to content

Commit ea32575

Browse files
committed
add build script for 2019_4
1 parent 12adde6 commit ea32575

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

build_demo_apk_2019.4.cmd

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
rem global
2+
SET UnityBin="C:\Program Files\Unity\Hub\Editor\2019.4.2f1\Editor\Unity.exe"
3+
4+
rem prepare build cmd
5+
SET ScriptPath=%~dp0
6+
SET ScriptPath=%ScriptPath:~0,-1%
7+
8+
SET ProjectPath=%ScriptPath%
9+
SET BuildCmd=%UnityBin% -quit -buildTarget android -batchmode -projectPath "%ProjectPath%"
10+
11+
rem ==========================================================================================
12+
rem build 2019_4_version1 patch
13+
rem ==========================================================================================
14+
@echo "start to build 2019_4_version1"
15+
16+
cd %ProjectPath%
17+
git checkout 2019_4_version1
18+
del %ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_version1.zip
19+
%BuildCmd% -executeMethod AndroidBuilder.BuildPatch -logFile build_version1.log
20+
if not exist "%ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_version1.zip" (
21+
echo "Build 2019_4_version1 Failed!"
22+
pause
23+
exit -1
24+
)
25+
26+
rem ==========================================================================================
27+
rem build 2019_4_version2 patch
28+
rem ==========================================================================================
29+
@echo "start to build 2019_4_version2"
30+
31+
cd %ProjectPath%
32+
git checkout 2019_4_version2
33+
del %ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_version2.zip
34+
%BuildCmd% -executeMethod AndroidBuilder.BuildPatch -logFile build_version2.log
35+
if not exist "%ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_version2.zip" (
36+
echo "Build 2019_4_version2 Failed!"
37+
pause
38+
exit -1
39+
)
40+
41+
rem ==========================================================================================
42+
rem build base apk
43+
rem ==========================================================================================
44+
@echo "start to build base version apk"
45+
46+
cd %ProjectPath%
47+
git checkout 2019_4_base
48+
%BuildCmd% -executeMethod AndroidBuilder.BuildWithoutPatch -logFile build_version0.log
49+
if not exist "%ProjectPath%\AndroidGradleProject_v1.0\cn.noodle1983.unitypatchdemo.apk" (
50+
echo "Build Failed! Please Rerun %ProjectPath%\AndroidGradleProject_v1.0\build_apk.bat to check the error."
51+
exit -1
52+
)
53+
54+
copy /Y %ProjectPath%\AndroidGradleProject_v1.0\cn.noodle1983.unitypatchdemo.apk %ScriptPath%\cn.noodle1983.unitypatchdemo.apk
55+
echo "Done!"
56+
exit 0

0 commit comments

Comments
 (0)