Skip to content

Commit

Permalink
Adds a Windows wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed Apr 25, 2015
1 parent aa498a1 commit 60df18a
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 10 deletions.
6 changes: 5 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Gradle - Apache License 2.0
JD-Core Java Release - GPLv3
RSyntaxTextArea - Modified BSD license

JD-GUI OSX distribution:
JD-GUI Mac OSX distribution:

universalJavaApplicationStub - MIT License

JD-GUI Windows distribution:

Launch4j - MIT License
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,17 @@ generate _"build/libs/jd-gui-x.y.z.jar"_
> gradle build installOsxDist
```
generate _"build/install/jd-gui-osx/JD-GUI.app"_
```
> iexplore http://sourceforge.net/projects/launch4j/files/launch4j-3/3.7/launch4j-3.7-win32.zip/download
> unzip launch4j-3.7-win32.zip
> gradle -DLAUNCH4J_HOME=.../path/to/launch4j-3.7-win32 launch4j installWindowsDist
```
generate _"build/install/jd-gui-windows/jd-gui.exe"_

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

##How to use JD-GUI ?
Expand All @@ -47,6 +54,7 @@ generate Eclipse project
```
launch JD-GUI with your extensions

##Uninstallation
- Delete "jd-gui-x.y.z.jar" and "jd-gui.cfg".
- Drag and drop "JD-GUI" application into the trash.
##How to uninstall JD-GUI ?
- Java: Delete "jd-gui-x.y.z.jar" and "jd-gui.cfg".
- Mac OSX: Drag and drop "JD-GUI" application into the trash.
- Windows: Delete "jd-gui.exe" and "jd-gui.cfg".
4 changes: 2 additions & 2 deletions app/src/main/groovy/jd/gui/view/MainDescription.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ actions {
frame(
id:'mainFrame',
title:'Java Decompiler',
iconImage:Toolkit.defaultToolkit.getImage(getClass().classLoader.getResource('images/Icon_java_128.png')),
iconImage:Toolkit.defaultToolkit.getImage(getClass().classLoader.getResource('images/jd_icon_128.png')),
minimumSize:[Constants.MINIMAL_WIDTH, Constants.MINIMAL_HEIGHT],
defaultCloseOperation:WindowConstants.EXIT_ON_CLOSE) {
menuBar {
Expand Down Expand Up @@ -248,7 +248,7 @@ dialog(
border:lineBorder(color:Color.BLACK),
background:Color.WHITE) {
borderLayout()
label(icon:imageIcon(resource:'/images/Icon_java_64.png'), border:emptyBorder(15), constraints:BorderLayout.WEST)
label(icon:imageIcon(resource:'/images/jd_icon_64.png'), border:emptyBorder(15), constraints:BorderLayout.WEST)
vbox(border:emptyBorder([15,0,15,15]), constraints:BorderLayout.EAST) {
hbox {
label(text: 'Java Decompiler', font:UIManager.getFont('Label.font').deriveFont(Font.BOLD, 14))
Expand Down
Binary file removed app/src/main/resources/images/splash.gif
Binary file not shown.
35 changes: 32 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ allprojects {

// 'cleanIdea' task extension //
task fullCleanIdea {
new File(project.name + '.iws').delete()
file(project.name + '.iws').delete()
ant.delete(dir: 'out')
}
fullCleanIdea.mustRunAfter cleanIdea
Expand All @@ -42,7 +42,7 @@ subprojects.each { subproject ->
jar {
dependsOn subprojects.tasks['classes']
manifest {
attributes 'Main-Class': 'jd.gui.App', 'SplashScreen-Image': 'images/Icon_java_128.png'
attributes 'Main-Class': 'jd.gui.App', 'SplashScreen-Image': 'images/jd_icon_128.png'
}
def deps = []
subprojects.each { subproject ->
Expand All @@ -53,13 +53,42 @@ jar {
from { deps.unique().collect { it.isDirectory() ? it : zipTree(it) } }
}

// Windows wrapper configuration to generate "jd-gui.exe" //
task launch4jConfig(type: Copy) {
from 'src/launch4j/resources/config/launch4j.xml'
into 'build/launch4j'
expand(
JAR_FILE: project.jar.archivePath,
VERSION: project.version,
ICON: file('src/launch4j/resources/images/jd-gui.ico')
)
}

task launch4j(type: Exec, dependsOn: [':jar', ':launch4jConfig']) {
def launch4jCfg = file('build/launch4j/launch4j.xml')
def launch4jExe = System.properties['LAUNCH4J_HOME'] + '/launch4j.exe'
commandLine 'cmd', '/c', launch4jExe, launch4jCfg
doFirst {
if (new File(launch4jExe).exists() == false) {
errorOutput.println "ERROR: 'LAUNCH4J_HOME' not defined or invalid. Launch4j (http://launch4j.sourceforge.net) is required to generare 'jd-gui.exe'."
}
}
}

// Distribution for OSX //
distributions {
osx {
contents {
into('JD-GUI.app/Contents/Resources/Java') {
from { fileTree('build/libs') { include 'jd-gui-*.jar' } }
from jar.archivePath
}
from 'LICENSE', 'NOTICE', 'README.md'
}
}
windows {
contents {
from 'build/launch4j/jd-gui.exe'
from 'LICENSE', 'NOTICE', 'README.md'
}
}
}
Binary file modified services/lib/jd-core-0.7.1.jar
Binary file not shown.
31 changes: 31 additions & 0 deletions src/launch4j/resources/config/launch4j.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>${JAR_FILE}</jar>
<outfile>jd-gui.exe</outfile>
<errTitle>JD-GUI Windows Wrapper</errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl></supportUrl>
<customProcName>false</customProcName>
<stayAlive>false</stayAlive>
<manifest></manifest>
<icon>${ICON}</icon>
<versionInfo>
<fileVersion>${VERSION}.0</fileVersion>
<txtFileVersion>${VERSION}</txtFileVersion>
<fileDescription>JD-GUI</fileDescription>
<copyright>JD-GUI (C) 2008-2015 Emmanuel Dupuy</copyright>
<productVersion>${VERSION}.0</productVersion>
<txtProductVersion>${VERSION}</txtProductVersion>
<productName>JD-GUI</productName>
<internalName>jd-gui</internalName>
<originalFilename>jd-gui.exe</originalFilename>
</versionInfo>
<jre>
<minVersion>1.7.0</minVersion>
</jre>
</launch4jConfig>
Binary file added src/launch4j/resources/images/jd-gui.ico
Binary file not shown.

0 comments on commit 60df18a

Please sign in to comment.