From: vincent@cubedesigners.com Date: Tue, 31 May 2022 12:38:56 +0000 (+0000) Subject: wait #5304 @0.5 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=844308d587eaaa5d762c88f3203d0c9c32142b7d;p=cubeextranet.git wait #5304 @0.5 --- diff --git a/inc/commons/class.common.tools.php b/inc/commons/class.common.tools.php index 2855e6747..0d4b9c892 100644 --- a/inc/commons/class.common.tools.php +++ b/inc/commons/class.common.tools.php @@ -567,7 +567,7 @@ class commonTools foreach ($icns as $s) { $r = CubeIT_Files::tempnam() . '.png'; $tmp[] = $r; - $it = new cubeImageTools(); + $it = new CubeIT_Image_Resizer_ImageMagick(); $it->loadImage($file); $it->resize($s, $s, 'crop', true, 'C', 'M', 'transparent'); $it->output('png', $r); diff --git a/inc/ws/Util/packager/class.ws.packager.win.exe.html.php b/inc/ws/Util/packager/class.ws.packager.win.exe.html.php index 36a5fb3e5..73f62ccb4 100644 --- a/inc/ws/Util/packager/class.ws.packager.win.exe.html.php +++ b/inc/ws/Util/packager/class.ws.packager.win.exe.html.php @@ -35,7 +35,9 @@ class wsPackagerWinEXEHTML extends wsPackager protected function preparePackage() { + parent::preparePackage(); + $this->copyFluidbookFiles(); $this->makeJSON(); @@ -83,7 +85,7 @@ class wsPackagerWinEXEHTML extends wsPackager copy($exe, '/mnt/sshfs/codesign/' . $rand); $cli = new CubeIT_CommandLine('C:/Program Files (x86)/Windows Kits/10/bin/10.0.18362.0/x64/signtool.exe'); $cli->setManualArg("sign /f C:/Users/vince/Documents/Cubedesigners.cer /csp \"eToken Base Cryptographic Provider\" /k \"[SafeNet Token JC 0{{TYWjZacq%hAH98}}]=54C3F1B91759268A\" /tr http://timestamp.sectigo.com /td sha256 /fd sha256 /a C:/Sign/$rand"); - $cli->execute(new CubeIT_Networking_SSH2('paris.cubedesigners.com','vince','Y@mUC9mY2DOYWXkN','22422')); + $cli->execute(new CubeIT_Networking_SSH2('paris.cubedesigners.com', 'vince', 'Y@mUC9mY2DOYWXkN', '22422')); $cli->debug(); sleep(2); copy('/mnt/sshfs/codesign/' . $rand, $exe); @@ -110,6 +112,7 @@ class wsPackagerWinEXEHTML extends wsPackager $data['chromium-args'] = '--crash-dumps-dir=\'' . $datadir . '\' --user-data-dir=\'' . $datadir . '\''; } + $pngIcon = $this->vdir . '/icon.png'; $winIcon = $this->vdir . '/icon.ico'; @@ -128,9 +131,9 @@ class wsPackagerWinEXEHTML extends wsPackager $icns = $this->vdir . '/icon.icns'; $this->copy($png, $pngIcon); $this->copy($ico, $winIcon); - commonTools::pngToIcns($png, $icns); + file_put_contents($this->vdir . '/package.json', json_encode($data)); } @@ -147,13 +150,14 @@ class wsPackagerWinEXEHTML extends wsPackager return $this->buildPath . '/' . $this->exeName . '/' . $this->nwplatform; } - protected function compile() + protected function compile($forceCompile = false) { // For exe version, force to export only the html5 version // No need to export pages with texts for this version, we are certain that svg is supported if enabled if ($this->book->parametres->mobileVersion == 'html5-desktop') { $this->book->parametres->mobileVersion = 'html5'; } + $this->book->parametres->seoVersion = false; $this->daoBook->compile($this->book_id, 'html5', false, $this->book->parametres->forceCompileOnDownload, false, $this->book); }