Skip to content

Commit 94dc954

Browse files
committed
generate removal test file
1 parent 0874ae0 commit 94dc954

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

Assets/AndroidIl2cppPatchDemo/Editor/AndroidBuilder.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,15 @@ public static bool PatchAndroidProject()
192192
@"Boostrap.InitNativeLibBeforeUnityPlay(getApplication().getApplicationContext().getFilesDir().getPath());
193193
mUnityPlayer = new UnityPlayer(this);");
194194
File.WriteAllText(javaEntranceFile, allJavaText);
195+
196+
// generate removal test file
197+
string assetBinDataPath = EXPORTED_ASSETS_PATH + "/bin/Data/";
198+
string uselessFile1 = assetBinDataPath + "to_be_removed1.txt";
199+
File.WriteAllText(uselessFile1, "useless1");
200+
201+
string uselessFile2 = assetBinDataPath + "to_be_removed2.txt";
202+
File.WriteAllText(uselessFile2, "useless2");
203+
195204
return true;
196205
}
197206

build_demo_apk_2018.cmd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
rem global
2-
SET UnityBin="C:\Program Files\Unity2018.4.4f1\Editor\Unity.exe"
2+
SET UnityBin="C:\Program Files\Unity\Hub\Editor\2018.4.29f1\Editor\Unity.exe"
33

44
rem prepare build cmd
55
SET ScriptPath=%~dp0
@@ -46,11 +46,11 @@ rem ============================================================================
4646
cd %ProjectPath%
4747
git checkout master
4848
%BuildCmd% -executeMethod AndroidBuilder.BuildWithoutPatch -logFile build_version0.log
49-
if not exist "%ProjectPath%\AndroidGradleProject\Test\src\main\bin\com.test.test.apk" (
50-
echo "Build Failed! Please Rerun %ProjectPath%\AndroidGradleProject\Test\src\main\build_apk.bat to check the error."
49+
if not exist "%ProjectPath%\AndroidGradleProject_v1.0\Test\src\main\bin\com.test.test.apk" (
50+
echo "Build Failed! Please Rerun %ProjectPath%\AndroidGradleProject_v1.0\Test\src\main\build_apk.bat to check the error."
5151
exit -1
5252
)
5353

54-
copy /Y %ProjectPath%\AndroidGradleProject\Test\src\main\bin\com.test.test.apk %ScriptPath%\Il2cppDemo_com.test.test.apk
54+
copy /Y %ProjectPath%\AndroidGradleProject_v1.0\Test\src\main\bin\com.test.test.apk %ScriptPath%\Il2cppDemo_com.test.test.apk
5555
echo "Done!"
5656
exit 0

0 commit comments

Comments
 (0)