Added linux files for jar

This commit is contained in:
Yair Morgenstern 2019-11-27 21:03:14 +02:00
parent 4270142421
commit 8854cafc96
4 changed files with 67 additions and 1 deletions

View file

@ -34,6 +34,7 @@ script:
./gradlew desktop:packrWindows64;
./gradlew desktop:packrLinux32;
./gradlew desktop:packrLinux64;
./gradlew desktop:zipLinuxFilesForJar;
fi
deploy:
@ -48,6 +49,7 @@ deploy:
- deploy/Unciv-Linux64.zip
- deploy/Unciv-Windows32.zip
- deploy/Unciv-Windows64.zip
- deploy/linuxFilesForJar.zip
on:
repo: yairm210/Unciv
tags: true

View file

@ -9,6 +9,7 @@ sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "com.unciv.app.desktop.DesktopLauncher"
project.ext.assetsDir = file("../android/assets")
project.ext.discordDir = file("discord_rpc")
def deployFolder = file("../deploy")
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
@ -77,7 +78,6 @@ for(platform in PackrConfig.Platform.values()) {
}
task "zip${platformName}"(type: Zip) {
def deployFolder = file("../deploy")
archiveFileName = "${appName}-${platformName}.zip"
from config.outDir
destinationDirectory = deployFolder
@ -87,6 +87,12 @@ for(platform in PackrConfig.Platform.values()) {
}
}
task zipLinuxFilesForJar(type: Zip) {
archiveFileName = "linuxFilesForJar.zip"
from file("linuxFilesForJar")
destinationDirectory = deployFolder
}
task packr(){
for(platform in PackrConfig.Platform.values())
finalizedBy "packr${platform.toString()}"

View file

@ -0,0 +1,46 @@
#!/bin/sh
CONFIG_DIR="$HOME/.local/share/Unciv"
USAGE="Unciv [--help | -h | --config-dir PATH]
Run the Unciv game.
With '--help' or '-h', show this help info and exit.
With '--config-dir PATH', use/make configuration files in PATH instead
of the default of '$CONFIG_DIR'.
"
usage() {
echo "$USAGE"
exit 0
}
fail() {
echo "Error: $1"
usage
exit 1
}
if [ "$#" -gt "0" ]; then
case "$1" in
--help|-h)
shift
usage
;;
--config-dir)
CONFIG_DIR="$2"
shift 2
;;
esac
shift
fi
if ! [ "$#" -eq "0" ]; then
fail "Unknown argument(s): $*"
fi
mkdir -p "$CONFIG_DIR"
cd "$CONFIG_DIR" || fail "Could not 'cd' to '$CONFIG_DIR'"
java -jar /usr/share/Unciv/Unciv.jar

View file

@ -0,0 +1,12 @@
[Desktop Entry]
Encoding=UTF-8
Comment=Open-source Android/Desktop remake of Civ V
Exec=Unciv
GenericName=4X Game
Icon=unciv
Name=Unciv
NoDisplay=false
StartupNotify=true
Terminal=0
Type=Application
Categories=Game