Commit c8b307a8 authored by Drahomír Karchňák's avatar Drahomír Karchňák

#755 Gradle now outputs .exe file on assemble task.

parent 61a2df6b
......@@ -108,26 +108,6 @@ task releaseJar(type: Jar) {
}
}
task releaseExe(dependsOn: releaseJar) {
if(project.hasProperty('TABLEXIA_JRE_DOWNLOAD_MIRROR')) {
def jreFileName = '/jre.tar.gz'
//Download JRE
download(project.property('TABLEXIA_JRE_DOWNLOAD_MIRROR'), project.buildDir.absolutePath + jreFileName)
//Extract JRE to desktop/build/
Runtime.getRuntime().exec(
'tar -xf ' + project.buildDir.absolutePath + jreFileName +
' -C ' + project.buildDir.absolutePath
)
}
}
def download(String remoteUrl, String localUrl) {
new File("$localUrl").withOutputStream { out ->
new URL(remoteUrl).withInputStream { from -> out << from; }
}
}
task runITestBundle(dependsOn: iTestJar) {
doLast {
int testsCount = 0;
......@@ -164,6 +144,10 @@ def runItest(String iTestName) {
println "[iTest] TEST: " + iTestName + " FINISHED"
}
/***************************
* Windows Desktop Version *
***************************/
launch4j {
mainClassName = 'cz.nic.tablexia.desktop.DesktopLauncher'
icon = '../../assets/icons/desktop_icon_128.png.ico'
......@@ -172,7 +156,23 @@ launch4j {
bundledJrePath = '../jre'
}
task createReleaseApp(dependsOn: releaseJar, type: edu.sc.seis.launch4j.tasks.Launch4jLibraryTask) {
def download(String remoteUrl, String localUrl) {
new File("$localUrl").withOutputStream { out ->
new URL(remoteUrl).withInputStream { from -> out << from; }
}
}
task releaseExe(dependsOn: releaseJar, type: edu.sc.seis.launch4j.tasks.Launch4jLibraryTask) {
def jreFileName = '/jre.tar.gz'
//Download JRE
download(project.property('TABLEXIA_JRE_DOWNLOAD_MIRROR'), project.buildDir.absolutePath + jreFileName)
//Extract JRE to desktop/build/
Runtime.getRuntime().exec(
'tar -xf ' + project.buildDir.absolutePath + jreFileName +
' -C ' + project.buildDir.absolutePath
)
outfile = 'Tablexia.exe'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment