【fix】打包dmg 正常打开窗口

This commit is contained in:
macbookpro
2025-08-09 14:49:25 +08:00
parent d8285fd074
commit abaea6c2ca
4 changed files with 68 additions and 48 deletions

View File

@@ -58,6 +58,13 @@
<artifactId>wu-framework-queue</artifactId>
<version>1.3.4-JDK24-SNAPSHOT</version>
</dependency>
<!-- log -->
<dependency>
<groupId>top.wu2020</groupId>
<artifactId>wu-framework-log-spring-starter</artifactId>
<version>1.3.4-JDK24-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@@ -68,29 +68,6 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- <plugin>-->
<!-- <groupId>org.graalvm.buildtools</groupId>-->
<!-- <artifactId>native-maven-plugin</artifactId>-->
<!-- <version>0.10.3</version>-->
<!-- <configuration>-->
<!-- &lt;!&ndash; imageName用于设置生成的二进制文件名称 &ndash;&gt;-->
<!-- <imageName>${project.artifactId}</imageName>-->
<!-- &lt;!&ndash; mainClass用于指定main方法类路径 &ndash;&gt;-->
<!-- <mainClass>org.framework.lazy.cloud.network.heartbeat.client.LazyCloudHeartbeatClientStart</mainClass>-->
<!-- <buildArgs>-->
<!-- &#45;&#45;no-fallback-->
<!-- </buildArgs>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>build-native</id>-->
<!-- <goals>-->
<!-- <goal>compile-no-fork</goal>-->
<!-- </goals>-->
<!-- <phase>package</phase>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -152,6 +129,10 @@
<argument>--description</argument>
<argument>${description}</argument>
<argument>--java-options</argument>
<argument>-server -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xms64m -Xmx256m -XX:+UseParallelGC</argument>
</arguments>
</configuration>
</execution>

View File

@@ -54,30 +54,7 @@
<build>
<plugins>
<!-- <plugin>-->
<!-- <groupId>org.graalvm.buildtools</groupId>-->
<!-- <artifactId>native-maven-plugin</artifactId>-->
<!-- <version>0.10.3</version>-->
<!-- <configuration>-->
<!-- &lt;!&ndash; imageName用于设置生成的二进制文件名称 &ndash;&gt;-->
<!-- <imageName>${project.artifactId}</imageName>-->
<!-- &lt;!&ndash; mainClass用于指定main方法类路径 &ndash;&gt;-->
<!-- <mainClass>org.framework.lazy.cloud.network.heartbeat.server.LazyCloudHeartbeatServerStart-->
<!-- </mainClass>-->
<!-- <buildArgs>-->
<!-- &#45;&#45;no-fallback-->
<!-- </buildArgs>-->
<!-- </configuration>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>build-native</id>-->
<!-- <goals>-->
<!-- <goal>compile-no-fork</goal>-->
<!-- </goals>-->
<!-- <phase>package</phase>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -89,6 +66,61 @@
<skip>true</skip>
</configuration>
</plugin>
<!-- 2. 配置jpackage打包脚本通过Maven执行外部命令 -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.1</version>
<executions>
<execution>
<id>jpackage</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<!-- 显示Maven执行详情 -->
<executable>jpackage</executable>
<arguments>
<!-- 增加jpackage详细日志参数 -->
<argument>--verbose</argument>
<argument>--type</argument>
<argument>dmg</argument>
<!-- 根据操作系统动态设置打包类型 -->
<!-- <argument>${os.name.contains("Windows") ? "msi" : (os.name.contains("Mac") ? "dmg" : "deb")}</argument>-->
<argument>--input</argument>
<argument>target</argument>
<argument>--dest</argument>
<argument>target/installer</argument>
<argument>--name</argument>
<argument>wlcn-server</argument>
<argument>--main-jar</argument>
<argument>${project.build.finalName}.jar</argument>
<argument>--main-class</argument>
<argument>org.springframework.boot.loader.launch.JarLauncher</argument>
<argument>--app-version</argument>
<argument>1.3.4</argument>
<argument>--vendor</argument>
<argument>小吴小吴bug全无${os.name}</argument>
<argument>--description</argument>
<argument>${description}</argument>
<argument>--java-options</argument>
<argument>-server -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xms64m -Xmx256m -XX:+UseParallelGC</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@@ -63,6 +63,6 @@ spring:
spring:
lazy:
javafx:
target-url: http://127.0.0.1:6004/netty-client-local-ui/index.html
target-url: http://127.0.0.1:6001/wlcn/index.html
window:
title: wlcn服务端