mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-24 15:51:49 +01:00
the new and simple way of packaging windows
This commit is contained in:
parent
cacc97cec7
commit
c1baa31eed
1
scripts/resources/Tachidesk Launcher.bat
Normal file
1
scripts/resources/Tachidesk Launcher.bat
Normal file
@ -0,0 +1 @@
|
|||||||
|
start "" jre/bin/javaw -jar Tachidesk.jar
|
5
scripts/resources/Tachidesk Launcher.c
Normal file
5
scripts/resources/Tachidesk Launcher.c
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
system("start jre\\bin\\javaw -jar Tachidesk.jar");
|
||||||
|
}
|
BIN
scripts/resources/Tachidesk Launcher.exe
Normal file
BIN
scripts/resources/Tachidesk Launcher.exe
Normal file
Binary file not shown.
@ -1 +0,0 @@
|
|||||||
start "" "jre/bin/javaw -jar Tachidesk.jar"
|
|
3
scripts/resources/readme.md
Normal file
3
scripts/resources/readme.md
Normal 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"`
|
@ -27,10 +27,11 @@ 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/
|
mv $zip_name ../server/build/
|
||||||
|
@ -126,18 +126,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 +139,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)
|
||||||
@ -168,8 +155,8 @@ 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")
|
||||||
@ -193,3 +180,16 @@ tasks {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
launch4j { //used for windows
|
||||||
|
mainClassName = MainClass
|
||||||
|
bundledJrePath = "jre"
|
||||||
|
bundledJre64Bit = true
|
||||||
|
dontWrapJar = true
|
||||||
|
outputDir = "${rootProject.name}-$tachideskVersion-$tachideskRevision-win64"
|
||||||
|
icon = "${projectDir}/src/main/resources/icon/faviconlogo.ico"
|
||||||
|
jar = "Tachidesk.jar"
|
||||||
|
libraryDir = ""
|
||||||
|
copyConfigurable = "false"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user