@@ -88,39 +88,17 @@ jobs:
8888 $JAR_NAME = $jarFile.Name
8989 $APP_VERSION = ($jarFile.BaseName -replace 'desktop-client-', '') -replace '-SNAPSHOT', '' -replace '-.*', ''
9090 if ($APP_VERSION -notmatch "\.") { $APP_VERSION = "$APP_VERSION.0" }
91- $ICON_ARG = ""
91+ $iconArgs = @()
9292 if (Test-Path "src\main\resources\icons\app-icon.ico") {
93- $ICON_ARG = "--icon src\main\resources\icons\app-icon.ico"
93+ $iconArgs = @( "--icon", " src\main\resources\icons\app-icon.ico")
9494 }
95- jpackage --input target `
96- --name "JSTutor" `
97- --main-jar $JAR_NAME `
98- --main-class com.posadskiy.javaswingtutor.Start `
99- --type exe `
100- --dest X:\d `
101- --temp C:\t `
102- --app-version $APP_VERSION `
103- --vendor Posadskiy `
104- --java-options "-Dfile.encoding=UTF-8" `
105- --win-dir-chooser `
106- --win-menu `
107- --win-menu-group JSTutor `
108- --win-shortcut `
109- $ICON_ARG
110- jpackage --input target `
111- --name "JSTutor" `
112- --main-jar $JAR_NAME `
113- --main-class com.posadskiy.javaswingtutor.Start `
114- --type app-image `
115- --dest X:\d `
116- --temp C:\t `
117- --app-version $APP_VERSION `
118- --vendor Posadskiy `
119- --java-options "-Dfile.encoding=UTF-8" `
120- $ICON_ARG
95+ jpackage --input target --name "JSTutor" --main-jar $JAR_NAME --main-class com.posadskiy.javaswingtutor.Start --type exe --dest X:\d --temp C:\t --app-version $APP_VERSION --vendor Posadskiy --java-options "-Dfile.encoding=UTF-8" --win-dir-chooser --win-menu --win-menu-group JSTutor --win-shortcut @iconArgs
96+ jpackage --input target --name "JSTutor" --main-jar $JAR_NAME --main-class com.posadskiy.javaswingtutor.Start --type app-image --dest X:\d --temp C:\t --app-version $APP_VERSION --vendor Posadskiy --java-options "-Dfile.encoding=UTF-8" @iconArgs
12197 if (Test-Path "X:\d\JSTutor") {
12298 Compress-Archive -Path "X:\d\JSTutor" -DestinationPath ("X:\d\JSTutor-win-${APP_VERSION}.zip") -Force
12399 }
100+ New-Item -ItemType Directory -Force -Path "$env:GITHUB_WORKSPACE\windows-installer-out" | Out-Null
101+ Copy-Item -Path "X:\d\*" -Destination "$env:GITHUB_WORKSPACE\windows-installer-out" -Recurse -Force
124102 subst X: /d
125103
126104 - name : Build installers and portable app image (Linux)
@@ -172,8 +150,7 @@ jobs:
172150 desktop-client/target/jpackage/*.dmg
173151 desktop-client/target/jpackage/*.deb
174152 desktop-client/target/jpackage/*app-image*.zip
175- d/*.exe
176- d/*.zip
153+ windows-installer-out/
177154 retention-days : 30
178155
179156 bundle :
0 commit comments