From 3f18d7716390d518a2a637f12583a56bda804823 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Mon, 3 Dec 2018 14:28:04 +0000 Subject: [PATCH] #2307 --- .../class.ws.packager.mac.exe.html.php | 42 ++++++++++++++++--- 1 file changed, 37 insertions(+), 5 deletions(-) diff --git a/inc/ws/Util/packager/class.ws.packager.mac.exe.html.php b/inc/ws/Util/packager/class.ws.packager.mac.exe.html.php index 633c30d48..36f94e9c5 100644 --- a/inc/ws/Util/packager/class.ws.packager.mac.exe.html.php +++ b/inc/ws/Util/packager/class.ws.packager.mac.exe.html.php @@ -36,11 +36,6 @@ class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML return $this->getFinalPackageDir() . '/' . $this->exeName . '.app'; } - public function getSignedAppPath() - { - return $this->getFinalPackageDir() . '/' . $this->exeName . '-signed.app'; - } - public function getFinalPackageDir() { $res = parent::getFinalPackageDir(); @@ -74,6 +69,43 @@ class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML protected function signApp() { + $local_root = '/Sign/'; + $dist_root = '/mnt/sshfs/macparis' . $local_root; + + $f = 'tmp_' . md5(rand(0, 1000000)) . ".app"; + $path = $dist_root . $f; + + // Copy app to mac + $cp = new CubeIT_CommandLine('cp'); + $cp->setArg('r'); + $cp->setArg(null, $this->getAppPath()); + $cp->setArg(null, $path); + $cp->execute(); + $cp->debug(); + + // Sign app + $cl = new CubeIT_CommandLine('/Sign/sign'); + $cl->setSSH('paris.cubedesigners.com', 'vincent', 'atacama', 22022); + $cl->setArg(null, $local_root . $f); + $cl->execute(); + $cl->debug(); + + // Copy back signed + $cp = new CubeIT_CommandLine('rsync'); + $cp->setArg('r'); + $cp->setArg('l'); + $cp->setArg('p'); + $cp->setArg('D'); + $cp->setArg('v'); + $cp->setArg(null, $path . '/'); + $cp->setArg(null, $this->getAppPath() . '/'); + $cp->setArg('delete'); + $cp->execute(); + $cp->debug(); + + `rm -rf $path`; + + // $cert = WS_COMPILE_ASSETS . '/_exehtml/certificats/developer_id_application/'; // // $cl = new CubeIT_CommandLine('/usr/local/bin/isign'); -- 2.39.5