Commit 19708232 authored by Adrien's avatar Adrien

remove rename, done studio side

parent 0e15f39a
...@@ -25,7 +25,7 @@ class MacCodeSign { ...@@ -25,7 +25,7 @@ class MacCodeSign {
val separator = System.getProperty("file.separator") val separator = System.getProperty("file.separator")
fun signMacProduct(zipFile: File): File { fun signMacProduct(zipFile: File): File {
val file: File = unzip(zipFile, false); val file: File = unzip(zipFile);
if (!zipFile.delete()) { if (!zipFile.delete()) {
logger.error("Failed to delete temp file $zipFile") logger.error("Failed to delete temp file $zipFile")
throw Throwable() throw Throwable()
...@@ -50,7 +50,7 @@ class MacCodeSign { ...@@ -50,7 +50,7 @@ class MacCodeSign {
} }
fun buildAndSignMacInstaller(zipFile: File): File { fun buildAndSignMacInstaller(zipFile: File): File {
val file: File = unzip(zipFile, true); val file: File = unzip(zipFile);
if (!zipFile.delete()) { if (!zipFile.delete()) {
throw Throwable("Failed to delete temp file $zipFile") throw Throwable("Failed to delete temp file $zipFile")
} }
...@@ -103,22 +103,13 @@ class MacCodeSign { ...@@ -103,22 +103,13 @@ class MacCodeSign {
return zipDmg return zipDmg
} }
fun unzip(zipFile: File, rename: Boolean): File { fun unzip(zipFile: File): File {
ProcessBuilder() ProcessBuilder()
.inheritIO() .inheritIO()
.command("unzip", zipFile.canonicalPath, "-d", zipFile.parentFile.canonicalPath) .command("unzip", zipFile.canonicalPath, "-d", zipFile.parentFile.canonicalPath)
.start() .start()
.waitFor() .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") var file: File = File(zipFile.parentFile.canonicalPath + separator + zipFile.nameWithoutExtension + ".app")
if (!file.exists()) { if (!file.exists()) {
throw Throwable("failed to unzip $zipFile") 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