This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
generated from unibo-disi-cesena/thesis-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
%!TEX root = ../thesis-main.tex | ||
\chapter{Conclusioni} | ||
|
||
% Dimostrare i link con le release, installazione da AUR e da Winget | ||
|
||
\section{Sviluppi futuri} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
tasks.register<Exec>("testJpackageOutput") { | ||
group = "Verification" | ||
description = "Verifies the jpackage output correctness for the OS running the script" | ||
isIgnoreExitValue = true | ||
workingDir = rootProject.file("build/package/") | ||
doFirst { | ||
val version = rootProject.version.toString().substringBefore('-') | ||
// Extract the packet | ||
when { | ||
isWindows -> commandLine("msiexec", "-i", "${rootProject.name}-$version.msi", "-quiet", "INSTALLDIR=${workingDir.path}\\install") | ||
isMac -> commandLine("sudo", "installer", "-pkg", "${rootProject.name}-$version.pkg", "-target", "/") | ||
else -> { | ||
workingDir.resolve("install").mkdirs() | ||
commandLine("bsdtar", "-xf", "${rootProject.name}-$version-1.x86_64.rpm", "-C", "install") | ||
} | ||
} | ||
} | ||
doLast { | ||
// Check if package contains every file needed | ||
var execFiles: List<String> | ||
var appFiles: List<String> | ||
when { | ||
isWindows -> { | ||
execFiles = workingDir.resolve("install").listFiles().map { it.name } | ||
appFiles = workingDir.resolve("install/app").listFiles().map { it.name } | ||
} | ||
isMac -> { | ||
val root = File("/Applications/${rootProject.name}.app") | ||
execFiles = root.resolve("Contents/MacOS").listFiles().map { it.name } | ||
appFiles = root.resolve("Contents/app").listFiles().map { it.name } | ||
} | ||
else -> { | ||
execFiles = workingDir.resolve("install/opt/alchemist/bin").listFiles().map { it.name } | ||
appFiles = workingDir.resolve("install/opt/alchemist/lib/app").listFiles().map { it.name } | ||
} | ||
} | ||
require(rootProject.name in execFiles || "${rootProject.name}.exe" in execFiles) | ||
require(jpackageFull.get().mainJar in appFiles) | ||
} | ||
mustRunAfter(jpackageFull) | ||
finalizedBy(deleteJpackageOutput) | ||
} |