]> _ Git - cubeextranet.git/commitdiff
fix #819 @1.5
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 23 Mar 2018 10:50:22 +0000 (10:50 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Fri, 23 Mar 2018 10:50:22 +0000 (10:50 +0000)
fluidbook/compile/html-silent.nsi [new file with mode: 0644]
fluidbook/compile/html.nsi
inc/ws/Controlleur/class.ws.url.php
inc/ws/Util/packager/_common.php
inc/ws/Util/packager/class.ws.packager.php
inc/ws/Util/packager/class.ws.packager.win.inst.html.php
inc/ws/Util/packager/class.ws.packager.win.inst.silent.html.php [new file with mode: 0644]

diff --git a/fluidbook/compile/html-silent.nsi b/fluidbook/compile/html-silent.nsi
new file mode 100644 (file)
index 0000000..6f3810f
--- /dev/null
@@ -0,0 +1,78 @@
+; Fluidbook\r
+;--------------------------------\r
+\r
+!define FLUIDBOOKNAME "$name"\r
+!define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\$fname"\r
+\r
+; The name of the installer\r
+Name "${FLUIDBOOKNAME}"\r
+\r
+; The file to write\r
+OutFile "$output"\r
+\r
+; The default installation directory\r
+InstallDir $LOCALAPPDATA\$fname\r
+\r
+; Request application privileges for Windows Vista\r
+RequestExecutionLevel user\r
+\r
+; Style\r
+XPStyle on\r
+\r
+Icon "$favicon"\r
+\r
+; not released\r
+;TargetMinimalOS 5.0\r
+\r
+; Langues\r
+LoadLanguageFile "$nsisdir/Contrib/Language files/$lang.nlf"\r
+\r
+; Pages\r
+\r
+Page directory\r
+Page instfiles\r
+\r
+; Compression\r
+SetCompress off\r
+\r
+;--------------------------------\r
+\r
+Function .onInit\r
+    SetSilent silent\r
+FunctionEnd\r
+\r
+; The stuff to install\r
+Section "" ;No components page, name is not important\r
+    ; Set output path to the installation directory.\r
+    SetOutPath $INSTDIR\r
+\r
+    ; Put file there\r
+    SetOverwrite ifnewer\r
+    File /a  /r "$fdir\*"\r
+\r
+    ; Create shortcut\r
+    CreateShortCut "$SMPROGRAMS\${FLUIDBOOKNAME}.lnk" "$INSTDIR\$fname.exe" "" "$INSTDIR\package.nw\icon.ico"\r
+    CreateShortCut "$DESKTOP\${FLUIDBOOKNAME}.lnk" "$INSTDIR\$fname.exe" "" "$INSTDIR\package.nw\icon.ico"\r
+\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayName" "${FLUIDBOOKNAME}"\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayIcon" "$\"$INSTDIR\package.nw\icon.ico$\""\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "InstallLocation" "$\"$INSTDIR$\""\r
+    WriteRegDWord HKCU "${REG_UNINSTALL}" "NoModify" 1\r
+    WriteRegDWord HKCU "${REG_UNINSTALL}" "NoRepair" 1\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""\r
+\r
+    WriteUninstaller "$INSTDIR\Uninstall.exe"\r
+\r
+    ExecShell "" "$INSTDIR\$fname.exe"\r
+SectionEnd\r
+\r
+Section "Uninstall"\r
+    DeleteRegKey HKCU "${REG_UNINSTALL}"\r
+    Delete "$SMPROGRAMS\${FLUIDBOOKNAME}.lnk"\r
+    Delete "$DESKTOP\${FLUIDBOOKNAME}.lnk"\r
+    Delete "$INSTDIR\Uninstall.exe"\r
+    RMDIR /r /REBOOTOK $INSTDIR\r
+    SetRebootFlag false\r
+SectionEnd\r
+\r
+\r
index 834179162657476a8e5dea2fcaa54d2387c77ab6..95790fca949ea4d593042f035f101d7ad760d23d 100644 (file)
@@ -35,40 +35,38 @@ Page instfiles
 ; Compression\r
 SetCompress off\r
 \r
-;--------------------------------\r
-\r
 ; The stuff to install\r
 Section "" ;No components page, name is not important\r
+    ; Set output path to the installation directory.\r
+    SetOutPath $INSTDIR\r
 \r
-  ; Set output path to the installation directory.\r
-  SetOutPath $INSTDIR\r
-\r
-  ; Put file there\r
-  File /r "$fdir\*"\r
+    ; Put file there\r
+    SetOverwrite ifnewer\r
+    File /a  /r "$fdir\*"\r
 \r
-  ; Create shortcut\r
-  CreateShortCut "$SMPROGRAMS\${FLUIDBOOKNAME}.lnk" "$INSTDIR\$fname.exe" "" "$INSTDIR\$nwplatform\package.nw\icon.ico"\r
-  CreateShortCut "$DESKTOP\${FLUIDBOOKNAME}.lnk" "$INSTDIR\$fname.exe" "" "$INSTDIR\$nwplatform\package.nw\icon.ico"\r
+    ; Create shortcut\r
+    CreateShortCut "$SMPROGRAMS\${FLUIDBOOKNAME}.lnk" "$INSTDIR\$fname.exe" "" "$INSTDIR\package.nw\icon.ico"\r
+    CreateShortCut "$DESKTOP\${FLUIDBOOKNAME}.lnk" "$INSTDIR\$fname.exe" "" "$INSTDIR\package.nw\icon.ico"\r
 \r
-  WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayName" "${FLUIDBOOKNAME}"\r
-  WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayIcon" "$\"$INSTDIR\$nwplatform\package.nw\icon.ico$\""\r
-  WriteRegStr HKCU "${REG_UNINSTALL}" "InstallLocation" "$\"$INSTDIR$\""\r
-  WriteRegDWord HKCU "${REG_UNINSTALL}" "NoModify" 1\r
-  WriteRegDWord HKCU "${REG_UNINSTALL}" "NoRepair" 1\r
-  WriteRegStr HKCU "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayName" "${FLUIDBOOKNAME}"\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "DisplayIcon" "$\"$INSTDIR\package.nw\icon.ico$\""\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "InstallLocation" "$\"$INSTDIR$\""\r
+    WriteRegDWord HKCU "${REG_UNINSTALL}" "NoModify" 1\r
+    WriteRegDWord HKCU "${REG_UNINSTALL}" "NoRepair" 1\r
+    WriteRegStr HKCU "${REG_UNINSTALL}" "UninstallString" "$\"$INSTDIR\Uninstall.exe$\""\r
 \r
-  WriteUninstaller "$INSTDIR\Uninstall.exe"\r
+    WriteUninstaller "$INSTDIR\Uninstall.exe"\r
 \r
-  ExecShell "" "$INSTDIR\$fname.exe"\r
+    ExecShell "" "$INSTDIR\$fname.exe"\r
 SectionEnd\r
 \r
 Section "Uninstall"\r
-DeleteRegKey HKCU "${REG_UNINSTALL}"\r
-Delete "$SMPROGRAMS\${FLUIDBOOKNAME}.lnk"\r
-Delete "$DESKTOP\${FLUIDBOOKNAME}.lnk"\r
-Delete "$INSTDIR\Uninstall.exe"\r
-RMDIR /r /REBOOTOK $INSTDIR\r
-SetRebootFlag false\r
+    DeleteRegKey HKCU "${REG_UNINSTALL}"\r
+    Delete "$SMPROGRAMS\${FLUIDBOOKNAME}.lnk"\r
+    Delete "$DESKTOP\${FLUIDBOOKNAME}.lnk"\r
+    Delete "$INSTDIR\Uninstall.exe"\r
+    RMDIR /r /REBOOTOK $INSTDIR\r
+    SetRebootFlag false\r
 SectionEnd\r
 \r
 \r
index 862c3c82d7d06952043a762ee8951e351f858859..2d50158b73d1546ca336ccec5242cbd6fa109bb3 100644 (file)
@@ -495,22 +495,15 @@ class wsUrl {
                        $versions['v1'] = array('title' => __('Version online') . ' - V1', 'icon' => cubeMedia::silk('page_white_world.png'));
                        $versions['v2'] = array('title' => __('Version online') . ' - V2', 'icon' => cubeMedia::silk('page_white_world.png'));
                }
-               $versions['win-exe'] = array('title' => __('Version offline') . ' - ' . __('Executable Windows'), 'icon' => cubeMedia::silk('application_view_tile.png'));
-               if ($chooseVersion) {
-                       $versions['win-exe-html'] = array('title' => __('Version offline') . ' - ' . __('Executable Windows') . ' (HTML5)', 'icon' => cubeMedia::silk('application_view_tile.png'));
-               }
-               $versions['win-ins'] = array('title' => __('Version offline') . ' - ' . __('Installeur Auto-executable Windows'), 'icon' => cubeMedia::silk('application_view_tile.png'));
-               if ($chooseVersion) {
-                       $versions['win-ins-html'] = array('title' => __('Version offline') . ' - ' . __('Installeur Auto-executable Windows') . ' (HTML5)', 'icon' => cubeMedia::silk('application_view_tile.png'));
-               }
-               $versions['mac-exe'] = array('title' => __('Version offline') . ' - ' . __('Exécutable Mac OS X'), 'icon' => cubeMedia::image(IMG . '/macos.png'));
-               if ($chooseVersion) {
-                       $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'), 'icon' => cubeMedia::silk('cd.png'));
-               if ($chooseVersion) {
-                       $versions['win-cd-html'] = array('title' => __('Version offline') . ' - ' . __('CD-ROM') . ' / ' . __('Clé USB') . ' (HTML)', 'icon' => cubeMedia::silk('cd.png'));
-               }
+               $versions['win-exe'] = array('title' => __('Version offline') . ' - ' . __('Executable Windows') . ' (Flash)', 'icon' => cubeMedia::silk('application_view_tile.png'));
+               $versions['win-inss-html'] = array('title' => __('Version offline') . ' - ' . __('Executable Windows') . ' (HTML5)', 'icon' => cubeMedia::silk('application_view_tile.png'));
+               $versions['win-ins'] = array('title' => __('Version offline') . ' - ' . __('Installeur Auto-executable Windows') . ' (Flash)', 'icon' => cubeMedia::silk('application_view_tile.png'));
+               $versions['win-ins-html'] = array('title' => __('Version offline') . ' - ' . __('Installeur Auto-executable Windows') . ' (HTML5)', 'icon' => cubeMedia::silk('application_view_tile.png'));
+               $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-html'] = array('title' => __('Version offline') . ' - ' . __('HTML') . ' (' . __('Non adaptée à l\'installation sur un serveur web') . ')', 'icon' => cubeMedia::silk('cd.png'));
                if ($droits->admin) {
                        $versions['phonegap'] = array('title' => __('Version offline') . ' - ' . __('Application mobile'), 'icon' => cubeMedia::image(IMG . '/phonegap.png'));
index 36ff1b463313805b1369b98b31942edca1cefde0..4884d04af9b0fc6cf7d578b0386bb21d634ebf5f 100644 (file)
@@ -10,6 +10,7 @@ $__autoload['wsPackagerMacEXE'] = dirname(__FILE__) . '/class.ws.packager.mac.ex
 \r
 $__autoload['wsPackagerWinEXEHTML'] = dirname(__FILE__) . '/class.ws.packager.win.exe.html.php';\r
 $__autoload['wsPackagerWinINSTHTML'] = dirname(__FILE__) . '/class.ws.packager.win.inst.html.php';\r
+$__autoload['wsPackagerWinINSTSilentHTML'] = dirname(__FILE__) . '/class.ws.packager.win.inst.silent.html.php';\r
 $__autoload['wsPackagerWinCDHTML'] = dirname(__FILE__) . '/class.ws.packager.win.cd.html.php';\r
 $__autoload['wsPackagerMacEXEHTML'] = dirname(__FILE__) . '/class.ws.packager.mac.exe.html.php';\r
 \r
index a650591a5c236a37fa4f19670085dd6eb1ddd6a7..50a589f4122ec77f55f5603b8011dc90db1ab2cc 100644 (file)
@@ -43,6 +43,8 @@ class wsPackager {
                        $packager = new wsPackagerMacEXEHTML($book_id);
                } else if ($version == 'win-ins-html') {
                        $packager = new wsPackagerWinINSTHTML($book_id);
+               } else if ($version == 'win-inss-html') {
+                       $packager = new wsPackagerWinINSTSilentHTML($book_id);
                } else if ($version == 'win-cd-html') {
                        $packager = new wsPackagerWinCDHTML($book_id);
                }
index 6204072df577f740aa803776f40f52a8164658cb..813d99e3e8a8ff710e78d17edfadd2caf8203781 100644 (file)
@@ -3,6 +3,7 @@
 class wsPackagerWinINSTHTML extends wsPackagerWinEXEHTML {\r
 \r
        protected $nsi;\r
+       protected $nsifile='html';\r
 \r
        public function __construct($book_id) {\r
                parent::__construct($book_id);\r
@@ -35,7 +36,7 @@ class wsPackagerWinINSTHTML extends wsPackagerWinEXEHTML {
                $fname = $this->exeName;\r
                $title = $this->appName;\r
 \r
-               $nsi = file_get_contents(WS_COMPILE_ASSETS . '/html.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
@@ -62,6 +63,7 @@ class wsPackagerWinINSTHTML extends wsPackagerWinEXEHTML {
                $makensis = new CubeIT_CommandLine('makensis');\r
                $makensis->setArg(null, $tmp);\r
                $makensis->execute();\r
+               $makensis->debug();\r
 \r
                return $this->getURLBase('exe');\r
        }\r
diff --git a/inc/ws/Util/packager/class.ws.packager.win.inst.silent.html.php b/inc/ws/Util/packager/class.ws.packager.win.inst.silent.html.php
new file mode 100644 (file)
index 0000000..9f41a80
--- /dev/null
@@ -0,0 +1,11 @@
+<?php\r
+\r
+class wsPackagerWinINSTSilentHTML extends wsPackagerWinINSTHTML {\r
+\r
+       protected $nsifile = 'html-silent';\r
+\r
+       public function __construct($book_id) {\r
+               parent::__construct($book_id);\r
+               $this->version = 'win-inss-html';\r
+       }\r
+}
\ No newline at end of file