Skip to content

Commit

Permalink
Added Linux installer Support
Browse files Browse the repository at this point in the history
  • Loading branch information
PuspenduBanerjee committed Jun 22, 2015
1 parent ca4da6b commit 836d1ba
Show file tree
Hide file tree
Showing 4 changed files with 326 additions and 0 deletions.
48 changes: 48 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
buildscript {
repositories {
jcenter()
}

dependencies {
classpath 'com.netflix.nebula:gradle-ospackage-plugin:2.2.6'
classpath 'org.spockframework:spock-core:1.0-groovy-2.3'

}
}

apply plugin: 'java'
apply plugin: 'distribution'
apply plugin: "nebula.os-package"




// Common configuration //
allprojects {
Expand Down Expand Up @@ -28,8 +44,10 @@ allprojects {
provided
compile.extendsFrom provided
}

}


// 'cleanIdea' task extension //
cleanIdea {
file(project.name + '.iws').delete()
Expand Down Expand Up @@ -140,10 +158,40 @@ distributions {
}
}

ospackage {
packageName = project.name
description = 'A Java Decompoler '
version = '0.0.1'
release = 1
os = LINUX
url = 'https://github.com/java-decompiler/jd-gui'
license = file('LICENSE')

into '/opt/'+ project.name
from ('build/libs/'){
fileMode = 0755
}
from ('src/linux/resources/'){
fileMode = 0755
}
from ('app/src/main/resources/images/jd_icon_128.png'){
fileMode = 0755
}
from 'LICENSE', 'NOTICE', 'README.md'



postInstall 'cd /opt/'+ project.name+'; ln -s ./jd-gui-'+project.version+'.jar ./jd-gui.jar; xdg-icon-resource install --size 128 --novendor ./jd_icon_128.png jd-gui ; xdg-desktop-menu install ./*.desktop'
preUninstall 'cd /opt/'+ project.name+'; rm -f ./jd-gui.jar; xdg-desktop-menu uninstall ./*.desktop'

}

installOsxDist.dependsOn jar, copyAndReplaceVariablesInInfoPlist
osxDistTar.dependsOn jar, copyAndReplaceVariablesInInfoPlist
osxDistZip.dependsOn jar, copyAndReplaceVariablesInInfoPlist

installWindowsDist.dependsOn launch4j
windowsDistTar.dependsOn launch4j
windowsDistZip.dependsOn launch4j

buildDeb.dependsOn jar
1 change: 1 addition & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include 'api', 'app', 'services'

rootProject.name='jd-gui'

7 changes: 7 additions & 0 deletions src/linux/resources/jd-gui.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Desktop Entry]
Comment= Java Decompiler JD-GUI
Terminal=false
Name=JD-GUI
Exec=java -jar /opt/jd-gui/jd-gui.jar
Type=Application
Icon=jd-gui
Loading

0 comments on commit 836d1ba

Please sign in to comment.