Compare commits

..

4 Commits

Author SHA1 Message Date
Aria Moradi d2a72526f6 bump to v0.3.6
CI Publish / Validate Gradle Wrapper (push) Successful in 11s
CI Publish / Build FatJar (push) Failing after 16s
2021-05-18 21:40:42 +04:30
Aria Moradi 0a9f57b32b cleanup 2021-05-18 21:38:41 +04:30
Aria Moradi 180f210536 update windows instructions 2021-05-18 21:35:57 +04:30
Aria Moradi c1baa31eed the new and simple way of packaging windows 2021-05-18 21:31:25 +04:30
9 changed files with 23 additions and 25 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ Run `./gradlew :webUI:copyBuild server:shadowJar`, the resulting built jar file
### building without `webUI` bundled(server only) ### building without `webUI` bundled(server only)
Delete the `server/src/main/resources/react` directory if exists from previous runs, then run `./gradlew server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`. Delete the `server/src/main/resources/react` directory if exists from previous runs, then run `./gradlew server:shadowJar`, the resulting built jar file will be `server/build/Tachidesk-vX.Y.Z-rxxx.jar`.
### building the Windows package ### building the Windows package
Run `./gradlew :server:windowsPackage` to build a server only bundle and `./gradlew :webUI:copyBuild :server:windowsPackage` to get a full bundle , the resulting built zip package file will be `server/build/Tachidesk-vX.Y.Z-rxxx-win32.zip`. First Build the jar, then cd into the `scripts` directory and run `./windows-bundler.sh`, the resulting built zip package file will be `server/build/Tachidesk-vX.Y.Z-rxxx-win64.zip`.
## Running in development mode ## Running in development mode
First satistify [the prerequisites](#prerequisites) First satistify [the prerequisites](#prerequisites)
### server ### server
+1
View File
@@ -0,0 +1 @@
start "" jre/bin/javaw -jar Tachidesk.jar
+5
View File
@@ -0,0 +1,5 @@
#include <stdlib.h>
int main() {
system("start jre\\bin\\javaw -jar Tachidesk.jar");
}
Binary file not shown.
-1
View File
@@ -1 +0,0 @@
start "" "jre/bin/javaw -jar Tachidesk.jar"
+3
View File
@@ -0,0 +1,3 @@
# Building `Tachidesk Launcher.exe`
1. compile `Tachidesk Launcher.c` statically using GCC MinGW: `gcc -o "Tachidesk Launcher.exe" "Tachidesk Launcher.c"`
2. Add `server/src/main/resources/icon/faviconlogo.ico` into the exe with `rcedit` from the electron project: `rcedit "Tachidesk Launcher.exe" --set-icon "faviconlogo.ico"`
+9 -4
View File
@@ -9,7 +9,9 @@
echo "Downloading jre..." echo "Downloading jre..."
jre="OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip" jre="OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip"
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip" -o $jre if [ ! -f $jre ]; then
curl -L "https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u292-b10/OpenJDK8U-jre_x64_windows_hotspot_8u292b10.zip" -o $jre
fi
echo "creating windows bundle" echo "creating windows bundle"
@@ -27,10 +29,13 @@ mv jdk8u292-b10-jre $release_name/jre
cp $jar $release_name/Tachidesk.jar cp $jar $release_name/Tachidesk.jar
cp resources/Tachidesk.bat $release_name cp "resources/Tachidesk Launcher.exe" $release_name
cp resources/Tachidesk-debug.bat $release_name cp "resources/Tachidesk Launcher.bat" $release_name
cp "resources/Tachidesk Debug Launcher.bat" $release_name
zip_name=$release_name.zip zip_name=$release_name.zip
zip -9 -r $zip_name $release_name zip -9 -r $zip_name $release_name
cp $zip_name ../server/build/ rm -rf $release_name
mv $zip_name ../server/build/
+4 -19
View File
@@ -8,7 +8,6 @@ plugins {
application application
id("com.github.johnrengelman.shadow") version "7.0.0" id("com.github.johnrengelman.shadow") version "7.0.0"
id("org.jmailen.kotlinter") version "3.4.3" id("org.jmailen.kotlinter") version "3.4.3"
id("edu.sc.seis.launch4j") version "2.5.0"
id("de.fuerstenau.buildconfig") version "1.1.8" id("de.fuerstenau.buildconfig") version "1.1.8"
} }
@@ -97,7 +96,7 @@ sourceSets {
} }
// should be bumped with each stable release // should be bumped with each stable release
val tachideskVersion = "v0.3.5" val tachideskVersion = "v0.3.6"
// counts commit count on master // counts commit count on master
val tachideskRevision = Runtime val tachideskRevision = Runtime
@@ -126,18 +125,8 @@ buildConfig {
buildConfigField("boolean", "debug", project.hasProperty("debugApp").toString()) buildConfigField("boolean", "debug", project.hasProperty("debugApp").toString())
} }
launch4j { //used for windows
mainClassName = MainClass
bundledJrePath = "jre"
bundledJre64Bit = true
jreMinVersion = "8"
outputDir = "${rootProject.name}-$tachideskVersion-$tachideskRevision-win64"
icon = "${projectDir}/src/main/resources/icon/faviconlogo.ico"
jar = "${projectDir}/build/${rootProject.name}-$tachideskVersion-$tachideskRevision.jar"
}
tasks { tasks {
jar { shadowJar {
manifest { manifest {
attributes( attributes(
mapOf( mapOf(
@@ -149,9 +138,6 @@ tasks {
) )
) )
} }
}
shadowJar {
manifest.inheritFrom(jar.get().manifest) //will make your shadowJar (produced by jar task) runnable
archiveBaseName.set(rootProject.name) archiveBaseName.set(rootProject.name)
archiveVersion.set(tachideskVersion) archiveVersion.set(tachideskVersion)
archiveClassifier.set(tachideskRevision) archiveClassifier.set(tachideskRevision)
@@ -165,11 +151,11 @@ tasks {
) )
} }
} }
test { test {
useJUnit() useJUnit()
} }
withType<ShadowJar> { withType<ShadowJar> {
destinationDirectory.set(File("$rootDir/server/build")) destinationDirectory.set(File("$rootDir/server/build"))
dependsOn("formatKotlin", "lintKotlin") dependsOn("formatKotlin", "lintKotlin")
@@ -192,4 +178,3 @@ tasks {
source(files("src")) source(files("src"))
} }
} }