Skip to content

Commit

Permalink
add build all command
Browse files Browse the repository at this point in the history
  • Loading branch information
noodle1983 committed Nov 28, 2018
1 parent 6174ef0 commit 7953d9a
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 2 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 34 additions & 2 deletions build_demo_apk.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,46 @@ rem prepare build cmd
SET ScriptPath=%~dp0
SET ScriptPath=%ScriptPath:~0,-1%

SET ProjectPath=%ScriptPath%
SET BuildCmd=%UnityBin% -quit -buildTarget android -batchmode -projectPath "%ProjectPath%"

rem ==========================================================================================
rem build version1 patch
rem ==========================================================================================
@echo "start to build version1"

cd %ProjectPath%
git checkout version1
del %ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version1.zip
%BuildCmd% -executeMethod AndroidBuilder.BuildPatch
if not exist "%ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version1.zip" (
echo "Build Version1 Failed!"
pause
exit -1
)

rem ==========================================================================================
rem build version2 patch
rem ==========================================================================================
@echo "start to build version2"

cd %ProjectPath%
git checkout version2
del %ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version2.zip
%BuildCmd% -executeMethod AndroidBuilder.BuildPatch
if not exist "%ProjectPath%\Assets\AndroidIl2cppPatchDemo\PrebuiltPatches\AllAndroidPatchFiles_Version2.zip" (
echo "Build Version2 Failed!"
pause
exit -1
)

rem ==========================================================================================
rem build base apk
rem ==========================================================================================
@echo "start to build base version apk"
SET ProjectPath=%ScriptPath%
SET BuildCmd=%UnityBin% -quit -buildTarget android -batchmode -projectPath "%ProjectPath%"

cd %ProjectPath%
git checkout master
%BuildCmd% -executeMethod AndroidBuilder.BuildWithoutPatch
if not exist "%ProjectPath%\AndroidGradleProject\Test\src\main\bin\com.test.test.apk" (
echo "Build Failed! Please Rerun %ProjectPath%\AndroidGradleProject\Test\src\main\build_apk.bat to check the error."
Expand Down

0 comments on commit 7953d9a

Please sign in to comment.