mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-15 11:00:09 -07:00
[Forge installer] bug fixes
This commit is contained in:
parent
79ae41a651
commit
7a148a58d5
2 changed files with 4 additions and 1 deletions
|
|
@ -108,6 +108,8 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void doCustomInstall(File modFile, String javaArgs) throws IOException {
|
private void doCustomInstall(File modFile, String javaArgs) throws IOException {
|
||||||
|
isLogAllow = true;
|
||||||
|
|
||||||
// Attempt to detects some mod installers
|
// Attempt to detects some mod installers
|
||||||
BaseInstaller installer = new BaseInstaller();
|
BaseInstaller installer = new BaseInstaller();
|
||||||
installer.setInput(modFile);
|
installer.setInput(modFile);
|
||||||
|
|
@ -116,6 +118,7 @@ public class JavaGUILauncherActivity extends LoggableActivity {
|
||||||
appendlnToLog("Detected Forge installer!");
|
appendlnToLog("Detected Forge installer!");
|
||||||
new ForgeInstaller(installer).install(this);
|
new ForgeInstaller(installer).install(this);
|
||||||
} else {
|
} else {
|
||||||
|
isLogAllow = false;
|
||||||
mIsCustomInstall = false;
|
mIsCustomInstall = false;
|
||||||
launchJavaRuntime(modFile, javaArgs);
|
launchJavaRuntime(modFile, javaArgs);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ public class ForgeInstaller extends BaseInstaller {
|
||||||
String[] libInfos = profile.install.path.split(":");
|
String[] libInfos = profile.install.path.split(":");
|
||||||
File libraryFile = new File(Tools.libraries, Tools.artifactToPath(libInfos[0], libInfos[1], libInfos[2]));
|
File libraryFile = new File(Tools.libraries, Tools.artifactToPath(libInfos[0], libInfos[1], libInfos[2]));
|
||||||
libraryFile.mkdirs();
|
libraryFile.mkdirs();
|
||||||
target = libraryFile.getAbsolutePath() + "/" + profile.install.filePath.replace("-universal", "");
|
target = libraryFile.getAbsolutePath().replace("-universal", "");
|
||||||
ctx.appendlnToLog("Writing " + target);
|
ctx.appendlnToLog("Writing " + target);
|
||||||
FileOutputStream out = new FileOutputStream(target);
|
FileOutputStream out = new FileOutputStream(target);
|
||||||
IOUtils.copy(mJarFile.getInputStream(mJarFile.getEntry(profile.install.filePath)), out);
|
IOUtils.copy(mJarFile.getInputStream(mJarFile.getEntry(profile.install.filePath)), out);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue