'win-html' => 'zip',
'mac-exe' => 'zip',
'win-cd' => 'zip',
- 'phonegap' => 'zip');
+ 'phonegap' => 'zip',
+ 'mac-exe-html' => 'zip',
+ 'win-exe-html' => 'zip',
+ 'win-inst-html' => 'zip',
+ 'win-cd-html' => 'zip');
$defaultVersion = isset($_POST['version']) ? $_POST['version'] : 'online';
$version = '<tr><td class="right">' . __('Version') . '</td><td>' . form::combo('version', wsUrl::getFluidbookVersions(true), $defaultVersion) . '</td></tr>';
--- /dev/null
+<?php\r
+\r
+class wsPackagerMacEXEHTML extends wsPackagerWinEXEHTML {\r
+ protected $nwplatform = 'osx64';\r
+\r
+ public function __construct($book_id) {\r
+ parent::__construct($book_id);\r
+ $this->version = 'mac-exe-inst';\r
+ $this->book->parametres->alwaysHTML5 = true;\r
+\r
+ $this->exeName = cubeText::str2URL(mb_substr($this->book->parametres->title, 0, 30));\r
+ }\r
+\r
+ public function makePackage($zip) {\r
+ $this->preparePackage();\r
+ $toDelete = ['chromedriver', 'credits.html', 'minidump_stackwalk', 'nwjc', 'payload'];\r
+ foreach ($toDelete as $item) {\r
+ $p = $this->getFinalPackageDir() . '/' . $item;\r
+ `rm -rf "$p"`;\r
+ }\r
+ $res = $this->zip(null);\r
+ $this->postPackage();\r
+ return $res;\r
+ }\r
+}\r
$zip = new cubeCommandLine('zip');
$zip->cd($this->getFinalPackageDir());
$zip->setArg(null, $zipfile);
+ $zip->setArg('symlinks');
$zip->setArg('0');
$zip->setArg('r');
$zip->setArg('u');
protected $exeName;\r
protected $appName;\r
protected $buildPath;\r
+ protected $nwplatform = 'win32';\r
\r
public function __construct($book_id) {\r
parent::__construct($book_id, null, true, true);\r
\r
$cl = new CubeIT_CommandLine('/data/extranet/node_modules/nw-builder/bin/nwbuild');\r
$cl->setPath(CONVERTER_PATH);\r
- $cl->setArg('p', 'win32');\r
+ $cl->setArg('p', $this->nwplatform);\r
$cl->setArg('o', $this->buildPath);\r
$cl->setArg(null, $this->vdir);\r
$cl->execute();\r
}\r
\r
public function getFinalPackageDir() {\r
- return $this->buildPath . '/' . $this->exeName . '/win32';\r
+ return $this->buildPath . '/' . $this->exeName . '/' . $this->nwplatform;\r
}\r
\r
protected function compile() {\r