Skip to content

Commit 60df18a

Browse files
committed
Adds a Windows wrapper
1 parent aa498a1 commit 60df18a

File tree

10 files changed

+82
-10
lines changed

10 files changed

+82
-10
lines changed

NOTICE

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ Gradle - Apache License 2.0
77
JD-Core Java Release - GPLv3
88
RSyntaxTextArea - Modified BSD license
99

10-
JD-GUI OSX distribution:
10+
JD-GUI Mac OSX distribution:
1111

1212
universalJavaApplicationStub - MIT License
13+
14+
JD-GUI Windows distribution:
15+
16+
Launch4j - MIT License

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,17 @@ generate _"build/libs/jd-gui-x.y.z.jar"_
2222
> gradle build installOsxDist
2323
```
2424
generate _"build/install/jd-gui-osx/JD-GUI.app"_
25+
```
26+
> iexplore http://sourceforge.net/projects/launch4j/files/launch4j-3/3.7/launch4j-3.7-win32.zip/download
27+
> unzip launch4j-3.7-win32.zip
28+
> gradle -DLAUNCH4J_HOME=.../path/to/launch4j-3.7-win32 launch4j installWindowsDist
29+
```
30+
generate _"build/install/jd-gui-windows/jd-gui.exe"_
2531

2632
##How to launch JD-GUI ?
2733
- Double-click on _"jd-gui-x.y.z.jar"_
28-
- Double-click on _"JD-GUI"_ application under OSX
34+
- Double-click on _"JD-GUI"_ application from Mac OSX
35+
- Double-click on _"jd-gui.exe"_ application from Windows
2936
- Execute _"java -jar jd-gui-x.y.z.jar"_ or _"java -classpath jd-gui-x.y.z.jar jd.gui.App"_
3037

3138
##How to use JD-GUI ?
@@ -47,6 +54,7 @@ generate Eclipse project
4754
```
4855
launch JD-GUI with your extensions
4956

50-
##Uninstallation
51-
- Delete "jd-gui-x.y.z.jar" and "jd-gui.cfg".
52-
- Drag and drop "JD-GUI" application into the trash.
57+
##How to uninstall JD-GUI ?
58+
- Java: Delete "jd-gui-x.y.z.jar" and "jd-gui.cfg".
59+
- Mac OSX: Drag and drop "JD-GUI" application into the trash.
60+
- Windows: Delete "jd-gui.exe" and "jd-gui.cfg".

