diff --git a/build.gradle b/build.gradle index d060c7a30237119a1ce6a21dd0652b10072d878e..08ba5f616ad71aa37aa49df07c0161bf41072008 100644 --- a/build.gradle +++ b/build.gradle @@ -156,6 +156,16 @@ task dist(dependsOn: [pack, copyExe]) { description = 'Build jadx distribution zip' } +task distWin(type: Copy, dependsOn: 'jadx-gui:distWinWithJre') { + group 'jadx' + description = 'Copy bundle to build dir' + destinationDir buildDir + from(tasks.getByPath('jadx-gui:distWinWithJre').outputs) { + include '*.zip' + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE +} + task samples(dependsOn: 'jadx-samples:samples') { group 'jadx' } diff --git a/jadx-gui/build.gradle b/jadx-gui/build.gradle index 11aa53856a26e2a1038766025d021e6e6dc6a384..d741e87930610050f2714b0874ae452bb4d9be50 100644 --- a/jadx-gui/build.gradle +++ b/jadx-gui/build.gradle @@ -1,7 +1,8 @@ plugins { id 'application' - id 'edu.sc.seis.launch4j' version '2.4.8' - id 'com.github.johnrengelman.shadow' version '6.0.0' + id 'edu.sc.seis.launch4j' version '2.4.9' + id 'com.github.johnrengelman.shadow' version '6.1.0' + id 'org.beryx.runtime' version '1.11.4' } dependencies { @@ -71,15 +72,47 @@ launch4j { copyright = 'Skylot' windowTitle = 'jadx' companyName = 'jadx' - jreMinVersion = '1.8.0' + jreMinVersion = '11' jvmOptions = ['-Dawt.useSystemAAFontSettings=lcd', '-Dswing.aatext=true', '-XX:+UseG1GC'] jreRuntimeBits = "64" bundledJre64Bit = true initialHeapPercent = 5 maxHeapSize = 4096 maxHeapPercent = 70 - downloadUrl = 'https://adoptopenjdk.net/releases.html?variant=openjdk11&jvmVariant=hotspot#x64_win' - bundledJrePath = '%JAVA_HOME%' + downloadUrl = 'https://adoptopenjdk.net/releases.html?variant=openjdk14&jvmVariant=hotspot#x64_win' +// bundledJrePath = '%JAVA_HOME%' + bundledJrePath = '%EXEDIR%/jre' // TODO: merge java search paths +} + +runtime { + addOptions('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages') + addModules( + 'java.desktop', + 'java.naming', + 'java.sql', // TODO: GSON register adapter for java.sql.Time + 'java.xml', + ) + jpackage { + imageOptions = ['--icon', "${projectDir}/src/main/resources/logos/jadx-logo.ico"] + skipInstaller = true + } + launcher{ + noConsole = true + } +} + +task distWinWithJre(type: Zip, dependsOn: ['runtime', 'createExe']) { + group 'jadx' + destinationDirectory = buildDir + archiveFileName = "jadx-gui-${jadxVersion}-with-jre-win.zip" + from(runtime.jreDir) { + include '**/*' + into 'jre' + } + from(createExe.outputs){ + include '*.exe' + } + duplicatesStrategy = DuplicatesStrategy.EXCLUDE } test {