@@ -5,14 +5,46 @@ rem prepare build cmd
55SET ScriptPath = %~dp0
66SET ScriptPath = %ScriptPath:~0 ,-1 %
77
8+ SET ProjectPath = %ScriptPath%
9+ SET BuildCmd = %UnityBin% -quit -buildTarget android -batchmode -projectPath " %ProjectPath% "
10+
11+ rem ==========================================================================================
12+ rem build version1 patch
13+ rem ==========================================================================================
14+ @ echo " start to build version1"
15+
16+ cd %ProjectPath%
17+ git checkout version1
18+ del %ProjectPath% \Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version1.zip
19+ %BuildCmd% -executeMethod AndroidBuilder.BuildPatch
20+ if not exist " %ProjectPath% \Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version1.zip" (
21+ echo " Build Version1 Failed!"
22+ pause
23+ exit -1
24+ )
25+
26+ rem ==========================================================================================
27+ rem build version2 patch
28+ rem ==========================================================================================
29+ @ echo " start to build version2"
30+
31+ cd %ProjectPath%
32+ git checkout version2
33+ del %ProjectPath% \Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version2.zip
34+ %BuildCmd% -executeMethod AndroidBuilder.BuildPatch
35+ if not exist " %ProjectPath% \Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version2.zip" (
36+ echo " Build Version2 Failed!"
37+ pause
38+ exit -1
39+ )
40+
841rem ==========================================================================================
942rem build base apk
1043rem ==========================================================================================
1144@ echo " start to build base version apk"
12- SET ProjectPath = %ScriptPath%
13- SET BuildCmd = %UnityBin% -quit -buildTarget android -batchmode -projectPath " %ProjectPath% "
1445
1546cd %ProjectPath%
47+ git checkout master
1648%BuildCmd% -executeMethod AndroidBuilder.BuildWithoutPatch
1749if not exist " %ProjectPath% \AndroidGradleProject\Test\src\main\bin\com.test.test.apk" (
1850 echo " Build Failed! Please Rerun %ProjectPath% \AndroidGradleProject\Test\src\main\build_apk.bat to check the error."
0 commit comments