Skip to content

Commit

Permalink
update the launch4j dependency to version 3.11 (issue #52)
Browse files Browse the repository at this point in the history
This uses the updated launch4j version 3.11 which contains the linux-64 executables `ld` and `windres`.
  • Loading branch information
TheBoegl committed Jul 16, 2017
1 parent 54bad50 commit abd01aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ repositories {
}

ext {
ARTIFACT_VERSION = '3.9'
ARTIFACT_VERSION = '3.11'
}

dependencies {
Expand Down
8 changes: 6 additions & 2 deletions src/main/groovy/edu/sc/seis/launch4j/Launch4jPlugin.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package edu.sc.seis.launch4j
import edu.sc.seis.launch4j.tasks.DefaultLaunch4jTask
import edu.sc.seis.launch4j.tasks.Launch4jLibraryTask
import groovy.transform.CompileStatic
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.artifacts.Configuration
Expand All @@ -40,7 +41,7 @@ class Launch4jPlugin implements Plugin<Project> {
static final String LAUNCH4J_CONFIGURATION_NAME_BINARY = 'launch4jBin'
static final String TASK_RUN_NAME = 'createExe'
static final String TASK_LAUNCH4J_NAME = 'launch4j'
static final String ARTIFACT_VERSION = '3.9'
static final String ARTIFACT_VERSION = '3.11'
static final String LAUNCH4J_BINARY_DIRECTORY = "tmp/launch4j/bin-launch4j-${ARTIFACT_VERSION}"

private Project project
Expand Down Expand Up @@ -99,7 +100,10 @@ class Launch4jPlugin implements Plugin<Project> {
if (os.isWindows()) {
return 'workdir-win32'
} else if (os.isMacOsX()) {
return "workdir-${isBelowMacOsX108() ? 'mac' : 'osx'}"
if(isBelowMacOsX108()) {
throw new GradleException('Mac OS X below version 10.8 (Mountain Lion) is not supported by launch4j version 3.11 and later. Please use an earlier version of this plugin, e.g. 2.3.0.')
}
return 'workdir-mac'
} else if (os.isLinux() || os.isUnix()) { // isUnix will also match MacOs, hence, call it as last resort
String arch = System.getProperty("os.arch")
if ("amd64".equals(arch) || "x86_64".equals(arch)) {
Expand Down

0 comments on commit abd01aa

Please sign in to comment.