- '/home/toolbox/www/.docker/config/httpd/httpd.conf:/usr/local/apache2/conf/httpd.conf'
# Files
- '/home/extranet/share:/application/share'
- - '/mnt:/mnt'
- '/home/toolbox/www:/application'
- '/home/toolbox/www/storage/app/public/:/application/public/storage/'
- '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/protected/fluidbookpublication/docs/'
- - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/fluidbook/docs/'
- '/data/extranet/www/fluidbook/books/working/:/application/protected/fluidbookpublication/working/'
- '/home/extranet:/home/extranet'
- '/data/extranet:/data/extranet'
+ - '/mnt:/mnt'
ports:
- '37126:80'
environment:
- '/home/toolbox/www:/application'
- '/home/toolbox/www/storage/app/public/:/application/public/storage/'
- '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/protected/fluidbookpublication/docs/'
- - '/mnt/sshfs/godzilla/data/fluidbook/docs/:/application/fluidbook/docs/'
- '/data/extranet/www/fluidbook/books/working/:/application/protected/fluidbookpublication/working/'
- '/home/extranet:/home/extranet'
- '/data/extranet:/data/extranet'
+ - '/mnt:/mnt'
ports:
- '58744:8123'
- '58745:22'
fluidbook-processfarm:
external:
name: fluidbook-processfarm
+
+#volumes:
+# # sshcmd=vince@paris.cubedesigners.com\:/C:/Sign -o port=22422 -o uid=1001 -o gid=33 -o allow_other -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 codesign
+# codesign:
+# driver: vieux/sshfs:latest
+# driver_opts:
+# sshcmd: "vince@paris.cubedesigners.com:/C:/Sign"
+# allow_other: ""
+# uid: "1001"
+# gid: "33"
+# reconnect: ""
+# identityfile: "/root/.ssh/id_rsa"
RUN apt-get -y --no-install-recommends install libreoffice
RUN apt-get -y --no-install-recommends install lftp
RUN apt-get -y --no-install-recommends install sshfs python3 python3-pip
-RUN apt-get -y --no-install-recommends install openssh-server rsyslog wine64
+RUN apt-get -y --no-install-recommends install openssh-server rsyslog wine libwine wine64
+RUN apt-get -y --no-install-recommends install wine wine64
RUN apt-get -y --no-install-recommends install locales
RUN sed -i '/fr_FR.UTF-8/s/^# //g' /etc/locale.gen && \
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 nw-builder@^4
+RUN npm install --unsafe-perm --global uglify-js less sass puppeteer favicons nw-builder@^3
RUN pip3 install font-line
RUN groupadd sudo;useradd -d /application -g 33 -G sudo -s /bin/bash -u 1001 toolbox
#!/bin/sh
cd /docker/fluidbook-toolbox
+#docker plugin install --grant-all-permissions vieux/sshfs sshkey.source=/home/toolbox/www/.docker/config/ssh/root
+#docker volume create -d vieux/sshfs -o sshcmd=vince@paris.cubedesigners.com\:/C:/Sign -o port=22422 -o uid=1001 -o gid=33 -o allow_other -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 codesign
+#docker volume create -d vieux/sshfs -o sshcmd=vincent@paris.cubedesigners.com\:/ -o port=22022 -o uid=1001 -o gid=33 -o allow_other -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 macparis
chown root:root /home/toolbox/www/.docker/config/cron/host;ln -sf /home/toolbox/www/.docker/config/cron/host /etc/cron.d/toolbox
docker network create fluidbook-toolbox
docker compose down
error_log($log);
- return $res;
+ return str_replace('/fluidbook/docs/','/protected/fluidbookpublication/docs/',$res);
}
public static function ping($echo = true, $force = false)
use Cubist\Util\CommandLine;
-class MacOS extends OfflineHTML
+class MacOS extends WindowsZIP
{
- protected $nwplatform = 'osx64';
- protected $nwversion = '0.49.2';
+ protected $nwplatform = 'osx';
+ protected $arch='x64';
+ protected $nwversion = '0.71.0';
protected $node_platform = 'mac';
protected $exenameMaxlength = 28;
public $type = 'mac_exe_html';
+ protected $packageIconExt='icns';
public function makePackage($zip)
return $res;
}
- protected function preparePackage()
- {
- $this->initTempDir();
- $this->copyFluidbookFiles();
- $this->makeJSON();
-
- $this->buildPath = WS_PACKAGER . '/nwbuild/' . $this->version . '/' . $this->book_id;
- if (!file_exists($this->buildPath)) {
- mkdir($this->buildPath, 0777, true);
- }
-
- $cl = new CommandLine('nwbuild');
- $cl->setArg('p', $this->nwplatform);
- $cl->setArg('o', $this->buildPath);
- $cl->setArg('v', $this->nwversion);
- $cl->setArg('winIco', $this->vdir . '/icon.ico');
- $cl->setArg('macIcns', $this->vdir . '/icon.icns');
- $cl->setArg(null, $this->vdir);
- $cl->execute();
- $cl->debug();
-
- $this->replaceFFMpeg();
- if (!file_exists($this->getAppPath())) {
- die('Error while building mac app : ' . $cl->commande . ' // ' . $cl->output);
- }
+ public function signExe()
+ {
$this->signApp();
}
function replaceFFMpeg()
{
- copy(WS_COMPILE_ASSETS . '/_exehtml/_ffmpeg/libffmpeg.dylib', $this->getAppPath() . '/Contents/Frameworks/nwjs Framework.framework/Versions/Current/libffmpeg.dylib');
+ copy($this->resource_path('_ffmpeg/libffmpeg.dylib'), $this->getAppPath() . '/Contents/Frameworks/nwjs Framework.framework/Versions/Current/libffmpeg.dylib');
}
protected function signApp()
protected $node_platform = 'win';
protected $exenameMaxlength = 30;
protected $_compileOnConstruct = true;
+ protected $packageIconExt = 'ico';
+ protected $nwbuildVersion = '3.8.6';
protected $_ext = 'html';
`umask 0000;sudo rm -rf $this->buildPath;mkdir -p 0777 $this->buildPath;chmod -R 777 $this->vdir;mkdir -p 0777 /application/tmp;chmod -R 777 /application/tmp`;
- $cl = new CommandLine('nwbuild');
- $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('winIco', $this->vdir . 'icon.ico');
- $cl->setArg('macIcns', $this->vdir . 'icon.icns');
- $cl->setArg(null, $this->vdir);
- $cl->execute();
+// For
+// $cl = new CommandLine('nwbuild');
+// $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();
+
+ if ($this->nwbuildVersion === 3) {
+ $platform = $this->getNWbuilder3Platform();
+
+ $cl = new CommandLine('nwbuild');
+ $cl->setArg(null, $this->vdir . '**');
+ $cl->setLongArgumentSeparator(' ');
+ $cl->setArg('platforms', $platform);
+ $cl->setArg('buildDir', $this->buildPath);
+ $cl->setArg('version', $this->nwversion);
+ $cl->setArg('mode', 'build');
+ $cl->setArg('flavor', 'normal');
+ if ($this->nwplatform === 'win') {
+ $cl->setArg('winIco', $this->vdir . 'icon.ico');
+ $cl->setArg('useRcedit', 'true');
+ } elseif ($this->nwplatform === 'osx') {
+ $cl->setArg('macIcns', $this->vdir . 'icon.icns');
+ }
+ $cl->execute();
+ } else {
+ $cl = new CommandLine('nwbuild');
+ $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();
+ }
`sudo chown -R 1001:33 $this->buildPath`;
$this->signExe();
}
+ protected function getNWBuilder3Platform()
+ {
+ if ($this->nwplatform === 'osx') {
+ return 'osx64';
+ } else if ($this->nwplatform === 'win') {
+ if ($this->arch === 'x64') {
+ return 'win64';
+ } else {
+ return 'win32';
+ }
+ }
+ }
+
function signExe()
{
- $exe = $this->buildPath . $this->exeName . '.exe';
- $this->_sign($exe);
+ $exe = $this->getFinalPackageDir() . '/' . $this->exeName . '.exe';
+ if (file_exists('/mnt/sshfs/codesign')) {
+ $this->_sign($exe);
+ }
}
function _sign($source, $symbolicLink = false)
*/
function makeJSON()
{
- $data = ['app_name' => $this->appName, 'main' => 'index.html', 'name' => $this->exeName, 'version' => '1.0.' . $this->_time,
+ $data = ['app_name' => $this->appName,
+ 'main' => 'index.html',
+ 'name' => $this->exeName,
+ 'version' => '1.0.' . $this->_time,
+ 'icon' => 'icon.' . $this->packageIconExt,
'webkit' => [],
'window' => [
'height' => 768,
'title' => $this->appName,
'id' => 'main',
'icon' => 'icon.png',
- 'mac_icon' => 'icon.icns'
],
'dependencies' =>
[
public function getFinalPackageDir()
{
- return $this->buildPath;
+ if ($this->nwbuildVersion === 3) {
+ return $this->buildPath . '/' . $this->exeName . '/' . $this->getNWBuilder3Platform();
+ } else {
+ return $this->buildPath;
+ }
}
protected function compile($forceCompile = false)
class FluidbookDocument extends ToolboxModel
{
- public const WS_DOCS = '/application/fluidbook/docs/';
+ public const WS_DOCS = '/application/protected/fluidbookpublication/docs/';
protected $table = 'fluidbook_document';
protected $_options = ['name' => 'fluidbook-document',
'singular' => 'document',
sudo /application/scripts/restartworkers
/application/scripts/updatenpm
sudo chown -R 1001:33 /application/storage/framework
+sudo chown -R 1001:33 /application/storage/framework
php artisan optimize:clear
php artisan cubist:magic:precache
sudo chown -R 1001:33 /application/storage/framework