Skip to content

Commit 2ee0e2e

Browse files
committed
Speed up app startup
1 parent 65bfac6 commit 2ee0e2e

File tree

7 files changed

+21
-12
lines changed

7 files changed

+21
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Zyneon Application ```2024.11 (LibertasFix)``` [Download latest version](https://github.com/danieldieeins/Zyneon-Application/releases/latest)
1+
Zyneon Application ```2024.11(.1) (Optimus)``` [Download latest version](https://github.com/danieldieeins/Zyneon-Application/releases/latest)
22
<br>`Contributions are welcome!`
33

44
Download the Zyneon Application from https://github.com/danieldieeins/Zyneon-Application/releases and https://nexus.zyneonstudios.com/application only! All other sources are not verified and we assume no liability!

application-main/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
</parent>
1212

1313
<artifactId>application</artifactId>
14-
<version>2024.11</version>
15-
<name>LibertasFix (2.1.0)</name>
14+
<version>2024.11.1</version>
15+
<name>Optimus (2.1.1)</name>
1616

1717
<properties>
1818
<maven.compiler.source>21</maven.compiler.source>

application-main/src/deb/updater.jar

37 MB
Binary file not shown.

application-main/src/main/java/com/zyneonstudios/application/main/NexusApplication.java

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,11 +184,10 @@ private boolean updateModules() {
184184
return true;
185185
}
186186
boolean updated = false;
187-
File modules = new File(ApplicationStorage.getApplicationPath() + "temp/modules/");
188-
if (modules.exists()) {
189-
FileActions.deleteFolder(modules);
187+
File modules = new File(ApplicationStorage.getApplicationPath() + "modules/");
188+
if (!modules.exists()) {
189+
logger.dbg("[APP] Created modules path: " + modules.mkdirs());
190190
}
191-
logger.dbg("[APP] Created modules path: " + modules.mkdirs());
192191

193192
if(!ApplicationStorage.isOffline()) {
194193
try {
@@ -243,6 +242,16 @@ private boolean updateModules() {
243242
private void downloadModule(String jsonUrl, File folder, ArrayList<String> blacklist) throws MalformedURLException {
244243
JsonObject module = GsonUtility.getObject(jsonUrl).getAsJsonObject("module");
245244
String id = module.getAsJsonObject("meta").get("id").getAsString();
245+
try {
246+
for(File modules:folder.listFiles()) {
247+
if(!modules.isDirectory()) {
248+
if (modules.getName().equalsIgnoreCase(id + ".jar")) {
249+
System.out.println(modules.getName());
250+
return;
251+
}
252+
}
253+
}
254+
} catch (Exception ignore) {}
246255
if(!blacklist.contains(id)) {
247256
Download download = new Download(id+".jar",new URL(module.getAsJsonObject("meta").get("download").getAsString()), Path.of(folder.getAbsolutePath()+"/"+id+".jar"));
248257
download.start();

bootstrapper/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
<parent>
77
<groupId>com.zyneonstudios.nexus</groupId>
88
<artifactId>application-parent</artifactId>
9-
<version>2024.10.1</version>
9+
<version>2024.11</version>
1010
</parent>
1111

1212
<artifactId>bootstrapper</artifactId>
13-
<version>2024.10.2</version>
13+
<version>2024.11</version>
1414

1515
<properties>
1616
<maven.compiler.source>21</maven.compiler.source>

bootstrapper/src/main/java/com/zyneonstudios/nexus/application/bootstrapper/ApplicationBootstrapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ public class ApplicationBootstrapper {
2929
private static JsonStorage config = null;
3030
public static ApplicationSplash splash = new ApplicationSplash("/updater-logo.png");
3131

32-
public static void main(String[] args) {
32+
public static void main_(String[] args) {
3333
new UpdateWindow().setVisible(true);
3434
}
3535

36-
public static void main_(String[] args) {
36+
public static void main(String[] args) {
3737
splash.setVisible(true);
3838
resolveArguments(args);
3939
if(appFolder == null) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.zyneonstudios.nexus</groupId>
88
<artifactId>application-parent</artifactId>
9-
<version>2024.10.1</version>
9+
<version>2024.11</version>
1010
<packaging>pom</packaging>
1111

1212
<distributionManagement>

0 commit comments

Comments
 (0)