Skip to content

Commit

Permalink
Fixes the loading extensions under Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed Aug 8, 2015
1 parent 5aa1ed5 commit 816a5bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ class ExtensionService {
protected ClassLoader extensionClassLoader = initClassLoader()

protected ClassLoader initClassLoader() {
def extDirectory = new File("ext");
def jarUri = ExtensionService.class.protectionDomain.codeSource.location.toURI()
def baseDirectory = new File(jarUri).parent
def extDirectory = new File(baseDirectory, 'ext')

if (extDirectory.exists() && extDirectory.isDirectory()) {
List<URL> urls = []
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ ospackage {
}
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'
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; rm -fr ./ext; xdg-desktop-menu uninstall ./*.desktop'
}

installOsxDist.dependsOn jar, copyAndReplaceVariablesInInfoPlist
Expand Down

0 comments on commit 816a5bf

Please sign in to comment.