mirror of
https://github.com/revanced/Apktool.git
synced 2025-06-12 13:17:43 +02:00
added ability to use --frame-path during install of frameworks
This commit is contained in:
@ -493,8 +493,9 @@ public class Androlib {
|
||||
mAndRes.publicizeResources(arscFile);
|
||||
}
|
||||
|
||||
public void installFramework(File frameFile, String tag)
|
||||
public void installFramework(File frameFile, String tag, String frame_path)
|
||||
throws AndrolibException {
|
||||
mAndRes.setFrameworkFolder(frame_path);
|
||||
mAndRes.installFramework(frameFile, tag);
|
||||
}
|
||||
|
||||
|
@ -648,11 +648,11 @@ final public class AndrolibResources {
|
||||
private File getFrameworkDir() throws AndrolibException {
|
||||
String path;
|
||||
|
||||
/* if a framework path was specified on the command line, use it */
|
||||
// if a framework path was specified on the command line, use it
|
||||
if (sFrameworkFolder != null) {
|
||||
path = sFrameworkFolder;
|
||||
} else if (System.getProperty("os.name").equals("Mac OS X")) {
|
||||
/* store in user-home, for Mac OS X */
|
||||
// store in user-home, for Mac OS X
|
||||
path = System.getProperty("user.home") + File.separatorChar
|
||||
+ "Library/apktool/framework";
|
||||
} else {
|
||||
@ -663,8 +663,7 @@ final public class AndrolibResources {
|
||||
if (!dir.exists()) {
|
||||
if (!dir.mkdirs()) {
|
||||
if (sFrameworkFolder != null) {
|
||||
System.out.println("Can't create Framework directory: "
|
||||
+ dir);
|
||||
System.out.println("Can't create Framework directory: " + dir);
|
||||
}
|
||||
throw new AndrolibException("Can't create directory: " + dir);
|
||||
}
|
||||
@ -680,6 +679,10 @@ final public class AndrolibResources {
|
||||
throw new AndrolibException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
public void setFrameworkFolder(String path) {
|
||||
sFrameworkFolder = path;
|
||||
}
|
||||
|
||||
// TODO: dirty static hack. I have to refactor decoding mechanisms.
|
||||
public static boolean sKeepBroken = false;
|
||||
|
Reference in New Issue
Block a user