]> _ Git - cubeextranet.git/commitdiff
done #2004 @1
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 22 Oct 2018 16:34:35 +0000 (16:34 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 22 Oct 2018 16:34:35 +0000 (16:34 +0000)
fluidbook/compile/autorun-html.inf [new file with mode: 0644]
inc/commons/class.common.tools.php
inc/ws/Controlleur/class.ws.url.php
inc/ws/Util/packager/class.ws.packager.win.cd.html.php

diff --git a/fluidbook/compile/autorun-html.inf b/fluidbook/compile/autorun-html.inf
new file mode 100644 (file)
index 0000000..fef2d1d
--- /dev/null
@@ -0,0 +1,5 @@
+[autorun]\r
+label=$title\r
+icon=$exe\r
+open=$exe\r
+action=$title
\ No newline at end of file
index 126adb80c93193587daf1171829699d6f938eeae..ea3e48360264dace66cdd8bd0b1d1496e4a16967 100644 (file)
@@ -557,7 +557,6 @@ class commonTools
        public static function pngToIcns($file, $res)
        {
                if (!file_exists($file)) {
-                       die('!!!!');
                        return;
                }
                $icns = array(128, 256, 512);
index 3d39dfabb99cea75a80e38ee87b8739ca1338755..1bdb53731cfd7626ea514bd44f7a7e1bbeb98df8 100644 (file)
@@ -310,8 +310,8 @@ class wsUrl
 
                $res .= '</ul>';
 
-               $contents=$collection->contents;
-               $theme=$collection->theme;
+               $contents = $collection->contents;
+               $theme = $collection->theme;
 
                foreach ($langs as $l) {
                        $e = explode('_', $l);
@@ -552,7 +552,7 @@ class wsUrl
                $versions['mac-exe'] = array('title' => __('Version offline') . ' - ' . __('Exécutable Mac OS X') . ' (Flash)', 'icon' => cubeMedia::image(IMG . '/macos.png'));
                $versions['mac-exe-html'] = array('title' => __('Version offline') . ' - ' . __('Exécutable Mac OS X') . ' (HTML)', 'icon' => cubeMedia::image(IMG . '/macos.png'));
                $versions['win-cd'] = array('title' => __('Version offline') . ' - ' . __('CD-ROM') . ' / ' . __('Clé USB') . ' (Flash)', 'icon' => cubeMedia::silk('cd.png'));
-               //$versions['win-cd-html'] = array('title' => __('Version offline') . ' - ' . __('CD-ROM') . ' / ' . __('Clé USB') . ' (HTML)', 'icon' => cubeMedia::silk('cd.png'));
+               $versions['win-cd-html'] = array('title' => __('Version offline') . ' - ' . __('CD-ROM') . ' / ' . __('Clé USB') . ' (HTML)', 'icon' => cubeMedia::silk('cd.png'));
 
                $versions['win-html'] = array('title' => __('Version offline') . ' - ' . __('HTML') . ' (' . __('Non adaptée à l\'installation sur un serveur web') . ')', 'icon' => cubeMedia::silk('cd.png'));
                if ($droits->admin) {
index d1b37205f0c99664fe8f38ddc04c420a0ad5f08d..26b6d076b69204e9effb0895f63bf77d0bff3e44 100644 (file)
@@ -1,33 +1,39 @@
 <?php\r
 \r
-class wsPackagerWinCDHTML extends wsPackagerWinEXEHTML {\r
+class wsPackagerWinCDHTML extends wsPackagerMacEXEHTML\r
+{\r
 \r
-       public function __construct($book_id) {\r
+       public function __construct($book_id)\r
+       {\r
                parent::__construct($book_id);\r
                $this->book->parametres->alwaysHTML5 = true;\r
                $this->version = 'win-cd-html';\r
        }\r
 \r
-       protected function preparePackage() {\r
+       protected function preparePackage()\r
+       {\r
                parent::preparePackage();\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
+               $win = ROOT . wsPackager::package($this->book_id, 'win-inss-html', false, false);\r
+\r
+               $dest = $this->getFinalPackageDir() . "/" . $this->exeName . '.exe';\r
+               $cp = "cp $win $dest";\r
+               `$cp`;\r
        }\r
 \r
-       public function replaceAutorun() {\r
-               $inf = file_get_contents($this->vdir . 'autorun.inf');\r
+       public function replaceAutorun()\r
+       {\r
+               $inf = file_get_contents(WS_COMPILE_ASSETS . '/autorun-html.inf');\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
+               file_put_contents($this->getFinalPackageDir() . '/autorun.inf', utf8_decode($inf));\r
        }\r
 \r
 \r
-       protected function postPackage() {\r
+       protected function postPackage()\r
+       {\r
 \r
        }\r
 \r