]> _ Git - cubeextranet.git/commitdiff
wip #819 @0:50
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Mar 2018 16:02:09 +0000 (16:02 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 8 Mar 2018 16:02:09 +0000 (16:02 +0000)
fluidbook/compile/html.inf [new file with mode: 0644]
inc/ws/Util/packager/class.ws.packager.mac.exe.html.php
inc/ws/Util/packager/class.ws.packager.win.cd.html.php

diff --git a/fluidbook/compile/html.inf b/fluidbook/compile/html.inf
new file mode 100644 (file)
index 0000000..70170bc
--- /dev/null
@@ -0,0 +1,5 @@
+[autorun]\r
+label=$title\r
+icon=$nwplatform\package.nw\icon.ico\r
+open=$exe\r
+action=$title
\ No newline at end of file
index b94eb073edcba65886fd205b30e9ad7a097969ee..c2be4bca22e0aeae72719f8cace6297b6245b791 100644 (file)
@@ -2,7 +2,7 @@
 \r
 class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML {\r
        protected $nwplatform = 'osx64';\r
-       protected $nwversion='0.29.0';\r
+       protected $nwversion = '0.29.0';\r
 \r
        public function __construct($book_id) {\r
                parent::__construct($book_id);\r
@@ -19,11 +19,19 @@ class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML {
                        $p = $this->getFinalPackageDir() . '/' . $item;\r
                        `rm -rf "$p"`;\r
                }\r
-               $res = $this->zip(null);\r
+               if ($zip) {\r
+                       $res = $this->zip(null);\r
+               } else {\r
+                       $res = $this->getFinalPackageDir();\r
+               }\r
                $this->postPackage();\r
                return $res;\r
        }\r
 \r
+       public function getFinalPackageDir() {\r
+               return parent::getFinalPackageDir()  . $this->nwplatform . '/';\r
+       }\r
+\r
        protected function preparePackage() {\r
                $this->initTempDir();\r
                $this->copyFluidbookFiles();\r
@@ -34,29 +42,6 @@ class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML {
                        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
index c761b55563db5246cc5f511de13107f1caf5b0cf..d1b37205f0c99664fe8f38ddc04c420a0ad5f08d 100644 (file)
@@ -10,21 +10,23 @@ class wsPackagerWinCDHTML extends wsPackagerWinEXEHTML {
 \r
        protected function preparePackage() {\r
                parent::preparePackage();\r
-\r
-               $this->copyOtherFiles(array(\r
-                       'fluidbook.ico' => 'data/' . $this->nwplatform . '/fluidbook.ico',\r
-                       'autorun.inf',\r
-                       'Fluidbook.app.zip'));\r
                $this->replaceAutorun();\r
+\r
+               // Package mac app\r
+               $mac = wsPackager::package($this->book_id, 'mac-exe-html', false) . '/' . $this->exeName . '.app';\r
+               $dest = $this->getFinalPackageDir();\r
+               `cp -r $mac $dest`;\r
        }\r
 \r
        public function replaceAutorun() {\r
                $inf = file_get_contents($this->vdir . 'autorun.inf');\r
-               $toReplace = array('title' => $this->book->parametres->title, 'exe' => $this->exeName . '.exe');\r
+               $toReplace = array('title' => $this->book->parametres->title, 'exe' => $this->exeName . '.exe', 'nwplatform' => $this->nwplatform);\r
                $inf = $this->replaceContents($inf, $toReplace);\r
                file_put_contents($this->vdir . 'autorun.inf', utf8_decode($inf));\r
+               $this->copy($this->vdir . 'autorun.inf', $this->getFinalPackageDir() . '/autorun.inf');\r
        }\r
 \r
+\r
        protected function postPackage() {\r
 \r
        }\r