protected $appName;\r
protected $buildPath;\r
protected $nwplatform = 'windows-x32';\r
- protected $nwversion = '0.29.0';\r
+ protected $nwversion = '0.29.2';\r
protected $appversion = '';\r
\r
public function __construct($book_id) {\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 . '/win32/', 0777, true);\r
- }\r
\r
- `rm -rf /home/extranetfiles/tmp/webexectemp/$this->appName.nwf/`;\r
+ //`rm -rf /home/extranetfiles/tmp/webexectemp/$this->appName.nwf/`;\r
\r
$cl = new CubeIT_CommandLine('/usr/local/web2exe/web2exe-linux');\r
$cl->setPath(CONVERTER_PATH);\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('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(null, $this->vdir);\r
$cl->execute();\r
$cl->debug();\r
-\r
- // $this->compileShortcut();\r
-\r
}\r
\r
- // function compileShortcut() {\r
- // $tmp = CubeIT_Files::tmpdir();\r
- //\r
- // $files = array('fluidbook.cpp', 'fluidbook.rc');\r
- // $vars = array('icofile' => $this->vdir . '/icon.ico',\r
- // 'exename' => $this->exeName,\r
- // 'platform' => $this->nwplatform,\r
- // 'appversion' => $this->appversion,\r
- // 'appname' => $this->appName);\r
- // foreach ($files as $file) {\r
- // $c = file_get_contents(WS_COMPILE_ASSETS . '/_exehtml/exeshortcut/' . $file);\r
- // foreach ($vars as $k => $v) {\r
- // $c = str_replace('$' . $k, $v, $c);\r
- // }\r
- // file_put_contents($tmp . '/' . $file, $c);\r
- // }\r
- //\r
- // $cl = new CubeIT_CommandLine('i686-w64-mingw32-windres');\r
- // $cl->setPath(CONVERTER_PATH);\r
- // $cl->setArg(null, $tmp . '/fluidbook.rc');\r
- // $cl->setArg('O', 'coff');\r
- // $cl->setArg('o', $tmp . '/fluidbook.res');\r
- // $cl->execute();\r
- // $cl->debug();\r
- //\r
- // $cl = new CubeIT_CommandLine('i686-w64-mingw32-g++');\r
- // $cl->setPath(CONVERTER_PATH);\r
- // $cl->setManualArg('-lmingw32');\r
- // $cl->setManualArg('-mwindows');\r
- // $cl->setArg('o', $this->buildPath . '/' . $this->exeName . '/' . $this->exeName . '.exe');\r
- // $cl->setArg(null, $tmp . '/fluidbook.cpp');\r
- // $cl->setArg(null, $tmp . '/fluidbook.res');\r
- // $cl->execute();\r
- // $cl->debug();\r
- // }\r
-\r
function makeJSON() {\r
$data = ['app_name' => $this->appName, 'main' => 'index.html', 'name' => $this->exeName, 'version' => '1.0.' . time(),\r
'webkit' => [],\r
class wsPackagerWinINSTHTML extends wsPackagerWinEXEHTML {\r
\r
protected $nsi;\r
- protected $nsifile='html';\r
+ protected $nsifile = 'html';\r
\r
public function __construct($book_id) {\r
parent::__construct($book_id);\r
$fname = $this->exeName;\r
$title = $this->appName;\r
\r
- $nsi = file_get_contents(WS_COMPILE_ASSETS . '/'.$this->nsifile.'.nsi');\r
+ $nsi = file_get_contents(WS_COMPILE_ASSETS . '/' . $this->nsifile . '.nsi');\r
$nsi = str_replace('$name', utf8_decode($title), $nsi);\r
$nsi = str_replace('$htmldir', utf8_decode(WS_COMPILE_ASSETS), $nsi);\r
$nsi = str_replace('$fname', $fname, $nsi);\r