Commit 19708232 authored by Adrien's avatar Adrien

remove rename, done studio side

parent 0e15f39a
......@@ -25,7 +25,7 @@ class MacCodeSign {
val separator = System.getProperty("file.separator")
fun signMacProduct(zipFile: File): File {
val file: File = unzip(zipFile, false);
val file: File = unzip(zipFile);
if (!zipFile.delete()) {
logger.error("Failed to delete temp file $zipFile")
throw Throwable()
......@@ -50,7 +50,7 @@ class MacCodeSign {
}
fun buildAndSignMacInstaller(zipFile: File): File {
val file: File = unzip(zipFile, true);
val file: File = unzip(zipFile);
if (!zipFile.delete()) {
throw Throwable("Failed to delete temp file $zipFile")
}
......@@ -103,22 +103,13 @@ class MacCodeSign {
return zipDmg
}
fun unzip(zipFile: File, rename: Boolean): File {
fun unzip(zipFile: File): File {
ProcessBuilder()
.inheritIO()
.command("unzip", zipFile.canonicalPath, "-d", zipFile.parentFile.canonicalPath)
.start()
.waitFor()
if (rename) { // the installer generated by bitrock doesn't have the .app ..
var folderName : String = zipFile.parentFile.canonicalPath + separator + zipFile.nameWithoutExtension
ProcessBuilder()
.inheritIO()
.command("mv", folderName, folderName + ".app")
.start()
.waitFor()
}
var file: File = File(zipFile.parentFile.canonicalPath + separator + zipFile.nameWithoutExtension + ".app")
if (!file.exists()) {
throw Throwable("failed to unzip $zipFile")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment