Skip to content

Commit 7953d9a

Browse files
committed
add build all command
1 parent 6174ef0 commit 7953d9a

File tree

3 files changed

+52
-2
lines changed

3 files changed

+52
-2
lines changed

Assets/AndroidIl2cppPatchDemo/PrebuiltPatches/AllAndroidPatchFiles_Version1.zip.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/AndroidIl2cppPatchDemo/PrebuiltPatches/AllAndroidPatchFiles_Version2.zip.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build_demo_apk.cmd

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,46 @@ rem prepare build cmd
55
SET ScriptPath=%~dp0
66
SET 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+
841
rem ==========================================================================================
942
rem build base apk
1043
rem ==========================================================================================
1144
@echo "start to build base version apk"
12-
SET ProjectPath=%ScriptPath%
13-
SET BuildCmd=%UnityBin% -quit -buildTarget android -batchmode -projectPath "%ProjectPath%"
1445

1546
cd %ProjectPath%
47+
git checkout master
1648
%BuildCmd% -executeMethod AndroidBuilder.BuildWithoutPatch
1749
if 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

Comments
 (0)