mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Added IKVM-specific dist command
This commit is contained in:
parent
bf7803d554
commit
32ad577f6d
@ -6,6 +6,7 @@ sourceSets.main.java.srcDirs = ["src/"]
|
|||||||
project.ext.mainClassName = "io.anuke.mindustry.desktop.DesktopLauncher"
|
project.ext.mainClassName = "io.anuke.mindustry.desktop.DesktopLauncher"
|
||||||
project.ext.assetsDir = new File("../core/assets")
|
project.ext.assetsDir = new File("../core/assets")
|
||||||
|
|
||||||
|
def IKVM_DIR = System.env.IKVM_HOME
|
||||||
|
|
||||||
import com.badlogicgames.packr.Packr
|
import com.badlogicgames.packr.Packr
|
||||||
import com.badlogicgames.packr.PackrConfig
|
import com.badlogicgames.packr.PackrConfig
|
||||||
@ -175,3 +176,38 @@ task packrZip(){
|
|||||||
finalizedBy 'rzip'
|
finalizedBy 'rzip'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task ikZip(type: Zip){
|
||||||
|
def filename = "$appName-windows-${version}"
|
||||||
|
|
||||||
|
from "build/libs/$filename"
|
||||||
|
archiveBaseName = "$appName-windows"
|
||||||
|
}
|
||||||
|
|
||||||
|
task ikdist{
|
||||||
|
dependsOn dist
|
||||||
|
finalizedBy ikZip
|
||||||
|
|
||||||
|
doLast{
|
||||||
|
def filename = "$appName-windows-${version}"
|
||||||
|
def folder = "build/libs/$filename"
|
||||||
|
def args = ["mono", "$IKVM_DIR/ikvmc.exe", "-target:winexe", "-static", "-out:build/libs/${filename}.exe", "build/libs/${filename}.jar"]
|
||||||
|
if(file("../core/assets/sprites/icon.ico").exists()){
|
||||||
|
args += ["-win32icon:../core/assets/sprites/icon.ico"]
|
||||||
|
}
|
||||||
|
|
||||||
|
exec{
|
||||||
|
commandLine args
|
||||||
|
}
|
||||||
|
|
||||||
|
copy{
|
||||||
|
from file("build/libs/${filename}.exe")
|
||||||
|
into file(folder)
|
||||||
|
}
|
||||||
|
|
||||||
|
copy{
|
||||||
|
from "$IKVM_DIR/libraries"
|
||||||
|
into folder
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user