@@ -148,7 +148,7 @@ launch4j {
148148 mainClassName.set(application.mainClass.get())
149149 copyConfigurable.set(listOf<Any >())
150150 dontWrapJar.set(true )
151- icon.set(" $projectDir /src/main/resources/logos /jadx-logo.ico" )
151+ icon.set(" $projectDir /dist/windows /jadx-logo.ico" )
152152 outfile.set(" jadx-gui-$jadxVersion .exe" )
153153 version.set(jadxVersion)
154154 copyright.set(" Skylot" )
@@ -191,7 +191,8 @@ runtime {
191191 " jdk.accessibility" ,
192192 )
193193 jpackage {
194- if (DefaultNativePlatform .getCurrentOperatingSystem().isMacOsX) {
194+ val os = DefaultNativePlatform .getCurrentOperatingSystem()
195+ if (os.isMacOsX) {
195196 imageName = " jadx-gui"
196197 val fileAssociations =
197198 fileTree(" $projectDir /dist/macos/jpackage-file-associations" ) { include(" *.properties" ) }
@@ -210,10 +211,25 @@ runtime {
210211 installerType = " dmg"
211212 installerName = " jadx-gui"
212213 skipInstaller = false
214+ } else if (os.isWindows) {
215+ // WiX Toolset required, install using: winget install WixToolset.WixToolset
216+ appVersion = if (jadxVersion.matches(Regex (" \\ d+(\\ .\\ d+){0,2}" ))) jadxVersion else " 0.0.1"
217+ imageOptions = listOf (" --icon" , " $projectDir /dist/windows/jadx-logo.ico" )
218+ skipInstaller = false
219+ installerType = " msi"
220+ installerOptions =
221+ listOf (
222+ " --win-menu" ,
223+ " --win-shortcut" ,
224+ " --win-dir-chooser" ,
225+ " --win-upgrade-uuid" ,
226+ " 3d479468-383f-49fc-b374-53f64559dd9b" ,
227+ )
228+ } else if (os.isLinux) {
229+ appVersion = if (jadxVersion.matches(Regex (" \\ d+(\\ .\\ d+){0,2}" ))) jadxVersion else " 0.0.1"
230+ // TODO: setup linux packages, need to include jadx cli
213231 } else {
214- imageOptions = listOf (" --icon" , " $projectDir /src/main/resources/logos/jadx-logo.ico" )
215- skipInstaller = true
216- targetPlatformName = " win"
232+ throw RuntimeException (" Unexpected OS: " + os)
217233 }
218234 }
219235 launcher {
0 commit comments