app/src/main/groovy/jd/gui/view/MainDescription.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ actions {
154154
frame(
155155
id:'mainFrame',
156156
title:'Java Decompiler',
157-
iconImage:Toolkit.defaultToolkit.getImage(getClass().classLoader.getResource('images/Icon_java_128.png')),
157+
iconImage:Toolkit.defaultToolkit.getImage(getClass().classLoader.getResource('images/jd_icon_128.png')),
158158
minimumSize:[Constants.MINIMAL_WIDTH, Constants.MINIMAL_HEIGHT],
159159
defaultCloseOperation:WindowConstants.EXIT_ON_CLOSE) {
160160
menuBar {
@@ -248,7 +248,7 @@ dialog(
248248
border:lineBorder(color:Color.BLACK),
249249
background:Color.WHITE) {
250250
borderLayout()
251-
label(icon:imageIcon(resource:'/images/Icon_java_64.png'), border:emptyBorder(15), constraints:BorderLayout.WEST)
251+
label(icon:imageIcon(resource:'/images/jd_icon_64.png'), border:emptyBorder(15), constraints:BorderLayout.WEST)
252252
vbox(border:emptyBorder([15,0,15,15]), constraints:BorderLayout.EAST) {
253253
hbox {
254254
label(text: 'Java Decompiler', font:UIManager.getFont('Label.font').deriveFont(Font.BOLD, 14))
File renamed without changes.
File renamed without changes.
-11.4 KB
Binary file not shown.

build.gradle

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ allprojects {
2929

3030
// 'cleanIdea' task extension //
3131
task fullCleanIdea {
32-
new File(project.name + '.iws').delete()
32+
file(project.name + '.iws').delete()
3333
ant.delete(dir: 'out')
3434
}
3535
fullCleanIdea.mustRunAfter cleanIdea
@@ -42,7 +42,7 @@ subprojects.each { subproject ->
4242
jar {
4343
dependsOn subprojects.tasks['classes']
4444
manifest {
45-
attributes 'Main-Class': 'jd.gui.App', 'SplashScreen-Image': 'images/Icon_java_128.png'
45+
attributes 'Main-Class': 'jd.gui.App', 'SplashScreen-Image': 'images/jd_icon_128.png'
4646
}
4747
def deps = []
4848
subprojects.each { subproject ->
@@ -53,13 +53,42 @@ jar {
5353
from { deps.unique().collect { it.isDirectory() ? it : zipTree(it) } }
5454
}
5555

56+
// Windows wrapper configuration to generate "jd-gui.exe" //
57+
task launch4jConfig(type: Copy) {
58+
from 'src/launch4j/resources/config/launch4j.xml'
59+
into 'build/launch4j'
60+
expand(
61+
JAR_FILE: project.jar.archivePath,
62+
VERSION: project.version,
63+
ICON: file('src/launch4j/resources/images/jd-gui.ico')
64+
)
65+
}
66+
67+
task launch4j(type: Exec, dependsOn: [':jar', ':launch4jConfig']) {
68+
def launch4jCfg = file('build/launch4j/launch4j.xml')
69+
def launch4jExe = System.properties['LAUNCH4J_HOME'] + '/launch4j.exe'
70+
commandLine 'cmd', '/c', launch4jExe, launch4jCfg
71+
doFirst {
72+
if (new File(launch4jExe).exists() == false) {
73+
errorOutput.println "ERROR: 'LAUNCH4J_HOME' not defined or invalid. Launch4j (http://launch4j.sourceforge.net) is required to generare 'jd-gui.exe'."
74+
}
75+
}
76+
}
77+
5678
// Distribution for OSX //
5779
distributions {
5880
osx {
5981
contents {
6082
into('JD-GUI.app/Contents/Resources/Java') {
61-
from { fileTree('build/libs') { include 'jd-gui-*.jar' } }
83+
from jar.archivePath
6284
}
85+
from 'LICENSE', 'NOTICE', 'README.md'
86+
}
87+
}
88+
windows {
89+
contents {
90+
from 'build/launch4j/jd-gui.exe'
91+
from 'LICENSE', 'NOTICE', 'README.md'
6392
}
6493
}
6594
}

services/lib/jd-core-0.7.1.jar

6.17 KB
Binary file not shown.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<launch4jConfig>
3+
<dontWrapJar>false</dontWrapJar>
4+
<headerType>gui</headerType>
5+
<jar>${JAR_FILE}</jar>
6+
<outfile>jd-gui.exe</outfile>
7+
<errTitle>JD-GUI Windows Wrapper</errTitle>
8+
<cmdLine></cmdLine>
9+
<chdir>.</chdir>
10+
<priority>normal</priority>
11+
<downloadUrl>http://java.com/download</downloadUrl>
12+
<supportUrl></supportUrl>
13+
<customProcName>false</customProcName>
14+
<stayAlive>false</stayAlive>
15+
<manifest></manifest>
16+
<icon>${ICON}</icon>
17+
<versionInfo>
18+
<fileVersion>${VERSION}.0</fileVersion>
19+
<txtFileVersion>${VERSION}</txtFileVersion>
20+
<fileDescription>JD-GUI</fileDescription>
21+
<copyright>JD-GUI (C) 2008-2015 Emmanuel Dupuy</copyright>
22+
<productVersion>${VERSION}.0</productVersion>
23+
<txtProductVersion>${VERSION}</txtProductVersion>
24+
<productName>JD-GUI</productName>
25+
<internalName>jd-gui</internalName>
26+
<originalFilename>jd-gui.exe</originalFilename>
27+
</versionInfo>
28+
<jre>
29+
<minVersion>1.7.0</minVersion>
30+
</jre>
31+
</launch4jConfig>
93.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)