From: vincent@cubedesigners.com Date: Mon, 26 Mar 2018 10:34:58 +0000 (+0000) Subject: #819 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=0e3a3ad09e2a2409bed2709c3f3dd17a17a0faff;p=cubeextranet.git #819 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index 2ae40c71b..3a8ef1c11 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -1732,7 +1732,7 @@ class wsHTML5Compiler { public function unzipFile($file, $moveAssets = false, $baseDir = null) { - $fdir = is_null($baseDir) ? 'data/links/' . $file : $baseDir; + $fdir = is_null($baseDir) ? 'data/links/' . str_replace('.', '_', $file) : $baseDir; $tmp = CubeIT_Files::tmpdir(); $dir = $tmp . '/' . $fdir; 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 14ada3252..45528e9e4 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 @@ -6,7 +6,7 @@ class wsPackagerWinEXEHTML extends wsPackager { protected $appName; protected $buildPath; protected $nwplatform = 'windows-x32'; - protected $nwversion = '0.29.0'; + protected $nwversion = '0.29.2'; protected $appversion = ''; public function __construct($book_id) { @@ -32,11 +32,8 @@ class wsPackagerWinEXEHTML extends wsPackager { $this->makeJSON(); $this->buildPath = WS_PACKAGER . '/nwbuild/' . $this->version . '/' . $this->book_id; - if (!file_exists($this->buildPath)) { - mkdir($this->buildPath . '/win32/', 0777, true); - } - `rm -rf /home/extranetfiles/tmp/webexectemp/$this->appName.nwf/`; + //`rm -rf /home/extranetfiles/tmp/webexectemp/$this->appName.nwf/`; $cl = new CubeIT_CommandLine('/usr/local/web2exe/web2exe-linux'); $cl->setPath(CONVERTER_PATH); @@ -47,7 +44,7 @@ class wsPackagerWinEXEHTML extends wsPackager { $cl->setArg('title', $this->appName); $cl->setArg('output-dir', $this->buildPath); $cl->setArg('nw-version', $this->nwversion); - $cl->setArg('sdk-build'); + //$cl->setArg('sdk-build'); $cl->setArg('main', 'index.html'); $cl->setArg('name', $this->exeName); $cl->setArg('mac-icon', $this->vdir . 'icon.icns'); @@ -62,47 +59,8 @@ class wsPackagerWinEXEHTML extends wsPackager { $cl->setArg(null, $this->vdir); $cl->execute(); $cl->debug(); - - // $this->compileShortcut(); - } - // function compileShortcut() { - // $tmp = CubeIT_Files::tmpdir(); - // - // $files = array('fluidbook.cpp', 'fluidbook.rc'); - // $vars = array('icofile' => $this->vdir . '/icon.ico', - // 'exename' => $this->exeName, - // 'platform' => $this->nwplatform, - // 'appversion' => $this->appversion, - // 'appname' => $this->appName); - // foreach ($files as $file) { - // $c = file_get_contents(WS_COMPILE_ASSETS . '/_exehtml/exeshortcut/' . $file); - // foreach ($vars as $k => $v) { - // $c = str_replace('$' . $k, $v, $c); - // } - // file_put_contents($tmp . '/' . $file, $c); - // } - // - // $cl = new CubeIT_CommandLine('i686-w64-mingw32-windres'); - // $cl->setPath(CONVERTER_PATH); - // $cl->setArg(null, $tmp . '/fluidbook.rc'); - // $cl->setArg('O', 'coff'); - // $cl->setArg('o', $tmp . '/fluidbook.res'); - // $cl->execute(); - // $cl->debug(); - // - // $cl = new CubeIT_CommandLine('i686-w64-mingw32-g++'); - // $cl->setPath(CONVERTER_PATH); - // $cl->setManualArg('-lmingw32'); - // $cl->setManualArg('-mwindows'); - // $cl->setArg('o', $this->buildPath . '/' . $this->exeName . '/' . $this->exeName . '.exe'); - // $cl->setArg(null, $tmp . '/fluidbook.cpp'); - // $cl->setArg(null, $tmp . '/fluidbook.res'); - // $cl->execute(); - // $cl->debug(); - // } - function makeJSON() { $data = ['app_name' => $this->appName, 'main' => 'index.html', 'name' => $this->exeName, 'version' => '1.0.' . time(), 'webkit' => [], diff --git a/inc/ws/Util/packager/class.ws.packager.win.inst.html.php b/inc/ws/Util/packager/class.ws.packager.win.inst.html.php index 813d99e3e..6c20d46b3 100644 --- a/inc/ws/Util/packager/class.ws.packager.win.inst.html.php +++ b/inc/ws/Util/packager/class.ws.packager.win.inst.html.php @@ -3,7 +3,7 @@ class wsPackagerWinINSTHTML extends wsPackagerWinEXEHTML { protected $nsi; - protected $nsifile='html'; + protected $nsifile = 'html'; public function __construct($book_id) { parent::__construct($book_id); @@ -36,7 +36,7 @@ class wsPackagerWinINSTHTML extends wsPackagerWinEXEHTML { $fname = $this->exeName; $title = $this->appName; - $nsi = file_get_contents(WS_COMPILE_ASSETS . '/'.$this->nsifile.'.nsi'); + $nsi = file_get_contents(WS_COMPILE_ASSETS . '/' . $this->nsifile . '.nsi'); $nsi = str_replace('$name', utf8_decode($title), $nsi); $nsi = str_replace('$htmldir', utf8_decode(WS_COMPILE_ASSETS), $nsi); $nsi = str_replace('$fname', $fname, $nsi);