\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
$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
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
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
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
'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