Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
[重要] 支持 GUI 界面(beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
4ra1n committed Aug 7, 2024
1 parent 4544e40 commit 2a00845
Show file tree
Hide file tree
Showing 7 changed files with 1,242 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

## 0.1.2

支持了 `GUI` 界面,但没有过多测试,之后逐步完善

解决了目标代码写法存在 `class.getResource("/dir/")` 时得到 `null` 的问题,这是最终打包 `JAR` 部分的代码问题

更新日志:

- [重要] 支持 `GUI` 界面(beta)
- [功能] 字符串替换时处理反射字符串类名
- [功能] 添加对泛型 `signature` 的处理
- [优化] 优化 `builtin` 黑名单解析和注释
Expand Down
27 changes: 27 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<asm.version>9.7</asm.version>
<jcommander.version>1.82</jcommander.version>
<snake.yaml.version>2.2</snake.yaml.version>
<flatlaf.version>3.5</flatlaf.version>
<idea.forms.version>7.0.3</idea.forms.version>
<!-- Maven Build Version -->
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
<maven.resources.version>3.3.1</maven.resources.version>
Expand Down Expand Up @@ -55,6 +57,31 @@
<artifactId>snakeyaml</artifactId>
<version>${snake.yaml.version}</version>
</dependency>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf</artifactId>
<version>${flatlaf.version}</version>
</dependency>
<dependency>
<groupId>com.intellij</groupId>
<artifactId>forms_rt</artifactId>
<version>${idea.forms.version}</version>
<!-- Avoiding Conflicts -->
<exclusions>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm-commons</artifactId>
</exclusion>
<exclusion>
<groupId>asm</groupId>
<artifactId>asm-tree</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/me/n1ar4/jar/obfuscator/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import me.n1ar4.jar.obfuscator.config.Manager;
import me.n1ar4.jar.obfuscator.config.Parser;
import me.n1ar4.jar.obfuscator.core.Runner;
import me.n1ar4.jar.obfuscator.gui.MainForm;
import me.n1ar4.log.LogManager;
import me.n1ar4.log.Logger;

Expand All @@ -29,6 +30,12 @@ public static void main(String[] args) {
commander.usage();
return;
}

if (baseCmd.isGui()){
MainForm.start();
return;
}

if (baseCmd.isCheck()) {
return;
}
Expand Down
10 changes: 10 additions & 0 deletions src/main/java/me/n1ar4/jar/obfuscator/config/BaseCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ public class BaseCmd {
private boolean check;
@Parameter(names = {"-v", "--version"}, description = "version")
private boolean version;
@Parameter(names = {"-gui","--gui"},description = "use GUI")
private boolean gui;

public boolean isGui() {
return gui;
}

public void setGui(boolean gui) {
this.gui = gui;
}

public boolean isVersion() {
return version;
Expand Down
654 changes: 654 additions & 0 deletions src/main/java/me/n1ar4/jar/obfuscator/gui/MainForm.form

Large diffs are not rendered by default.

Loading

0 comments on commit 2a00845

Please sign in to comment.