]> _ Git - cubeextranet.git/commitdiff
wip #819 @10
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Mar 2018 10:41:50 +0000 (10:41 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Mar 2018 10:41:50 +0000 (10:41 +0000)
inc/ws/Util/packager/class.ws.packager.mac.exe.html.php
inc/ws/Util/packager/class.ws.packager.php
inc/ws/Util/packager/class.ws.packager.win.exe.html.php

index e1e0edef578b557c3812723cadac81f0f23a55ee..b94eb073edcba65886fd205b30e9ad7a097969ee 100644 (file)
@@ -2,6 +2,7 @@
 \r
 class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML {\r
        protected $nwplatform = 'osx64';\r
+       protected $nwversion='0.29.0';\r
 \r
        public function __construct($book_id) {\r
                parent::__construct($book_id);\r
@@ -22,4 +23,48 @@ class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML {
                $this->postPackage();\r
                return $res;\r
        }\r
+\r
+       protected function preparePackage() {\r
+               $this->initTempDir();\r
+               $this->copyFluidbookFiles();\r
+               $this->makeJSON();\r
+\r
+               $this->buildPath = WS_PACKAGER . '/nwbuild/' . $this->version . '/' . $this->book_id;\r
+               if (!file_exists($this->buildPath)) {\r
+                       mkdir($this->buildPath, 0777, true);\r
+               }\r
+\r
+//             $cl = new CubeIT_CommandLine('/usr/local/web2exe/web2exe-linux');\r
+//             $cl->setPath(CONVERTER_PATH);\r
+//             $cl->setEnv('TMPDIR', '/home/extranetfiles/tmp');\r
+//             $cl->setLongArgumentSeparator(' ');\r
+//             $cl->setArg('export-to', $this->nwplatform);\r
+//             $cl->setArg('uncompressed-folder');\r
+//             $cl->setArg('title', $this->appName);\r
+//             $cl->setArg('output-dir', $this->buildPath);\r
+//             $cl->setArg('nw-version', $this->nwversion);\r
+//             $cl->setArg('main', 'index.html');\r
+//             $cl->setArg('name', $this->exeName);\r
+//             $cl->setArg('mac-icon', $this->vdir . 'icon.icns');\r
+//             $cl->setArg('exe-icon', $this->vdir . 'icon.ico');\r
+//             $cl->setArg('icon', $this->vdir . 'icon.png');\r
+//             $cl->setArg('width', 1024);\r
+//             $cl->setArg('height', 768);\r
+//             $cl->setArg('app-name', $this->exeName);\r
+//             $cl->setArg('version', '1.0.' . time());\r
+//             $cl->setArg('id', 'com.fluidbook.' . $this->book_id);\r
+//             $cl->setArg('verbose');\r
+//             $cl->setArg(null, $this->vdir);\r
+//             $cl->execute();\r
+\r
+               $cl = new CubeIT_CommandLine('/data/extranet/node_modules/nw-builder/bin/nwbuild');\r
+               $cl->setPath(CONVERTER_PATH);\r
+               $cl->setArg('p', $this->nwplatform);\r
+               $cl->setArg('o', $this->buildPath);\r
+               $cl->setArg('winIco', $this->vdir . '/icon.ico');\r
+               $cl->setArg('macIcns', $this->vdir . '/icon.icns');\r
+               $cl->setArg(null, $this->vdir);\r
+               $cl->execute();\r
+               $cl->debug();\r
+       }\r
 }\r
index d7634ea488abf06746196f39caaed447dd3aed3e..a650591a5c236a37fa4f19670085dd6eb1ddd6a7 100644 (file)
@@ -175,7 +175,6 @@ class wsPackager {
                        $rename = true;
                }
 
-
                $zip = new cubeCommandLine('zip');
                $zip->cd($this->getFinalPackageDir());
                $zip->setArg(null, $zipfile);
index 892cf283497f459b788d441c26de25066afb1e96..09cd6e676a462ea7b74dba992096b92ef26fdc17 100644 (file)
@@ -5,7 +5,8 @@ class wsPackagerWinEXEHTML extends wsPackager {
        protected $exeName;\r
        protected $appName;\r
        protected $buildPath;\r
-       protected $nwplatform = 'win32';\r
+       protected $nwplatform = 'windows-x32';\r
+       protected $nwversion = '0.29.0';\r
 \r
        public function __construct($book_id) {\r
                parent::__construct($book_id, null, true, true);\r
@@ -26,8 +27,6 @@ class wsPackagerWinEXEHTML extends wsPackager {
        protected function preparePackage() {\r
                parent::preparePackage();\r
                $this->copyFluidbookFiles();\r
-               //$this->copyOtherFiles(array('Fluidbook.exe' => $this->exeName));\r
-\r
                $this->makeJSON();\r
 \r
                $this->buildPath = WS_PACKAGER . '/nwbuild/' . $this->version . '/' . $this->book_id;\r
@@ -35,14 +34,40 @@ class wsPackagerWinEXEHTML extends wsPackager {
                        mkdir($this->buildPath, 0777, true);\r
                }\r
 \r
-               $cl = new CubeIT_CommandLine('/data/extranet/node_modules/nw-builder/bin/nwbuild');\r
+               $cl = new CubeIT_CommandLine('/usr/local/web2exe/web2exe-linux');\r
                $cl->setPath(CONVERTER_PATH);\r
-               $cl->setArg('p', $this->nwplatform);\r
-               $cl->setArg('o', $this->buildPath);\r
-               $cl->setArg('winIco', $this->vdir . '/icon.ico');\r
-               $cl->setArg('macIcns', $this->vdir . '/icon.icns');\r
+               $cl->setEnv('TMPDIR', '/home/extranetfiles/tmp');\r
+               $cl->setLongArgumentSeparator(' ');\r
+               $cl->setArg('export-to', $this->nwplatform);\r
+\r
+               $cl->setArg('uncompressed-folder');\r
+               $cl->setArg('title', $this->appName);\r
+               $cl->setArg('output-dir', $this->buildPath);\r
+               $cl->setArg('nw-version', $this->nwversion);\r
+               $cl->setArg('sdk-build');\r
+               $cl->setArg('main', 'index.html');\r
+               $cl->setArg('name', $this->exeName);\r
+               $cl->setArg('mac-icon', $this->vdir . 'icon.icns');\r
+               $cl->setArg('exe-icon', $this->vdir . 'icon.ico');\r
+               $cl->setArg('icon', $this->vdir . 'icon.png');\r
+               $cl->setArg('width', 1024);\r
+               $cl->setArg('height', 768);\r
+               $cl->setArg('app-name', $this->exeName);\r
+               $cl->setArg('version', '1.0.' . time());\r
+               $cl->setArg('id', 'com.fluidbook.' . $this->book_id);\r
+               $cl->setArg('verbose');\r
                $cl->setArg(null, $this->vdir);\r
                $cl->execute();\r
+\r
+               //              $cl = new CubeIT_CommandLine('/data/extranet/node_modules/nw-builder/bin/nwbuild');\r
+               //              $cl->setPath(CONVERTER_PATH);\r
+               //              $cl->setArg('p', $this->nwplatform);\r
+               //              $cl->setArg('o', $this->buildPath);\r
+               //              $cl->setArg('winIco', $this->vdir . '/icon.ico');\r
+               //              $cl->setArg('macIcns', $this->vdir . '/icon.icns');\r
+               //              $cl->setArg(null, $this->vdir);\r
+               //              $cl->execute();\r
+               //              $cl->debug();\r
        }\r
 \r
        function makeJSON() {\r
@@ -51,7 +76,7 @@ class wsPackagerWinEXEHTML extends wsPackager {
                         'window' => ['height' => 768, 'width' => 1024, 'title' => $this->appName, 'id' => 'main', 'icon' => 'icon.png', 'mac_icon' => 'icon.icns']\r
                ];\r
                $pngIcon = $this->vdir . '/icon.png';\r
-               $winIcon = $this->vdir . '/icon.icon';\r
+               $winIcon = $this->vdir . '/icon.ico';\r
                if ($this->theme->parametres->favicon == '') {\r
                        $png = WS_COMPILE_ASSETS . '/fluidbook.png';\r
                        $ico = WS_COMPILE_ASSETS . '/fluidbook.ico';\r