From: Vincent Vanwaelscappel Date: Thu, 19 Jan 2023 20:49:37 +0000 (+0100) Subject: wip #5661 @3 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=19c0f629edc3460adeebbbcc46750413b27ef1c0;p=fluidbook-toolbox.git wip #5661 @3 --- diff --git a/.docker/docker-compose.yml b/.docker/docker-compose.yml index 4d26711a5..a90d3d0e2 100644 --- a/.docker/docker-compose.yml +++ b/.docker/docker-compose.yml @@ -33,6 +33,7 @@ services: environment: TZ: Europe/Paris HOME: /application + NODE_PATH: /usr/lib/node_modules volumes: # SSH - '/home/toolbox/www/.docker/config/ssh/root/:/root/.ssh/' diff --git a/.docker/images/php/Dockerfile b/.docker/images/php/Dockerfile index 6584c4752..5c13e3960 100644 --- a/.docker/images/php/Dockerfile +++ b/.docker/images/php/Dockerfile @@ -87,7 +87,7 @@ RUN curl -L https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -o RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true -RUN npm install --unsafe-perm --global uglify-js less sass puppeteer favicons crx3 nw-builder@^3 +RUN npm install --unsafe-perm --global uglify-js less sass puppeteer favicons crx3 nw-builder@^4 RUN pip3 install font-line RUN groupadd sudo;useradd -d /application -g 33 -G sudo -s /bin/bash -u 1001 toolbox diff --git a/app/Fluidbook/Packager/WindowsZIP.php b/app/Fluidbook/Packager/WindowsZIP.php index 512fdd332..a7884fbfd 100644 --- a/app/Fluidbook/Packager/WindowsZIP.php +++ b/app/Fluidbook/Packager/WindowsZIP.php @@ -20,7 +20,7 @@ class WindowsZIP extends Packager protected $exenameMaxlength = 30; protected $_compileOnConstruct = true; protected $packageIconExt = 'ico'; - protected $nwbuildVersion = '3.8.6'; + protected $nwbuildVersion = '4.0.7'; protected $_ext = 'html'; @@ -68,7 +68,7 @@ class WindowsZIP extends Packager // $cl->setArg(null, $this->vdir); // $cl->execute(); - if ($this->nwbuildVersion === 3) { + if (version_compare($this->nwbuildVersion, 4, '<')) { $platform = $this->getNWbuilder3Platform(); $cl = new CommandLine('nwbuild'); @@ -88,12 +88,13 @@ class WindowsZIP extends Packager $cl->execute(); } else { $cl = new CommandLine('nwbuild'); + $cl->cd($this->vdir); + $cl->setArg(null, 'package.json'); $cl->setArg('platform', $this->nwplatform); $cl->setArg('outDir', $this->buildPath); $cl->setArg('flavour', "normal"); $cl->setArg('version', $this->nwversion); $cl->setArg('arch', $this->arch); - $cl->setArg(null, $this->vdir); $cl->execute(); } @@ -123,28 +124,30 @@ class WindowsZIP extends Packager function signExe() { - $exe = $this->getFinalPackageDir() . '/' . $this->exeName . '.exe'; - if (file_exists('/mnt/sshfs/codesign')) { - $this->_sign($exe); - } + $exe = $this->getFinalPackageDir() . $this->exeName . '.exe'; + $this->_sign($exe); } function _sign($source, $symbolicLink = false) { $rand = 'sign-' . hash_file('sha256', $source) . '.exe'; - $distant = '/mnt/sshfs/codesign/' . $rand; + $distant = 'C:/Sign/' . $rand; $local = protected_path('signedexe/' . $rand); if (!file_exists($local)) { - `mv $source $distant`; + $ssh = new SSH2('paris.cubedesigners.com', 'vince', 'Y@mUC9mY2DOYWXkN', '22422'); + $ssh->send($source, $distant); + unlink($source); + $cli = new 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 SSH2('paris.cubedesigners.com', 'vince', 'Y@mUC9mY2DOYWXkN', '22422')); + $cli->execute($ssh); if (!stristr($cli->getOutput(), 'Successfully signed')) { unlink($distant); throw new \Exception('Error while signing exe ' . $rand . ' : ' . $cli->getOutput()); } - copy($distant, $local); - unlink($distant); + + $ssh->recv($distant, $local); + $ssh->unlink($distant); sleep(2); } if ($symbolicLink) { diff --git a/composer.lock b/composer.lock index f8b9f4df8..2319da0bf 100644 --- a/composer.lock +++ b/composer.lock @@ -2045,13 +2045,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_net.git", - "reference": "2df4884f5dd6c515bdcdc238884a852cc918a35b" + "reference": "0a845f16f3c1512b7beae57c0589eacc573743c2" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-4d699f.tar", - "reference": "2df4884f5dd6c515bdcdc238884a852cc918a35b", - "shasum": "79d35212b27d002ac9befbb0e63177e79b846252" + "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-247364.tar", + "reference": "0a845f16f3c1512b7beae57c0589eacc573743c2", + "shasum": "e3d881b5c49cf02b44cb4b66caa985c8ad62c860" }, "require": { "ext-ssh2": "*", @@ -2074,7 +2074,7 @@ } ], "description": "net cubist composer package", - "time": "2022-05-03T07:33:01+00:00" + "time": "2023-01-19T19:54:06+00:00" }, { "name": "cubist/pdf", @@ -2169,13 +2169,13 @@ "source": { "type": "git", "url": "git://git.cubedesigners.com/cubist_util.git", - "reference": "1df8a20be9fd6d50873388d776b9b5978f32c8ca" + "reference": "946c1cf3cb6ff8d0ba49087eaf1a7eef20a67087" }, "dist": { "type": "tar", - "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-e00b85.tar", - "reference": "1df8a20be9fd6d50873388d776b9b5978f32c8ca", - "shasum": "24d40bb3b892638319aac870397daf0249c611c2" + "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-06cab9.tar", + "reference": "946c1cf3cb6ff8d0ba49087eaf1a7eef20a67087", + "shasum": "28fb0f86620fffa6caa911174f7056a131340ae5" }, "require": { "cubist/net": "dev-master", @@ -2207,7 +2207,7 @@ } ], "description": "Utilities class", - "time": "2022-12-20T09:18:30+00:00" + "time": "2023-01-19T19:33:05+00:00" }, { "name": "cviebrock/eloquent-sluggable",