Skip to content

Commit 7a1ab5d

Browse files
committed
script failed from time to time
1 parent 3ba1421 commit 7a1ab5d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Assets/AndroidIl2cppPatchDemo/Editor/AndroidBuilder.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ public static bool BuildIl2cppSoLib()
179179
string gradleMainJarFile = gradleMainJarFiles[0];
180180

181181
StringBuilder allCmd = new StringBuilder();
182-
allCmd.AppendFormat("cd \"{0}\"\n\n", ANDROID_UNITYLIBRARY_PATH);
182+
allCmd.AppendFormat("cd \"{0}\"\n\n", ANDROID_UNITYLIBRARY_PATH);
183+
allCmd.AppendFormat("ping 127.0.0.1 -n 3 > nul\n\n");
183184
allCmd.AppendFormat("call \"{0}\" "
184185
+ " -classpath \"{1}\" org.gradle.launcher.GradleMain \"-Dorg.gradle.jvmargs=-Xmx4096m\" \"BuildIl2CppTask\""
185186
+ GRADLE_PROXY_STRING
@@ -285,7 +286,7 @@ public static bool GenerateBinPatches()
285286

286287
allZipCmds.AppendFormat("cd {0} && {1} -8 \"{2}\" \"{3}\"\n", BUILD_SCRIPTS_PATH, ZIP_PATH, PROJECT_DIR + "/AllAndroidPatchFiles/assets_bin_Data/" + zipFileName, filenameInZip);
287288
}
288-
allZipCmds.Append("sleep 1\n");
289+
allZipCmds.Append("ping 127.0.0.1 -n 1 > nul\n");
289290
allZipCmds.AppendFormat("cd {0} && {1} -9 -r \"{2}\" \"{3}\"\n", patchTopPath, ZIP_PATH, PROJECT_DIR + "/AllAndroidPatchFiles_Versionx.zip", "*");
290291

291292
if (allZipCmds.Length > 0)

0 commit comments

Comments
 (0)