Merge lp:ocsinventory-windows-server/stable-1.3 into lp:~dliroulet/ocsinventory-windows-server/trunk
- 1.3
- Merge into trunk
Proposed by
Didier Liroulet
Status: | Superseded |
---|---|
Proposed branch: | lp:ocsinventory-windows-server/stable-1.3 |
Merge into: | lp:~dliroulet/ocsinventory-windows-server/trunk |
Diff against target: |
2476 lines (+1345/-1112) 3 files modified
OCSNG-Windows-Server-Setup.nsi (+1210/-0) OcsWin32ServerSetup.nsi (+0/-1112) Readme.txt (+135/-0) |
To merge this branch: | bzr merge lp:ocsinventory-windows-server/stable-1.3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Didier Liroulet | Approve | ||
Review via email: mp+24070@code.launchpad.net |
Commit message
Description of the change
Rename NSIS Project file to OCSNG-windows-
Update to use XAMPP 1.7.3+XML::Simple 2.18 module
XAMPP Perl addon is no more needed with XAMPP 1.7.3
Include 1.3 server sources
To post a comment you must log in.
- 20. By Didier Liroulet
-
Disable Perl tainting in mod_perl
Revision history for this message
Didier Liroulet (dliroulet) : | # |
review:
Approve
- 21. By Didier Liroulet
-
Fix Xampp installation path not working for drive:\
Unmerged revisions
- 21. By Didier Liroulet
-
Fix Xampp installation path not working for drive:\
- 20. By Didier Liroulet
-
Disable Perl tainting in mod_perl
- 19. By Didier Liroulet
-
Update to use XAMPP 1.7.3+XML::Simple 2.18 module, but without XAMPP Perl addon. Also include 1.3 server sources
- 18. By Didier Liroulet
-
RTename NSIS projet file
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'OCSInventory.ico' |
2 | Binary files OCSInventory.ico 1970-01-01 00:00:00 +0000 and OCSInventory.ico 2010-05-08 06:35:34 +0000 differ |
3 | === added file 'OCSNG-Windows-Server-Setup.nsi' |
4 | --- OCSNG-Windows-Server-Setup.nsi 1970-01-01 00:00:00 +0000 |
5 | +++ OCSNG-Windows-Server-Setup.nsi 2010-05-08 06:35:34 +0000 |
6 | @@ -0,0 +1,1210 @@ |
7 | +################################################################################ |
8 | +## OCS Inventory NG Server For Windows Setup |
9 | +## Copyleft Didier LIROULET 2006 |
10 | +## Web : http://ocsinventory.sourceforge.net |
11 | +## |
12 | +## This code is open source and may be copied and modified as long as the source |
13 | +## code is always made freely available. |
14 | +## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt |
15 | +################################################################################ |
16 | + |
17 | +;---------------------------------------------------------------------------- |
18 | +; Installer properties |
19 | +;---------------------------------------------------------------------------- |
20 | + |
21 | +; Use bzip2 compressor, better compress to the other |
22 | +SetCompressor bzip2 |
23 | +; Installer default properties |
24 | +Name "OCS Inventory NG" |
25 | +; Caption "${PRODUCT_NAME}" |
26 | +; Check file date and CRC |
27 | +SetDateSave on |
28 | +SetDatablockOptimize on |
29 | +CRCCheck on |
30 | +; No silent install |
31 | +SilentInstall normal |
32 | +; Create setup file |
33 | +OutFile "OCSNG-Windows-Server-Setup.exe" |
34 | +; Default install location |
35 | +InstallDir "C:\Xampp" |
36 | +; Show install/uninstall logs |
37 | +ShowInstDetails show |
38 | +ShowUnInstDetails show |
39 | +; Install XAMPP + OCS Server (Full) or OCS Server only (Minimal) |
40 | +InstType "Full" |
41 | +InstType "Minimal" |
42 | + |
43 | + |
44 | +;---------------------------------------------------------------------------- |
45 | +; Product informations |
46 | +;---------------------------------------------------------------------------- |
47 | +!define PRODUCT_NAME "OCS Inventory NG" |
48 | +!define PRODUCT_VERSION "1.3.2" |
49 | +!define PRODUCT_PUBLISHER "OCS Inventory NG Team" |
50 | +!define PRODUCT_WEB_SITE "http://www.ocsinventory-ng.org" |
51 | +!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" |
52 | +!define PRODUCT_UNINST_ROOT_KEY "HKLM" |
53 | +!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" |
54 | +BRANDINGTEXT "${PRODUCT_NAME} Server for Windows ${PRODUCT_VERSION}" |
55 | + |
56 | +; OCS Inventory NG Server Internal Version |
57 | +!define Compile_version "5.0.0.5" |
58 | +; XAMPP Server file setup and version |
59 | +!define XAMPP_SERVER_FILE "xampp-win32-1.7.3.zip" |
60 | +!define XAMPP_SERVER_VERSION "1.7.3" |
61 | +!define APACHE_FILE_VERSION "2.2.14.0" |
62 | +!define APACHE_SERVICE_NAME_DEFAULT "Apache2.2" |
63 | +; Perl Addon no more used because included in 1.7.3 ZIP file |
64 | +; XAMPP Perl addon file and version |
65 | +;!define XAMPP_PERL_FILE "xampp-win32-perl-addon-5.10.0-2.2.11-pl2.zip" |
66 | +;!define XAMPP_PERL_VERSION "5.10.0" |
67 | +; XML::Simple Perl module |
68 | +!define XML_SIMPLE_PATH "XML-Simple-2.18" |
69 | +; Default settings for max deployement package size en MB |
70 | +!define MAX_DEPLOY_PACKAGE_SIZE "128" |
71 | + |
72 | +;---------------------------------------------------------------------------- |
73 | +; Installer UI settings |
74 | +;---------------------------------------------------------------------------- |
75 | +; MUI 1.67 compatible ------ |
76 | +!include "MUI.nsh" |
77 | +; MUI Settings |
78 | +!define MUI_ABORTWARNING |
79 | +!define MUI_ICON "OCSInventory.ico" |
80 | +!define MUI_UNICON "OCSInventory.ico" |
81 | +; Language Selection Dialog Settings |
82 | +!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" |
83 | +!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" |
84 | +!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" |
85 | +; Welcome page properties |
86 | +!define MUI_WELCOMEPAGE_TITLE_3LINES |
87 | +!insertmacro MUI_PAGE_WELCOME |
88 | +; License page properties |
89 | +;!define MUI_LICENSEPAGE_RADIOBUTTONS |
90 | +!define MUI_LICENSEPAGE_CHECKBOX |
91 | +!insertmacro MUI_PAGE_LICENSE "License.txt" |
92 | +; Directory page properties |
93 | +!insertmacro MUI_PAGE_DIRECTORY |
94 | +; Components page properties |
95 | +!insertmacro MUI_PAGE_COMPONENTS |
96 | +; Start menu page properties |
97 | +var ICONS_GROUP |
98 | +!define MUI_STARTMENUPAGE_NODISABLE |
99 | +!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${PRODUCT_NAME}" |
100 | +!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" |
101 | +!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" |
102 | +!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" |
103 | +!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP |
104 | +; Instfiles page properties |
105 | +!insertmacro MUI_PAGE_INSTFILES |
106 | +; Finish page properties |
107 | +!define MUI_FINISHPAGE_TITLE_3LINES |
108 | +!define MUI_FINISHPAGE_RUN |
109 | +!define MUI_FINISHPAGE_RUN_TEXT "Review XAMPP Security (Recommended)" |
110 | +!define MUI_FINISHPAGE_RUN_FUNCTION "StartXamppConfig" |
111 | +!insertmacro MUI_PAGE_FINISH |
112 | +; Uninstaller pages |
113 | +!insertmacro MUI_UNPAGE_INSTFILES |
114 | +; Language files |
115 | +!insertmacro MUI_LANGUAGE "English" |
116 | +!insertmacro MUI_LANGUAGE "French" |
117 | +!insertmacro MUI_LANGUAGE "German" |
118 | +!insertmacro MUI_LANGUAGE "Hungarian" |
119 | +!insertmacro MUI_LANGUAGE "Italian" |
120 | +!insertmacro MUI_LANGUAGE "Polish" |
121 | +!insertmacro MUI_LANGUAGE "Portuguese" |
122 | +!insertmacro MUI_LANGUAGE "PortugueseBR" |
123 | +!insertmacro MUI_LANGUAGE "Spanish" |
124 | +!insertmacro MUI_LANGUAGE "Russian" |
125 | +!insertmacro MUI_LANGUAGE "Turkish" |
126 | +; Reserve files |
127 | +!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS |
128 | + |
129 | + |
130 | +;---------------------------------------------------------------------------- |
131 | +; Plugins used |
132 | +;---------------------------------------------------------------------------- |
133 | + |
134 | +; Use File functions standard NSIS plugin (http://nsis.sourceforge.net/Docs/AppendixE.html) |
135 | +!include "FileFunc.nsh" |
136 | +!insertmacro GetParent |
137 | +!insertmacro GetFileVersion |
138 | +; Use TextReplace plugin (http://nsis.sourceforge.net/TextReplace_plugin) |
139 | +!include "TextReplace.nsh" |
140 | +; Use Logic Library plugin (http://nsis.sourceforge.net/LogicLib) |
141 | +!include "LogicLib.nsh" |
142 | +; Use Registry plugin (http://nsis.sourceforge.net/Registry_plug-in) |
143 | +!include "Registry.nsh" |
144 | +; Use ZipDLL plugin (http://nsis.sourceforge.net/ZipDLL_plug-in) |
145 | +; Use services plugin (http://nsis.sourceforge.net/Services_plug-in) |
146 | + |
147 | + |
148 | + |
149 | +;---------------------------------------------------------------------------- |
150 | +; Version Information section |
151 | +;---------------------------------------------------------------------------- |
152 | +VIProductVersion "${Compile_version}" |
153 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" |
154 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "${PRODUCT_NAME} ${PRODUCT_VERSION} Server for Windows Setup" |
155 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}" |
156 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "${PRODUCT_NAME}. Inventory and package deployement tool under GNU Licence." |
157 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${PRODUCT_PUBLISHER} ${PRODUCT_WEB_SITE}" |
158 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "OCSNG-Windows-Server-Setup.exe" |
159 | +VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${Compile_version}" |
160 | + |
161 | + |
162 | +;---------------------------------------------------------------------------- |
163 | +; Global variables |
164 | +;---------------------------------------------------------------------------- |
165 | +; Apache service name |
166 | +var APACHE_SERVICE_NAME |
167 | +; Is XAMPP and Perl Addon installed ? |
168 | +var XAMPP_PERL_AVAILABLE |
169 | +; XAMPP Parent Install Folder |
170 | +var XAMPP_PARENT_FOLDER |
171 | + |
172 | + |
173 | +;---------------------------------------------------------------------------- |
174 | +; Just open web browser on XAMPP Security configuration page |
175 | +;---------------------------------------------------------------------------- |
176 | +Function StartXamppConfig |
177 | + ExecShell "open" "http://localhost/security/index.php" |
178 | +FunctionEnd |
179 | + |
180 | + |
181 | +;---------------------------------------------------------------------------- |
182 | +; Get displayed name of Apache service |
183 | +; |
184 | +; Old version of XAMPP set Apache as service name |
185 | +; Since XAMPP 1.6, Apache service name is Apache2.2 |
186 | +; So, if XAMPP is already installed, we must find apache service name |
187 | +; |
188 | +; If Apache web Server not installed, set it to APACHE_SERVICE_NAME_DEFAULT |
189 | +;---------------------------------------------------------------------------- |
190 | +Function GetApacheServiceName |
191 | + Push $0 |
192 | + StrCpy $APACHE_SERVICE_NAME "" |
193 | + services::GetServiceNameFromDisplayName "Apache" |
194 | + Pop $0 |
195 | + ${If} $0 <> 1 |
196 | + StrCpy $APACHE_SERVICE_NAME "${APACHE_SERVICE_NAME_DEFAULT}" |
197 | + ${Else} |
198 | + IntOp $0 $0 - 1 |
199 | + Pop $APACHE_SERVICE_NAME |
200 | + ${EndIf} |
201 | + Pop $0 |
202 | +FunctionEnd |
203 | + |
204 | + |
205 | +;---------------------------------------------------------------------------- |
206 | +; Get XAMPP setup parent folder |
207 | +; |
208 | +; Because include xampp\something directory structure, we must unzip XAMPP |
209 | +; in parent folder |
210 | +; This function set in $XAMPP_PARENT_FOLDER |
211 | +;---------------------------------------------------------------------------- |
212 | +Function GetXamppParentFolder |
213 | + Push $0 |
214 | + Push $1 |
215 | + ${GetParent} $INSTDIR $0 |
216 | + Strlen $1 $0 |
217 | + ${If} $1 < 3 |
218 | + StrCpy $INSTDIR "C:\Xampp" |
219 | + StrCpy $XAMPP_PARENT_FOLDER "C:\" |
220 | + ${Else} |
221 | + StrCpy $XAMPP_PARENT_FOLDER "$0\" |
222 | + ${EndIf} |
223 | + Pop $1 |
224 | + Pop $0 |
225 | +FunctionEnd |
226 | + |
227 | + |
228 | +;---------------------------------------------------------------------------- |
229 | +; StrSlash |
230 | +; Author: dirtydingus |
231 | +; |
232 | +; Slash to Backslash converter. |
233 | +; Call it with the haystack and the direction on the stack as shown in the comment above it |
234 | +; Push $filenamestring (e.g. 'c:\this\and\that\filename.htm') |
235 | +; Push "\" |
236 | +; Call StrSlash |
237 | +; Pop $R0 |
238 | +; ;Now $R0 contains 'c:/this/and/that/filename.htm' |
239 | +;---------------------------------------------------------------------------- |
240 | +Function StrSlash |
241 | + Exch $R3 ; $R3 = needle ("\" or "/") |
242 | + Exch |
243 | + Exch $R1 ; $R1 = String to replacement in (haystack) |
244 | + Push $R2 ; Replaced haystack |
245 | + Push $R4 ; $R4 = not $R3 ("/" or "\") |
246 | + Push $R6 |
247 | + Push $R7 ; Scratch reg |
248 | + StrCpy $R2 "" |
249 | + StrLen $R6 $R1 |
250 | + StrCpy $R4 "\" |
251 | + StrCmp $R3 "/" loop |
252 | + StrCpy $R4 "/" |
253 | +loop: |
254 | + StrCpy $R7 $R1 1 |
255 | + StrCpy $R1 $R1 $R6 1 |
256 | + StrCmp $R7 $R3 found |
257 | + StrCpy $R2 "$R2$R7" |
258 | + StrCmp $R1 "" done loop |
259 | +found: |
260 | + StrCpy $R2 "$R2$R4" |
261 | + StrCmp $R1 "" done loop |
262 | +done: |
263 | + StrCpy $R3 $R2 |
264 | + Pop $R7 |
265 | + Pop $R6 |
266 | + Pop $R4 |
267 | + Pop $R2 |
268 | + Pop $R1 |
269 | + Exch $R3 |
270 | +FunctionEnd |
271 | + |
272 | +;---------------------------------------------------------------------------- |
273 | +; RemoveAfterLine |
274 | +; Author: Afrow UK |
275 | +; |
276 | +; This function deletes lines from a line (including that line) to another line (also including that line) |
277 | +; Push "$EXEDIR\file.ext" ;file |
278 | +; Push "start line$\r$\n" ;line to start deleting from |
279 | +; Push "finish line$\r$\n" ;line to stop deleting at |
280 | +; Call RemoveAfterLine |
281 | +;---------------------------------------------------------------------------- |
282 | +Function RemoveAfterLine |
283 | + Exch $1 ;end string |
284 | + Exch |
285 | + Exch $2 ;begin string |
286 | + Exch 2 |
287 | + Exch $3 ;file |
288 | + Exch 2 |
289 | + Push $R0 |
290 | + Push $R1 |
291 | + Push $R2 |
292 | + Push $R3 |
293 | + GetTempFileName $R2 |
294 | + FileOpen $R1 $R2 w |
295 | + FileOpen $R0 $3 r |
296 | + ClearErrors |
297 | + FileRead $R0 $R3 |
298 | + IfErrors Done |
299 | + StrCmp $R3 $2 +3 |
300 | + FileWrite $R1 $R3 |
301 | + Goto -5 |
302 | + ClearErrors |
303 | + FileRead $R0 $R3 |
304 | + IfErrors Done |
305 | + StrCmp $R3 $1 +4 -3 |
306 | + FileRead $R0 $R3 |
307 | + IfErrors Done |
308 | + FileWrite $R1 $R3 |
309 | + ClearErrors |
310 | + Goto -4 |
311 | +Done: |
312 | + FileClose $R0 |
313 | + FileClose $R1 |
314 | + SetDetailsPrint none |
315 | + Delete $3 |
316 | + Rename $R2 $3 |
317 | + SetDetailsPrint both |
318 | + Pop $R3 |
319 | + Pop $R2 |
320 | + Pop $R1 |
321 | + Pop $R0 |
322 | + Pop $3 |
323 | + Pop $2 |
324 | + Pop $1 |
325 | +FunctionEnd |
326 | + |
327 | +;---------------------------------------------------------------------------- |
328 | +; WriteToFile |
329 | +; Author: Afrow UK |
330 | +; |
331 | +; This is a simple function to write a piece of text to a file. This will write to the end always. |
332 | +; Push "hello$\r$\n" ;text to write to file |
333 | +; Push "$INSTDIR\log.txt" ;file to write to |
334 | +; Call WriteToFile |
335 | +;---------------------------------------------------------------------------- |
336 | +Function WriteToFile |
337 | + Exch $0 ;file to write to |
338 | + Exch |
339 | + Exch $1 ;text to write |
340 | + FileOpen $0 $0 a #open file |
341 | + FileSeek $0 0 END #go to end |
342 | + FileWrite $0 $1 #write to file |
343 | + FileClose $0 |
344 | + Pop $1 |
345 | + Pop $0 |
346 | +FunctionEnd |
347 | + |
348 | +;---------------------------------------------------------------------------- |
349 | +; VersionCompare |
350 | +; Author: Instructor |
351 | +; |
352 | +; Compare version numbers. |
353 | +; Syntax: |
354 | +; ${VersionCompare} "[Version1]" "[Version2]" $var |
355 | +; "[Version1]" ; First version |
356 | +; "[Version2]" ; Second version |
357 | +; $var ; Result: |
358 | +; ; $var=0 Versions are equal |
359 | +; ; $var=1 Version1 is newer |
360 | +; ; $var=2 Version2 is newer |
361 | +;---------------------------------------------------------------------------- |
362 | +Function VersionCompare |
363 | + !define VersionCompare `!insertmacro VersionCompareCall` |
364 | + !macro VersionCompareCall _VER1 _VER2 _RESULT |
365 | + Push `${_VER1}` |
366 | + Push `${_VER2}` |
367 | + Call VersionCompare |
368 | + Pop ${_RESULT} |
369 | + !macroend |
370 | + Exch $1 |
371 | + Exch |
372 | + Exch $0 |
373 | + Exch |
374 | + Push $2 |
375 | + Push $3 |
376 | + Push $4 |
377 | + Push $5 |
378 | + Push $6 |
379 | + Push $7 |
380 | +begin: |
381 | + StrCpy $2 -1 |
382 | + IntOp $2 $2 + 1 |
383 | + StrCpy $3 $0 1 $2 |
384 | + StrCmp $3 '' +2 |
385 | + StrCmp $3 '.' 0 -3 |
386 | + StrCpy $4 $0 $2 |
387 | + IntOp $2 $2 + 1 |
388 | + StrCpy $0 $0 '' $2 |
389 | + StrCpy $2 -1 |
390 | + IntOp $2 $2 + 1 |
391 | + StrCpy $3 $1 1 $2 |
392 | + StrCmp $3 '' +2 |
393 | + StrCmp $3 '.' 0 -3 |
394 | + StrCpy $5 $1 $2 |
395 | + IntOp $2 $2 + 1 |
396 | + StrCpy $1 $1 '' $2 |
397 | + StrCmp $4$5 '' equal |
398 | + StrCpy $6 -1 |
399 | + IntOp $6 $6 + 1 |
400 | + StrCpy $3 $4 1 $6 |
401 | + StrCmp $3 '0' -2 |
402 | + StrCmp $3 '' 0 +2 |
403 | + StrCpy $4 0 |
404 | + StrCpy $7 -1 |
405 | + IntOp $7 $7 + 1 |
406 | + StrCpy $3 $5 1 $7 |
407 | + StrCmp $3 '0' -2 |
408 | + StrCmp $3 '' 0 +2 |
409 | + StrCpy $5 0 |
410 | + StrCmp $4 0 0 +2 |
411 | + StrCmp $5 0 begin newer2 |
412 | + StrCmp $5 0 newer1 |
413 | + IntCmp $6 $7 0 newer1 newer2 |
414 | + StrCpy $4 '1$4' |
415 | + StrCpy $5 '1$5' |
416 | + IntCmp $4 $5 begin newer2 newer1 |
417 | +equal: |
418 | + StrCpy $0 0 |
419 | + goto end |
420 | +newer1: |
421 | + StrCpy $0 1 |
422 | + goto end |
423 | +newer2: |
424 | + StrCpy $0 2 |
425 | +end: |
426 | + Pop $7 |
427 | + Pop $6 |
428 | + Pop $5 |
429 | + Pop $4 |
430 | + Pop $3 |
431 | + Pop $2 |
432 | + Pop $1 |
433 | + Exch $0 |
434 | +FunctionEnd |
435 | + |
436 | + |
437 | +;---------------------------------------------------------------------------- |
438 | +; Overide OnInit function to check previous installation |
439 | +;---------------------------------------------------------------------------- |
440 | +Function .onInit |
441 | + ; Prevent Multiple Instances |
442 | + System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${PRODUCT_NAME}") i .r1 ?e' |
443 | + Pop $R0 |
444 | + StrCmp $R0 0 SETUP_NOT_RUNNING |
445 | + ; Setup is already running, abort |
446 | + MessageBox MB_OK|MB_ICONSTOP "The installer for ${PRODUCT_NAME} is already running!" |
447 | + Abort "The installer for ${PRODUCT_NAME} is already running!" |
448 | + |
449 | +SETUP_NOT_RUNNING: |
450 | + !insertmacro MUI_LANGDLL_DISPLAY |
451 | + ; By default, assume that XAMPP + PERL addon not installed |
452 | + StrCpy $XAMPP_PERL_AVAILABLE "false" |
453 | + |
454 | + ; Check if old OCS Inventory NG Server installed |
455 | + ${registry::Read} "HKLM\Software\${PRODUCT_NAME}" "" $R0 $R1 |
456 | + StrCmp "$R1" "REG_SZ" OLD_OCS_DETECTED OLD_OCS_NOT_DETECTED |
457 | + |
458 | +OLD_OCS_DETECTED: |
459 | + ; OCS Inventory NG Server 1.0 RC3 or previous installed |
460 | + StrCpy $INSTDIR $R0 |
461 | + goto CHECK_XAMPP |
462 | + |
463 | +OLD_OCS_NOT_DETECTED: |
464 | + ; Check if XAMPP installed |
465 | + ${registry::Read} "HKLM\Software\xampp" "Install_Dir" $R0 $R1 |
466 | + StrCmp "$R1" "REG_SZ" XAMPP_DETECTED CHECK_XAMPP |
467 | + |
468 | +XAMPP_DETECTED: |
469 | + ; XAMPP already installed |
470 | + StrCpy $INSTDIR $R0 |
471 | + Call GetXamppParentFolder |
472 | + |
473 | +CHECK_XAMPP: |
474 | + ; Check if XAMPP is really installed |
475 | + IfFileExists "$INSTDIR\xampp-control.exe" XAMPP_INSTALLED SETUP_XAMPP_PERL_REQUIRED |
476 | + |
477 | +XAMPP_INSTALLED: |
478 | + ; Check if Perl is really installed |
479 | + IfFileExists "$INSTDIR\Perl\bin\Perl.exe" PERL_INSTALLED PERL_NOT_INSTALLED |
480 | + |
481 | +PERL_INSTALLED: |
482 | + ; Check if mod_perl is really installed |
483 | + IfFileExists "$INSTDIR\apache\modules\mod_perl.so" MOD_PERL_INSTALLED MOD_PERL_NOT_INSTALLED |
484 | + |
485 | +PERL_NOT_INSTALLED: |
486 | +MOD_PERL_NOT_INSTALLED: |
487 | + ; XAMPP Perl not installed |
488 | + StrCmp $XAMPP_PERL_AVAILABLE "false" 0 SETUP_XAMPP_PERL_REQUIRED |
489 | + ; XAMPP Perl addon not installed, but provided version is not suitable for install |
490 | + MessageBox MB_ICONSTOP|MB_OK "XAMPP Web Server is installed but Perl not found on your computer!$\r$\n$\r$\nProvided XAMPP Web Server ${XAMPP_SERVER_VERSION} is not suitable to update/upgrade your version of XAMPP. You must first download and install Perl Addon for your version of XAMPP Web Server." |
491 | + Abort "XAMPP Web Server is installed but Perl not found!" |
492 | + |
493 | +MOD_PERL_INSTALLED: |
494 | + ; As XAMPP + Perl installed, use Minimal setup |
495 | + StrCpy $XAMPP_PERL_AVAILABLE "true" |
496 | + SetCurInstType 1 |
497 | + MessageBox MB_ICONINFORMATION|MB_OK "XAMPP Web Server with Perl is installed into directory <$INSTDIR>.$\r$\n$\r$\nYOU MUST SELECT THIS DIRECTORY to setup ${PRODUCT_NAME} Server components.$\r$\n$\r$\nNB: Upgrade of your current XAMPP using ${PRODUCT_NAME} Server included version IS NOT recommended. See XAMPP web site for more information." |
498 | + goto BEGIN_SETUP |
499 | + |
500 | +SETUP_XAMPP_PERL_REQUIRED: |
501 | + ; Setup XAMPP + Perl Addon required |
502 | + MessageBox MB_ICONEXCLAMATION|MB_OK "XAMPP Web Server with Perl not found on your computer!$\r$\n$\r$\nYOU MUST SELECT AN EXISTING XAMPP DIRECTORY OR INSTALL XAMPP Web Server ${XAMPP_SERVER_VERSION} components provided with this setup.$\r$\n$\r$\nNB: ${PRODUCT_NAME} Server Setup for Windows doesn't support any other web server than XAMPP." |
503 | + SetCurInstType 0 |
504 | + |
505 | +BEGIN_SETUP: |
506 | + Call GetApacheServiceName |
507 | + ; Clear all previous errors |
508 | + ClearErrors |
509 | +FunctionEnd |
510 | + |
511 | + |
512 | +;---------------------------------------------------------------------------- |
513 | +; Section to install XAMPP components |
514 | +;---------------------------------------------------------------------------- |
515 | +Section "XAMPP Web Server" SEC01 |
516 | + ; Only in full type |
517 | + SectionIn 1 |
518 | + Call GetXamppParentFolder |
519 | + ; Overwrite files only if newer |
520 | + SetOverwrite ifnewer |
521 | + ; Extract files TEMP directory |
522 | + SetOutPath "$TEMP" |
523 | + File "${XAMPP_SERVER_FILE}" |
524 | +; File "${XAMPP_PERL_FILE}" |
525 | + ; Launch XAMPP Web server setup in silent mode |
526 | + DetailPrint "Extracting XAMPP Web Server Files, please wait..." |
527 | + ZipDLL::extractall "$TEMP\${XAMPP_SERVER_FILE}" "$XAMPP_PARENT_FOLDER" |
528 | + Pop $0 |
529 | + StrCmp $0 "success" +3 |
530 | + MessageBox MB_ICONSTOP|MB_OK "XAMPP Web Server setup errors detected!$\r$\n$\r$\nUnable to continue. Try installing XAMPP Web server manually." |
531 | + Abort "XAMPP Web Server setup errors detected !" |
532 | + DetailPrint "XAMPP Web Server setup finished." |
533 | + ; Launch XAMPP Perl addon setup in silent mode |
534 | +; DetailPrint "Now Extracting XAMPP Perl addon, please wait..." |
535 | +; ZipDLL::extractall "$TEMP\${XAMPP_PERL_FILE}" "$INSTDIR" |
536 | +; Pop $0 |
537 | +; StrCmp $0 "success" +3 |
538 | +; MessageBox MB_ICONSTOP|MB_OK "XAMPP Perl addon setup errors detected!$\r$\n$\r$\nUnable to continue. Try installing XAMPP Perl addon manually." |
539 | +; Abort "XAMPP Perl addon setup errors detected !" |
540 | +; DetailPrint "XAMPP Perl addon setup finished." |
541 | + DetailPrint "Adding XML::Simple Perl module." |
542 | + SetOutPath "$INSTDIR\perl\site\lib\XML" |
543 | + File "${XML_SIMPLE_PATH}\lib\XML\Simple.pm" |
544 | + SetOutPath "$INSTDIR\perl\site\lib\XML\Simple" |
545 | + File "${XML_SIMPLE_PATH}\lib\XML\Simple\FAQ.pod" |
546 | + DetailPrint "XML::Simple Perl module extracted." |
547 | + DetailPrint "Configuring XAMPP Web Server, please wait..." |
548 | + DetailPrint "----------------------- CAUTION ------------------------------------" |
549 | + DetailPrint "SIMPLY PRESS ENTER to ALL QUESTIONS TO USE DEFAULT VALUES," |
550 | + DetailPrint "unless you know what your are doing!" |
551 | + DetailPrint "" |
552 | + DetailPrint "DO NOT USE XAMPP Control Panel to register Apache, MySQL as service!" |
553 | + DetailPrint "--------------------------------------------------------------------" |
554 | + ExecWait "$INSTDIR\setup_xampp.bat" $0 |
555 | + DetailPrint "XAMPP Web Server setup finished." |
556 | + |
557 | + ; Check if MySQL is already registered as service |
558 | + services::IsServiceInstalled "mysql" |
559 | + Pop $0 |
560 | + StrCmp $0 "Yes" SKIP_INSTALL_MYSQL_SERVICE |
561 | + ; Register MySQL as a service |
562 | + DetailPrint "Now registering MySQL as a service, please wait..." |
563 | + nsExec::ExecToLog "$INSTDIR\xampp_cli.exe installservice mysql" |
564 | + Pop $0 |
565 | + ${If} $0 <> 0 |
566 | + MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to register MySQL as a service.$\r$\n$\r$\nCheck Windows EventLog for more details." |
567 | + ${Else} |
568 | + DetailPrint "MySQL registered as a service" |
569 | + ${EndIf} |
570 | + |
571 | +SKIP_INSTALL_MYSQL_SERVICE: |
572 | + ; Check if Apache is already registered as service |
573 | + services::IsServiceInstalled "$APACHE_SERVICE_NAME" |
574 | + Pop $0 |
575 | + StrCmp $0 "Yes" SKIP_INSTALL_APACHE_SERVICE |
576 | + ; Register Apache as a service |
577 | + DetailPrint "Now registering Apache Web Server as a service, please wait..." |
578 | + nsExec::ExecToLog "$INSTDIR\xampp_cli.exe installservice apache" |
579 | + Pop $0 |
580 | + ${If} $0 <> 0 |
581 | + MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to register Apache2 as a service.$\r$\n$\r$\nCheck Apache error.log file for more details." |
582 | + ${Else} |
583 | + DetailPrint "Apache Web Server registered as a service" |
584 | + ${EndIf} |
585 | + ; Set XAMPP + Perl installed flag |
586 | + StrCpy $XAMPP_PERL_AVAILABLE "true" |
587 | + |
588 | +SKIP_INSTALL_APACHE_SERVICE: |
589 | +SectionEnd |
590 | + |
591 | +;---------------------------------------------------------------------------- |
592 | +; Section to install OCS Inventory NG Server components |
593 | +;---------------------------------------------------------------------------- |
594 | +Section "!${PRODUCT_NAME} Server" SEC02 |
595 | + ; In full or minimal type |
596 | + SectionIn 1 2 |
597 | + Call GetXamppParentFolder |
598 | + ; Always overwrite files |
599 | + SetOverwrite on |
600 | + ; Check XAMPP + Perl installed flag |
601 | + StrCmp $XAMPP_PERL_AVAILABLE "true" 0 ABORT_OCS_SETUP |
602 | + ; Check if XAMPP is really installed |
603 | + IfFileExists "$INSTDIR\xampp-control.exe" 0 ABORT_OCS_SETUP |
604 | + ; Check if Perl is really installed |
605 | + IfFileExists "$INSTDIR\Perl\bin\Perl.exe" 0 ABORT_OCS_SETUP |
606 | + ; Check if Perl is really installed |
607 | + IfFileExists "$INSTDIR\apache\modules\mod_perl.so" BEGIN_OCS_SETUP ABORT_OCS_SETUP |
608 | + |
609 | +ABORT_OCS_SETUP: |
610 | + ; Abort OCS Setup because XAMPP + Perl not installed |
611 | + MessageBox MB_ICONSTOP|MB_OK "XAMPP Web Server with Perl not found on directory <$INSTDIR>!$\r$\n$\r$\nYou must relaunch Setup and select to install XAMPP Web Server components. If you're using XAMPP without Perl Addon, you must install suitable Perl addon for your XAMPP Version." |
612 | + Abort "XAMPP Web Server with Perl not found!" |
613 | + |
614 | +BEGIN_OCS_SETUP: |
615 | + ; First, stop Apache and MySQL services |
616 | + services::IsServiceRunning "$APACHE_SERVICE_NAME" |
617 | + Pop $0 |
618 | + StrCmp $0 "Yes" 0 APACHE_SERVICE_NOT_RUNNING |
619 | + DetailPrint "Stopping Apache Web Server, please wait..." |
620 | + nsExec::ExecToLog "$SYSDIR\net stop $APACHE_SERVICE_NAME" |
621 | + Pop $0 |
622 | + ${If} $0 <> 0 |
623 | + DetailPrint "Unable to stop Apache Web Server, perhaps not started ?" |
624 | + ${Else} |
625 | + DetailPrint "Apache Web Server stopped." |
626 | + ${EndIf} |
627 | + |
628 | +APACHE_SERVICE_NOT_RUNNING: |
629 | + services::IsServiceRunning "mysql" |
630 | + Pop $0 |
631 | + StrCmp $0 "Yes" 0 MYSQL_SERVICE_NOT_RUNNING |
632 | + DetailPrint "Stopping MySQL service, please wait..." |
633 | + nsExec::ExecToLog "$SYSDIR\net stop mysql" |
634 | + Pop $0 |
635 | + ${If} $0 <> 0 |
636 | + DetailPrint "Unable to stop MySQL service, perhaps not started ?" |
637 | + ${Else} |
638 | + DetailPrint "MySQL service stopped." |
639 | + ${EndIf} |
640 | + |
641 | +MYSQL_SERVICE_NOT_RUNNING: |
642 | + ; Delete OCS communication server older than 1.0 RC3 |
643 | + DetailPrint "Removing Communication Server 1.0 RC2 or previous files, please wait..." |
644 | + RMDir /r "$INSTDIR\htdocs\ocsinventory-NG" |
645 | + ; Remove OCS Inventory NG Communication server 1.0 RC2 or previous config |
646 | + DetailPrint "Removing Communication Server 1.0 RC2 or previous configuration from httpd.conf, please wait..." |
647 | + Push "$INSTDIR\apache\conf\httpd.conf" ;file |
648 | + Push "#ocsinventory-ng configuration$\r$\n" ;line to start deleting from |
649 | + Push "</Location>$\r$\n" ;line to stop deleting at |
650 | + Call RemoveAfterLine |
651 | + ; Remove OCS Inventory NG Communication server 1.0 RC3 or previous config |
652 | + DetailPrint "Removing Communication Server 1.0 RC3 configuration from httpd.conf, please wait..." |
653 | + Push "$INSTDIR\apache\conf\httpd.conf" ;file |
654 | + Push "#ocsinventory-ng RC3 configuration$\r$\n" ;line to start deleting from |
655 | + Push "Include conf/ocsinventory.conf$\r$\n" ;line to stop deleting at |
656 | + Call RemoveAfterLine |
657 | + Delete "$INSTDIR\apache\conf\ocsinventory.conf" |
658 | + ; Remove OCS Inventory NG Communication server 1.0 RC3 or previous config |
659 | + DetailPrint "Removing Communication Server 1.01 configuration from httpd.conf, please wait..." |
660 | + Push "$INSTDIR\apache\conf\httpd.conf" ;file |
661 | + Push "# OCS Inventory NG Communication Server$\r$\n" ;line to start deleting from |
662 | + Push "Include conf/extra/ocsinventory.conf$\r$\n" ;line to stop deleting at |
663 | + Call RemoveAfterLine |
664 | + Delete "$INSTDIR\apache\conf\extra\ocsinventory.conf" |
665 | + ; Clear all previous errors |
666 | + ClearErrors |
667 | + |
668 | + ; Copy Communication Server files |
669 | + SetOutPath "$INSTDIR\${PRODUCT_NAME}" |
670 | + File "../ocsinventory-server\Apache\Changes" |
671 | + File "../ocsinventory-server\Apache\LICENSE" |
672 | + SetOutPath "$INSTDIR\perl\site\lib\Apache" |
673 | + File "../ocsinventory-server\Apache\Ocsinventory.pm" |
674 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory" |
675 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface.pm" |
676 | + File "../ocsinventory-server\Apache\Ocsinventory\Map.pm" |
677 | + File "../ocsinventory-server\Apache\Ocsinventory\SOAP.pm" |
678 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Interface" |
679 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Config.pm" |
680 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Database.pm" |
681 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Extensions.pm" |
682 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\History.pm" |
683 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Internals.pm" |
684 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Inventory.pm" |
685 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Ipdiscover.pm" |
686 | + File "../ocsinventory-server\Apache\Ocsinventory\Interface\Updates.pm" |
687 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server" |
688 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Communication.pm" |
689 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Constants.pm" |
690 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Duplicate.pm" |
691 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Groups.pm" |
692 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory.pm" |
693 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Modperl1.pm" |
694 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Modperl2.pm" |
695 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\System.pm" |
696 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Capacities" |
697 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Download.pm" |
698 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Example.pm" |
699 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Filter.pm" |
700 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Ipdiscover.pm" |
701 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Notify.pm" |
702 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Registry.pm" |
703 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Update.pm" |
704 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Capacities\Download" |
705 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Capacities\Download\Inventory.pm" |
706 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Communication" |
707 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Communication\Session.pm" |
708 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Inventory" |
709 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Cache.pm" |
710 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Capacities.pm" |
711 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Data.pm" |
712 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Export.pm" |
713 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Filter.pm" |
714 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Update.pm" |
715 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Inventory\Update" |
716 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Update\AccountInfos.pm" |
717 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\Inventory\Update\Hardware.pm" |
718 | + SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\System" |
719 | + File "../ocsinventory-server\Apache\Ocsinventory\Server\System\Config.pm" |
720 | + SetOutPath "$INSTDIR\${PRODUCT_NAME}\binutils" |
721 | + File "../ocsinventory-server\binutils\ipdiscover-util.pl" |
722 | + File "../ocsinventory-server\binutils\ipdiscover-util.README" |
723 | + File "../ocsinventory-server\binutils\ocs-errors" |
724 | + File "../ocsinventory-server\binutils\ocsinventory-injector.pl" |
725 | + File "../ocsinventory-server\binutils\ocsinventory-injector.README" |
726 | + File "../ocsinventory-server\binutils\ocsinventory-log.pl" |
727 | + File "../ocsinventory-server\binutils\ocsinventory-log.README" |
728 | + File "../ocsinventory-server\binutils\soap-client.pl" |
729 | + File "../ocsinventory-server\binutils\soap-client.README" |
730 | + SetOutPath "$INSTDIR\${PRODUCT_NAME}\dtd" |
731 | + File "../ocsinventory-server\dtd\file_request.dtd" |
732 | + File "../ocsinventory-server\dtd\inventory_reply.dtd" |
733 | + File "../ocsinventory-server\dtd\inventory_request.dtd" |
734 | + File "../ocsinventory-server\dtd\prolog_reply.dtd" |
735 | + File "../ocsinventory-server\dtd\prolog_request.dtd" |
736 | + File "../ocsinventory-server\dtd\update_reply.dtd" |
737 | + File "../ocsinventory-server\dtd\update_request.dtd" |
738 | + SetOutPath "$INSTDIR\${PRODUCT_NAME}\dtd\Interface" |
739 | + File "../ocsinventory-server\dtd\Interface\get_computers_V1-request.dtd" |
740 | + SetOutPath "$INSTDIR\apache\conf\extra" |
741 | +; File "../ocsinventory-server\etc\ocsinventory\ocsinventory-reports.conf" |
742 | + File "../ocsinventory-server\etc\ocsinventory\ocsinventory-server.conf" |
743 | + SetOutPath "$INSTDIR" |
744 | + |
745 | + ; Copy Administration Console files |
746 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
747 | + File "..\ocsinventory-ocsreports\admin_attrib.php" |
748 | + File "..\ocsinventory-ocsreports\admin_language.php" |
749 | + File "..\ocsinventory-ocsreports\ajout_maj.php" |
750 | + File "..\ocsinventory-ocsreports\all_soft.php" |
751 | + File "..\ocsinventory-ocsreports\blacklist.php" |
752 | + File "..\ocsinventory-ocsreports\confiGale.php" |
753 | + File "..\ocsinventory-ocsreports\console.php" |
754 | + SetOutPath "$INSTDIR\htdocs\ocsreports\css" |
755 | + File "..\ocsinventory-ocsreports\css\boxsizing.htc" |
756 | + File "..\ocsinventory-ocsreports\css\ocsreports.css" |
757 | + File "..\ocsinventory-ocsreports\css\onglets.css" |
758 | + File "..\ocsinventory-ocsreports\css\winclassic.css" |
759 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
760 | + File "..\ocsinventory-ocsreports\cvs.php" |
761 | + File "..\ocsinventory-ocsreports\dbconfig.inc.php" |
762 | + File "..\ocsinventory-ocsreports\dico.php" |
763 | + File "..\ocsinventory-ocsreports\donAdmini.php" |
764 | + File "..\ocsinventory-ocsreports\donnees.php" |
765 | + File "..\ocsinventory-ocsreports\doublons.php" |
766 | + File "..\ocsinventory-ocsreports\download.php" |
767 | + File "..\ocsinventory-ocsreports\favicon.ico" |
768 | + File "..\ocsinventory-ocsreports\fichierConf.class.php" |
769 | + SetOutPath "$INSTDIR\htdocs\ocsreports\files" |
770 | + File "..\ocsinventory-ocsreports\files\ocsbase.sql" |
771 | + File "..\ocsinventory-ocsreports\files\oui.txt" |
772 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
773 | + File "..\ocsinventory-ocsreports\footer.php" |
774 | + File "..\ocsinventory-ocsreports\groups.php" |
775 | + File "..\ocsinventory-ocsreports\group_show.php" |
776 | + File "..\ocsinventory-ocsreports\header.php" |
777 | + SetOutPath "$INSTDIR\htdocs\ocsreports\image" |
778 | + File "..\ocsinventory-ocsreports\image\activer.png" |
779 | + File "..\ocsinventory-ocsreports\image\adm.png" |
780 | + File "..\ocsinventory-ocsreports\image\administration.png" |
781 | + File "..\ocsinventory-ocsreports\image\administration_a.png" |
782 | + File "..\ocsinventory-ocsreports\image\adm_a.png" |
783 | + File "..\ocsinventory-ocsreports\image\agent.png" |
784 | + File "..\ocsinventory-ocsreports\image\agent_a.png" |
785 | + File "..\ocsinventory-ocsreports\image\aide.png" |
786 | + File "..\ocsinventory-ocsreports\image\aide_a.png" |
787 | + File "..\ocsinventory-ocsreports\image\archive.png" |
788 | + File "..\ocsinventory-ocsreports\image\archives.png" |
789 | + File "..\ocsinventory-ocsreports\image\banner-ocs.png" |
790 | + File "..\ocsinventory-ocsreports\image\bios.png" |
791 | + File "..\ocsinventory-ocsreports\image\bios_a.png" |
792 | + File "..\ocsinventory-ocsreports\image\bios_d.png" |
793 | + File "..\ocsinventory-ocsreports\image\blanc.png" |
794 | + File "..\ocsinventory-ocsreports\image\cal.gif" |
795 | + File "..\ocsinventory-ocsreports\image\codes.png" |
796 | + File "..\ocsinventory-ocsreports\image\codes_a.png" |
797 | + File "..\ocsinventory-ocsreports\image\compress.png" |
798 | + File "..\ocsinventory-ocsreports\image\configuration.png" |
799 | + File "..\ocsinventory-ocsreports\image\configuration_a.png" |
800 | + File "..\ocsinventory-ocsreports\image\connexion.png" |
801 | + File "..\ocsinventory-ocsreports\image\controleur.png" |
802 | + File "..\ocsinventory-ocsreports\image\controleur_a.png" |
803 | + File "..\ocsinventory-ocsreports\image\controleur_d.png" |
804 | + File "..\ocsinventory-ocsreports\image\deconnexion.png" |
805 | + File "..\ocsinventory-ocsreports\image\delete_all.png" |
806 | + File "..\ocsinventory-ocsreports\image\dictionnaire.png" |
807 | + File "..\ocsinventory-ocsreports\image\dictionnaire_a.png" |
808 | + File "..\ocsinventory-ocsreports\image\disque.png" |
809 | + File "..\ocsinventory-ocsreports\image\disque_a.png" |
810 | + File "..\ocsinventory-ocsreports\image\disque_d.png" |
811 | + File "..\ocsinventory-ocsreports\image\doublons.png" |
812 | + File "..\ocsinventory-ocsreports\image\doublons_a.png" |
813 | + File "..\ocsinventory-ocsreports\image\down.png" |
814 | + File "..\ocsinventory-ocsreports\image\fond.png" |
815 | + File "..\ocsinventory-ocsreports\image\fond_orig.png" |
816 | + File "..\ocsinventory-ocsreports\image\Gest_admin1.png" |
817 | + File "..\ocsinventory-ocsreports\image\Gest_admin2.png" |
818 | + File "..\ocsinventory-ocsreports\image\groups.png" |
819 | + File "..\ocsinventory-ocsreports\image\groups_a.png" |
820 | + File "..\ocsinventory-ocsreports\image\imprimante.png" |
821 | + File "..\ocsinventory-ocsreports\image\imprimante_a.png" |
822 | + File "..\ocsinventory-ocsreports\image\imprimante_d.png" |
823 | + File "..\ocsinventory-ocsreports\image\imprimer.png" |
824 | + File "..\ocsinventory-ocsreports\image\interdit.jpg" |
825 | + File "..\ocsinventory-ocsreports\image\label.png" |
826 | + File "..\ocsinventory-ocsreports\image\label_a.png" |
827 | + File "..\ocsinventory-ocsreports\image\local.png" |
828 | + File "..\ocsinventory-ocsreports\image\local_a.png" |
829 | + File "..\ocsinventory-ocsreports\image\logiciels.png" |
830 | + File "..\ocsinventory-ocsreports\image\logiciels_a.png" |
831 | + File "..\ocsinventory-ocsreports\image\logiciels_d.png" |
832 | + File "..\ocsinventory-ocsreports\image\logo OCS-ng-48.png" |
833 | + File "..\ocsinventory-ocsreports\image\mail.gif" |
834 | + File "..\ocsinventory-ocsreports\image\memoire.png" |
835 | + File "..\ocsinventory-ocsreports\image\memoire_a.png" |
836 | + File "..\ocsinventory-ocsreports\image\memoire_d.png" |
837 | + File "..\ocsinventory-ocsreports\image\message.gif" |
838 | + File "..\ocsinventory-ocsreports\image\modem.png" |
839 | + File "..\ocsinventory-ocsreports\image\modem_a.png" |
840 | + File "..\ocsinventory-ocsreports\image\modem_d.png" |
841 | + File "..\ocsinventory-ocsreports\image\modif.png" |
842 | + File "..\ocsinventory-ocsreports\image\modif_a.png" |
843 | + File "..\ocsinventory-ocsreports\image\modif_all.png" |
844 | + File "..\ocsinventory-ocsreports\image\modif_anul.png" |
845 | + File "..\ocsinventory-ocsreports\image\modif_anul_v2.png" |
846 | + File "..\ocsinventory-ocsreports\image\modif_tab.png" |
847 | + File "..\ocsinventory-ocsreports\image\modif_valid.png" |
848 | + File "..\ocsinventory-ocsreports\image\modif_valid_v2.png" |
849 | + File "..\ocsinventory-ocsreports\image\moniteur.png" |
850 | + File "..\ocsinventory-ocsreports\image\moniteur_a.png" |
851 | + File "..\ocsinventory-ocsreports\image\moniteur_d.png" |
852 | + File "..\ocsinventory-ocsreports\image\norm_left.gif" |
853 | + File "..\ocsinventory-ocsreports\image\norm_left_on.gif" |
854 | + File "..\ocsinventory-ocsreports\image\norm_right.gif" |
855 | + File "..\ocsinventory-ocsreports\image\norm_right.gif.png" |
856 | + File "..\ocsinventory-ocsreports\image\norm_right_on.gif" |
857 | + File "..\ocsinventory-ocsreports\image\norm_right_on.gif.png" |
858 | + File "..\ocsinventory-ocsreports\image\oeil.png" |
859 | + File "..\ocsinventory-ocsreports\image\pack.png" |
860 | + File "..\ocsinventory-ocsreports\image\pack_a.png" |
861 | + File "..\ocsinventory-ocsreports\image\paquets.png" |
862 | + File "..\ocsinventory-ocsreports\image\paquets_a.png" |
863 | + File "..\ocsinventory-ocsreports\image\paquets_d.png" |
864 | + File "..\ocsinventory-ocsreports\image\pass.png" |
865 | + File "..\ocsinventory-ocsreports\image\pass_a.png" |
866 | + File "..\ocsinventory-ocsreports\image\peripherique.png" |
867 | + File "..\ocsinventory-ocsreports\image\peripherique_a.png" |
868 | + File "..\ocsinventory-ocsreports\image\peripherique_d.png" |
869 | + File "..\ocsinventory-ocsreports\image\port.png" |
870 | + File "..\ocsinventory-ocsreports\image\port_a.png" |
871 | + File "..\ocsinventory-ocsreports\image\port_d.png" |
872 | + File "..\ocsinventory-ocsreports\image\prec16.png" |
873 | + File "..\ocsinventory-ocsreports\image\prec24.png" |
874 | + File "..\ocsinventory-ocsreports\image\processeur.png" |
875 | + File "..\ocsinventory-ocsreports\image\processeur_a.png" |
876 | + File "..\ocsinventory-ocsreports\image\processeur_d.png" |
877 | + File "..\ocsinventory-ocsreports\image\proch16.png" |
878 | + File "..\ocsinventory-ocsreports\image\proch24.png" |
879 | + File "..\ocsinventory-ocsreports\image\recherche.png" |
880 | + File "..\ocsinventory-ocsreports\image\recherche_a.png" |
881 | + File "..\ocsinventory-ocsreports\image\recurrence.png" |
882 | + File "..\ocsinventory-ocsreports\image\recurrence_a.png" |
883 | + File "..\ocsinventory-ocsreports\image\red.png" |
884 | + File "..\ocsinventory-ocsreports\image\regconfig.png" |
885 | + File "..\ocsinventory-ocsreports\image\regconfig_a.png" |
886 | + File "..\ocsinventory-ocsreports\image\registre.png" |
887 | + File "..\ocsinventory-ocsreports\image\registre_a.png" |
888 | + File "..\ocsinventory-ocsreports\image\registre_d.png" |
889 | + File "..\ocsinventory-ocsreports\image\repartition.png" |
890 | + File "..\ocsinventory-ocsreports\image\repartition_a.png" |
891 | + File "..\ocsinventory-ocsreports\image\reseau.png" |
892 | + File "..\ocsinventory-ocsreports\image\reseau_a.png" |
893 | + File "..\ocsinventory-ocsreports\image\reseau_d.png" |
894 | + File "..\ocsinventory-ocsreports\image\rien.png" |
895 | + File "..\ocsinventory-ocsreports\image\rien_a.png" |
896 | + File "..\ocsinventory-ocsreports\image\securite.png" |
897 | + File "..\ocsinventory-ocsreports\image\securite_a.png" |
898 | + File "..\ocsinventory-ocsreports\image\slot.png" |
899 | + File "..\ocsinventory-ocsreports\image\slot_a.png" |
900 | + File "..\ocsinventory-ocsreports\image\slot_d.png" |
901 | + File "..\ocsinventory-ocsreports\image\son.png" |
902 | + File "..\ocsinventory-ocsreports\image\son_a.png" |
903 | + File "..\ocsinventory-ocsreports\image\son_d.png" |
904 | + File "..\ocsinventory-ocsreports\image\spec.png" |
905 | + File "..\ocsinventory-ocsreports\image\spec_a.png" |
906 | + File "..\ocsinventory-ocsreports\image\stat.png" |
907 | + File "..\ocsinventory-ocsreports\image\stockage.png" |
908 | + File "..\ocsinventory-ocsreports\image\stockage_a.png" |
909 | + File "..\ocsinventory-ocsreports\image\stockage_d.png" |
910 | + File "..\ocsinventory-ocsreports\image\supp.png" |
911 | + File "..\ocsinventory-ocsreports\image\suppv.png" |
912 | + File "..\ocsinventory-ocsreports\image\test.jpg" |
913 | + File "..\ocsinventory-ocsreports\image\ttaff.png" |
914 | + File "..\ocsinventory-ocsreports\image\ttlogiciels.png" |
915 | + File "..\ocsinventory-ocsreports\image\ttlogiciels_a.png" |
916 | + File "..\ocsinventory-ocsreports\image\ttmachines.png" |
917 | + File "..\ocsinventory-ocsreports\image\ttmachinesred.png" |
918 | + File "..\ocsinventory-ocsreports\image\ttmachinesred_a.png" |
919 | + File "..\ocsinventory-ocsreports\image\ttmachines_a.png" |
920 | + File "..\ocsinventory-ocsreports\image\up.png" |
921 | + File "..\ocsinventory-ocsreports\image\utilisateur OK.png" |
922 | + File "..\ocsinventory-ocsreports\image\utilisateurOK_a.png" |
923 | + File "..\ocsinventory-ocsreports\image\utilisateurs.png" |
924 | + File "..\ocsinventory-ocsreports\image\utilisateurs_.png" |
925 | + File "..\ocsinventory-ocsreports\image\utilisateurs_a.png" |
926 | + File "..\ocsinventory-ocsreports\image\video.png" |
927 | + File "..\ocsinventory-ocsreports\image\video_a.png" |
928 | + File "..\ocsinventory-ocsreports\image\video_d.png" |
929 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
930 | + File "..\ocsinventory-ocsreports\index.php" |
931 | + File "..\ocsinventory-ocsreports\install.php" |
932 | + File "..\ocsinventory-ocsreports\ipcsv.php" |
933 | + File "..\ocsinventory-ocsreports\ipdiscover.php" |
934 | + SetOutPath "$INSTDIR\htdocs\ocsreports\js" |
935 | + File "..\ocsinventory-ocsreports\js\datetimepicker.js" |
936 | + File "..\ocsinventory-ocsreports\js\range.js" |
937 | + File "..\ocsinventory-ocsreports\js\slider.js" |
938 | + File "..\ocsinventory-ocsreports\js\timer.js" |
939 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
940 | + File "..\ocsinventory-ocsreports\label.php" |
941 | + SetOutPath "$INSTDIR\htdocs\ocsreports\languages" |
942 | + File "..\ocsinventory-ocsreports\languages\brazilian_portuguese.png" |
943 | + File "..\ocsinventory-ocsreports\languages\brazilian_portuguese.txt" |
944 | + File "..\ocsinventory-ocsreports\languages\english.png" |
945 | + File "..\ocsinventory-ocsreports\languages\english.txt" |
946 | + File "..\ocsinventory-ocsreports\languages\french.png" |
947 | + File "..\ocsinventory-ocsreports\languages\french.txt" |
948 | + File "..\ocsinventory-ocsreports\languages\german.png" |
949 | + File "..\ocsinventory-ocsreports\languages\german.txt" |
950 | + File "..\ocsinventory-ocsreports\languages\hungarian.png" |
951 | + File "..\ocsinventory-ocsreports\languages\hungarian.txt" |
952 | + File "..\ocsinventory-ocsreports\languages\italian.png" |
953 | + File "..\ocsinventory-ocsreports\languages\italian.txt" |
954 | + File "..\ocsinventory-ocsreports\languages\polish.png" |
955 | + File "..\ocsinventory-ocsreports\languages\polish.txt" |
956 | + File "..\ocsinventory-ocsreports\languages\portuguese.png" |
957 | + File "..\ocsinventory-ocsreports\languages\portuguese.txt" |
958 | + File "..\ocsinventory-ocsreports\languages\russian.png" |
959 | + File "..\ocsinventory-ocsreports\languages\russian.txt" |
960 | + File "..\ocsinventory-ocsreports\languages\slovenian.png" |
961 | + File "..\ocsinventory-ocsreports\languages\slovenian.txt" |
962 | + File "..\ocsinventory-ocsreports\languages\spanish.png" |
963 | + File "..\ocsinventory-ocsreports\languages\spanish.txt" |
964 | + File "..\ocsinventory-ocsreports\languages\turkish.png" |
965 | + File "..\ocsinventory-ocsreports\languages\turkish.txt" |
966 | + SetOutPath "$INSTDIR\htdocs\ocsreports\libraries" |
967 | + File "..\ocsinventory-ocsreports\libraries\zip.lib.php" |
968 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
969 | + File "..\ocsinventory-ocsreports\local.php" |
970 | + File "..\ocsinventory-ocsreports\machine.php" |
971 | + File "..\ocsinventory-ocsreports\multicritere.php" |
972 | + File "..\ocsinventory-ocsreports\opt_download.php" |
973 | + File "..\ocsinventory-ocsreports\opt_frequency.php" |
974 | + File "..\ocsinventory-ocsreports\opt_ipdiscover.php" |
975 | + File "..\ocsinventory-ocsreports\opt_param.php" |
976 | + File "..\ocsinventory-ocsreports\opt_prolog.php" |
977 | + File "..\ocsinventory-ocsreports\opt_suppr.php" |
978 | + File "..\ocsinventory-ocsreports\pass.php" |
979 | + File "..\ocsinventory-ocsreports\popup_rules_redistribution.php" |
980 | + File "..\ocsinventory-ocsreports\preferences.php" |
981 | + File "..\ocsinventory-ocsreports\req.class.php" |
982 | + File "..\ocsinventory-ocsreports\reqRegistre.php" |
983 | + SetOutPath "$INSTDIR\htdocs\ocsreports\require" |
984 | + File "..\ocsinventory-ocsreports\require\function_config_generale.php" |
985 | + File "..\ocsinventory-ocsreports\require\function_dico.php" |
986 | + File "..\ocsinventory-ocsreports\require\function_opt_param.php" |
987 | + File "..\ocsinventory-ocsreports\require\function_rules.php" |
988 | + File "..\ocsinventory-ocsreports\require\function_server.php" |
989 | + File "..\ocsinventory-ocsreports\require\function_table_html.php" |
990 | + SetOutPath "$INSTDIR\htdocs\ocsreports" |
991 | + File "..\ocsinventory-ocsreports\resultats.php" |
992 | + File "..\ocsinventory-ocsreports\rules_redistrib.php" |
993 | + File "..\ocsinventory-ocsreports\security.php" |
994 | + File "..\ocsinventory-ocsreports\server_redistrib.php" |
995 | + File "..\ocsinventory-ocsreports\tele_activate.php" |
996 | + File "..\ocsinventory-ocsreports\tele_actives.php" |
997 | + File "..\ocsinventory-ocsreports\tele_affect.php" |
998 | + File "..\ocsinventory-ocsreports\tele_compress.php" |
999 | + File "..\ocsinventory-ocsreports\tele_massaffect.php" |
1000 | + File "..\ocsinventory-ocsreports\tele_package.php" |
1001 | + File "..\ocsinventory-ocsreports\tele_stats.php" |
1002 | + File "..\ocsinventory-ocsreports\uploadfile.php" |
1003 | + File "..\ocsinventory-ocsreports\users.php" |
1004 | + |
1005 | + IfErrors 0 CONFIGURE_OCS |
1006 | + MessageBox MB_ICONSTOP|MB_OK "Errors where detected while copying files!$\r$\n$\r$\nUnable to continue." |
1007 | + Abort "Errors where detected while copying files!" |
1008 | + |
1009 | +CONFIGURE_OCS: |
1010 | + ; Clear all previous errors |
1011 | + ClearErrors |
1012 | + ; Disable Perl tainting |
1013 | + DetailPrint "Disabling Perl tainting in Apache, please wait..." |
1014 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\perl.conf" "$INSTDIR\apache\conf\extra\perl.conf" "PerlSwitches -T" "#PerlSwitches -T # Commented by OCS Setup" "/S=1 /C=1 /AO=1" $0 |
1015 | + ; Update ocsinventory-server.conf |
1016 | + DetailPrint "Configuring Communication Server in Apache, please wait..." |
1017 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "VERSION_MP" "2" "/S=1 /C=1 /AO=1" $0 |
1018 | + Push "$INSTDIR\apache\logs" |
1019 | + Push "\" |
1020 | + Call StrSlash |
1021 | + Pop $R0 |
1022 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "PATH_TO_LOG_DIRECTORY" "$R0" "/S=1 /C=1 /AO=1" $0 |
1023 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "DATABASE_SERVER" "localhost" "/S=1 /C=1 /AO=1" $0 |
1024 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "DATABASE_PORT" "3306" "/S=1 /C=1 /AO=1" $0 |
1025 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "Apache::DBI" "DBI" "/S=1 /C=1 /AO=1" $0 |
1026 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "PerlSetEnv OCS_OPT_OCS_FILES_PATH /tmp" "PerlSetEnv OCS_OPT_OCS_FILES_PATH $TEMP" "/S=1 /C=1 /AO=1" $0 |
1027 | + ; Add call to ocsinventory-server.conf into httpd.conf if needed |
1028 | + DetailPrint "Checking Apache configuration, please wait..." |
1029 | + ${textreplace::FindInFile} "$INSTDIR\apache\conf\httpd.conf" "Include conf/extra/ocsinventory-server.conf" "/S=1" $0 |
1030 | + ${If} $0 == 0 |
1031 | + ; Add include to OCS Inventory NG Communication server config file |
1032 | + DetailPrint "Adding Communication Server configuration call to httpd.conf, please wait..." |
1033 | + Push "$\r$\n# OCS Inventory NG Communication Server$\r$\nInclude conf/extra/ocsinventory-server.conf$\r$\n" ;text to write to file |
1034 | + Push "$INSTDIR\apache\conf\httpd.conf" ;file to write to |
1035 | + Call WriteToFile |
1036 | + ${Else} |
1037 | + DetailPrint "Communication Server configuration call in httpd.conf already set, skipping..." |
1038 | + ${EndIf} |
1039 | + |
1040 | + ; Enable MySQL InnoDB engine into default MySQL Configuration file my.cnf |
1041 | + DetailPrint "Activating MySQL InnoDB engine, please wait..." |
1042 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "max_allowed_packet = 1M" "max_allowed_packet = 4M" "/S=1 /C=1 /AO=1" $0 |
1043 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "skip-innodb" "# skip-innodb" "/S=1 /C=1 /AO=1" $0 |
1044 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_data_home_dir" "innodb_data_home_dir" "/S=1 /C=1 /AO=1" $0 |
1045 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_data_file_path" "innodb_data_file_path" "/S=1 /C=1 /AO=1" $0 |
1046 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_log_group_home_dir" "innodb_log_group_home_dir" "/S=1 /C=1 /AO=1" $0 |
1047 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_log_arch_dir" "innodb_log_arch_dir" "/S=1 /C=1 /AO=1" $0 |
1048 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_buffer_pool_size" "set-variable = innodb_buffer_pool_size" "/S=1 /C=1 /AO=1" $0 |
1049 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_additional_mem_pool_size" "set-variable = innodb_additional_mem_pool_size" "/S=1 /C=1 /AO=1" $0 |
1050 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_log_file_size" "set-variable = innodb_log_file_size" "/S=1 /C=1 /AO=1" $0 |
1051 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_log_buffer_size" "set-variable = innodb_log_buffer_size" "/S=1 /C=1 /AO=1" $0 |
1052 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_flush_log_at_trx_commit" "innodb_flush_log_at_trx_commit" "/S=1 /C=1 /AO=1" $0 |
1053 | + ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_lock_wait_timeout" "set-variable = innodb_lock_wait_timeout" "/S=1 /C=1 /AO=1" $0 |
1054 | + IfFileExists "$WINDIR\my.ini" UPDATE_MY_INI INNODB_ENABLED |
1055 | + |
1056 | +UPDATE_MY_INI: |
1057 | + ; Enable MySQL InnoDB engine into actually in use MySQL Configuration file my.ini |
1058 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "max_allowed_packet = 1M" "max_allowed_packet = 4M" "/S=1 /C=1 /AO=1" $0 |
1059 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "skip-innodb" "# skip-innodb" "/S=1 /C=1 /AO=1" $0 |
1060 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_data_home_dir" "innodb_data_home_dir" "/S=1 /C=1 /AO=1" $0 |
1061 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_data_file_path" "innodb_data_file_path" "/S=1 /C=1 /AO=1" $0 |
1062 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_log_group_home_dir" "innodb_log_group_home_dir" "/S=1 /C=1 /AO=1" $0 |
1063 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_log_arch_dir" "innodb_log_arch_dir" "/S=1 /C=1 /AO=1" $0 |
1064 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_buffer_pool_size" "set-variable = innodb_buffer_pool_size" "/S=1 /C=1 /AO=1" $0 |
1065 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_additional_mem_pool_size" "set-variable = innodb_additional_mem_pool_size" "/S=1 /C=1 /AO=1" $0 |
1066 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_log_file_size" "set-variable = innodb_log_file_size" "/S=1 /C=1 /AO=1" $0 |
1067 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_log_buffer_size" "set-variable = innodb_log_buffer_size" "/S=1 /C=1 /AO=1" $0 |
1068 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_flush_log_at_trx_commit" "innodb_flush_log_at_trx_commit" "/S=1 /C=1 /AO=1" $0 |
1069 | + ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_lock_wait_timeout" "set-variable = innodb_lock_wait_timeout" "/S=1 /C=1 /AO=1" $0 |
1070 | + |
1071 | +INNODB_ENABLED: |
1072 | + ; Set memory_limit, file_uploads, upload_max_filesize, post_max_size, max_execution_time and max_input_time PHP values for XAMPP |
1073 | + DetailPrint "Configuring Apache and PHP to allow deployment up to ${MAX_DEPLOY_PACKAGE_SIZE} MB, please wait..." |
1074 | +; ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "max_execution_time =" "max_execution_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1075 | +; ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "max_input_time =" "max_input_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1076 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "memory_limit =" "memory_limit = ${MAX_DEPLOY_PACKAGE_SIZE}M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1077 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "post_max_size =" "post_max_size = ${MAX_DEPLOY_PACKAGE_SIZE}M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1078 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "file_uploads =" "file_uploads = On ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1079 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "upload_max_filesize =" "upload_max_filesize = ${MAX_DEPLOY_PACKAGE_SIZE}M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1080 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" ";extension=php_openssl.dll" "extension=php_openssl.dll ; Was not enabled before OCS setup" "/S=1 /C=1 /AO=1" $0 |
1081 | + ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" ";extension=php_zip.dll" "extension=php_zip.dll ; Was not enabled before OCS setup" "/S=1 /C=1 /AO=1" $0 |
1082 | + IfFileExists "$WINDIR\php.ini" UPDATE_PHP_WIN_INI UPDATE_OCSBASE_SQL |
1083 | + |
1084 | +UPDATE_PHP_WIN_INI: |
1085 | + ; Set memory_limit, file_uploads, upload_max_filesize, post_max_size, max_execution_time and max_input_time PHP values for default PHP install |
1086 | +; ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "max_execution_time =" "max_execution_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1087 | +; ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "max_input_time =" "max_input_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1088 | + ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "memory_limit =" "memory_limit = ${MAX_DEPLOY_PACKAGE_SIZE}M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1089 | + ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "post_max_size =" "post_max_size = ${MAX_DEPLOY_PACKAGE_SIZE}M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1090 | + ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "file_uploads =" "file_uploads = On ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1091 | + ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "upload_max_filesize =" "upload_max_filesize = ${MAX_DEPLOY_PACKAGE_SIZE}M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
1092 | + ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" ";extension=php_openssl.dll" "extension=php_openssl.dll ; Was not enabled before OCS setup" "/S=1 /C=1 /AO=1" $0 |
1093 | + ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" ";extension=php_zip.dll" "extension=php_zip.dll ; Was not enabled before OCS setup" "/S=1 /C=1 /AO=1" $0 |
1094 | + |
1095 | +UPDATE_OCSBASE_SQL: |
1096 | + ; Update Admin console configuration to set Download directory to $INSTDIR/htdocs/download |
1097 | + StrCpy $0 "$INSTDIR/htdocs" |
1098 | + Push $0 |
1099 | + Push "\" |
1100 | + Call StrSlash |
1101 | + Pop $1 |
1102 | + ${textreplace::ReplaceInFile} "$INSTDIR\htdocs\ocsreports\files\ocsbase.sql" "$INSTDIR\htdocs\ocsreports\files\ocsbase.sql" "/var/lib/ocsinventory-reports" "$1" "/S=1 /C=1 /AO=1" $0 |
1103 | + ; Start MySQL and Apache services |
1104 | + DetailPrint "Starting MySQL service, please wait..." |
1105 | + nsExec::ExecToLog "$SYSDIR\net start mysql" |
1106 | + Pop $0 |
1107 | + ${If} $0 <> 0 |
1108 | + DetailPrint "Unable to start MySQL service." |
1109 | + MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to start MySQL service.$\r$\n$\r$\nCheck Windows EventLog for more details." |
1110 | + ${Else} |
1111 | + DetailPrint "MySQL service started." |
1112 | + DetailPrint "Starting Apache Web Server, please wait..." |
1113 | + nsExec::ExecToLog "$SYSDIR\net start $APACHE_SERVICE_NAME" |
1114 | + Pop $0 |
1115 | + ${If} $0 <> 0 |
1116 | + DetailPrint "Unable to start Apache Web Server." |
1117 | + MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to start Apache Web Server.$\r$\n$\r$\nCheck Apache Web Server error.log for more details." |
1118 | + ${Else} |
1119 | + DetailPrint "Apache Web Server started" |
1120 | + DetailPrint "Launching OCS Inventory NG Administration Console into you web browser." |
1121 | + DetailPrint "Database configuration or upgrade wizard will start if needed, please wait..." |
1122 | + ExecShell "open" "http://localhost/ocsreports/install.php" |
1123 | + DetailPrint "${PRODUCT_NAME} Setup completed." |
1124 | + ${EndIf} |
1125 | + ${EndIf} |
1126 | + |
1127 | + ; Delete XAMPP installations |
1128 | + DetailPrint "Removing XAMPP temporary installation files, please wait..." |
1129 | + Delete "$TEMP\${XAMPP_SERVER_FILE}" |
1130 | + |
1131 | + ; Shortcuts |
1132 | + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application |
1133 | + !insertmacro MUI_STARTMENU_WRITE_END |
1134 | +SectionEnd |
1135 | + |
1136 | +;---------------------------------------------------------------------------- |
1137 | +; Section to create shortcuts in start menu and destop |
1138 | +;---------------------------------------------------------------------------- |
1139 | +Section -AdditionalIcons |
1140 | + !insertmacro MUI_STARTMENU_WRITE_BEGIN Application |
1141 | + ; Add icon group to All Users |
1142 | + SetShellVarContext all |
1143 | + RMDir /r "$SMPROGRAMS\$ICONS_GROUP" |
1144 | + CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" |
1145 | + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG Reports.lnk" "http://localhost/ocsreports" "" "$INSTDIR\htdocs\ocsreports\favicon.ico" |
1146 | + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG Installation and Administration Guide.lnk" "http://wiki.ocsinventory-ng.org/index.php/Documentation:Main" "" "$SYSDIR\Shell32.dll" 23 |
1147 | + Delete "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG Website.lnk" |
1148 | + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG on the Web.lnk" "${PRODUCT_WEB_SITE}" "" "$SYSDIR\Shell32.dll" 13 |
1149 | + Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" |
1150 | + CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall ${PRODUCT_NAME} Server.lnk" "$INSTDIR\${PRODUCT_NAME}\uninst.exe" "" "$SYSDIR\msiexec.exe" |
1151 | + CreateShortCut "$DESKTOP\OCS Inventory NG Reports.lnk" "http://localhost/ocsreports" "" "$INSTDIR\htdocs\ocsreports\favicon.ico" |
1152 | + ; Remove old current user icon group |
1153 | + SetShellVarContext current |
1154 | + RMDir /r "$SMPROGRAMS\$ICONS_GROUP" |
1155 | +!insertmacro MUI_STARTMENU_WRITE_END |
1156 | +SectionEnd |
1157 | + |
1158 | +;---------------------------------------------------------------------------- |
1159 | +; Section to create uninstaller |
1160 | +;---------------------------------------------------------------------------- |
1161 | +Section -Post |
1162 | + WriteUninstaller "$INSTDIR\${PRODUCT_NAME}\uninst.exe" |
1163 | + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" |
1164 | + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\${PRODUCT_NAME}\uninst.exe" |
1165 | + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" |
1166 | + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" |
1167 | + WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" |
1168 | +SectionEnd |
1169 | + |
1170 | +; Section descriptions |
1171 | +!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
1172 | + !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Install ApacheFriends XAMPP Web Server ${XAMPP_SERVER_VERSION} (Apache2, MySQL,Php, Perl).$\r$\n$\r$\nNB: Upgrading an existing version IS NOT recommended !" |
1173 | + !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Install or update ${PRODUCT_NAME} Server for Windows (requires XAMPP Web Server with Perl already installed)" |
1174 | +!insertmacro MUI_FUNCTION_DESCRIPTION_END |
1175 | + |
1176 | + |
1177 | +;---------------------------------------------------------------------------- |
1178 | +; Overide uninstall standard functions to customize them |
1179 | +;---------------------------------------------------------------------------- |
1180 | +Function un.onUninstSuccess |
1181 | + HideWindow |
1182 | + MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer.$\r$\n$\r$\nDon't forget removing line <Include conf/extra/ocsinventory-server.conf> from file <$INSTDIR\apache\conf\httpd.conf>!$\r$\nThen restart Apache Web Server." |
1183 | +FunctionEnd |
1184 | + |
1185 | +Function un.onInit |
1186 | +!insertmacro MUI_UNGETLANGUAGE |
1187 | + MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you really want to uninstall $(^Name) ?$\r$\n$\r$\nNB: XAMPP components will not be uninstalled." IDYES +2 |
1188 | + Abort |
1189 | +FunctionEnd |
1190 | + |
1191 | +;---------------------------------------------------------------------------- |
1192 | +; Section for uninstalling OCS Inventory NG Server components only |
1193 | +; XAMPP components must be removed manually. |
1194 | +;---------------------------------------------------------------------------- |
1195 | +Section Uninstall |
1196 | + !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP |
1197 | + ; Remove programs group |
1198 | + SetShellVarContext all |
1199 | + Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" |
1200 | + Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall $ICONS_GROUP Server.lnk" |
1201 | + Delete "$SMPROGRAMS\$ICONS_GROUP\$ICONS_GROUP Website.lnk" |
1202 | + Delete "$SMPROGRAMS\$ICONS_GROUP\$ICONS_GROUP on the Web.lnk" |
1203 | + Delete "$SMPROGRAMS\$ICONS_GROUP\$ICONS_GROUP Reports.lnk" |
1204 | + Delete "$DESKTOP\$ICONS_GROUP Reports.lnk" |
1205 | + Delete "$INSTDIR\..\perl\site\lib\Apache\Ocsinventory.pm" |
1206 | + Delete "$INSTDIR\..\apache\conf\extra\ocsinventory-server.conf" |
1207 | + ; Remove folders |
1208 | + RMDir /r "$SMPROGRAMS\$ICONS_GROUP" |
1209 | + RMDir /r "$INSTDIR\..\perl\site\lib\Apache\Ocsinventory" |
1210 | + RMDir /r "$INSTDIR\..\htdocs\ocsreports" |
1211 | + RMDir /r "$INSTDIR" |
1212 | + ; Remove registry key |
1213 | + DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" |
1214 | + SetShellVarContext current |
1215 | + SetAutoClose true |
1216 | +SectionEnd |
1217 | \ No newline at end of file |
1218 | |
1219 | === removed file 'OcsWin32ServerSetup.nsi' |
1220 | --- OcsWin32ServerSetup.nsi 2009-06-18 05:40:16 +0000 |
1221 | +++ OcsWin32ServerSetup.nsi 1970-01-01 00:00:00 +0000 |
1222 | @@ -1,1112 +0,0 @@ |
1223 | -################################################################################ |
1224 | -## OCS Inventory NG Server For Windows Setup |
1225 | -## Copyleft Didier LIROULET 2006 |
1226 | -## Web : http://ocsinventory.sourceforge.net |
1227 | -## |
1228 | -## This code is open source and may be copied and modified as long as the source |
1229 | -## code is always made freely available. |
1230 | -## Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt |
1231 | -################################################################################ |
1232 | - |
1233 | -; Use bzip2 compressor, better compress to the other |
1234 | -SetCompressor bzip2 |
1235 | - |
1236 | -; HM NIS Edit Wizard helper defines |
1237 | -!define PRODUCT_NAME "OCS Inventory NG" |
1238 | -!define PRODUCT_VERSION "1.02" |
1239 | -!define PRODUCT_PUBLISHER "OCS Inventory NG Team" |
1240 | -!define PRODUCT_WEB_SITE "http://www.ocsinventory-ng.org" |
1241 | -!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" |
1242 | -!define PRODUCT_UNINST_ROOT_KEY "HKLM" |
1243 | -!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" |
1244 | -BRANDINGTEXT "${PRODUCT_NAME} Server for Windows ${PRODUCT_VERSION}" |
1245 | - |
1246 | -; OCS Inventory NG Server Internal Version |
1247 | -!define Compile_version "5.0.0.3" |
1248 | -; XAMPP Server file setup and version |
1249 | -!define XAMPP_SERVER_FILE "xampp-win32-1.6.6a-installer.exe" |
1250 | -!define XAMPP_SERVER_VERSION "1.6.6a" |
1251 | -!define APACHE_FILE_VERSION "2.2.8.0" |
1252 | -!define APACHE_SERVICE_NAME_DEFAULT "Apache2.2" |
1253 | -; XAMPP Perl addon file and version |
1254 | -!define XAMPP_PERL_FILE "xampp-win32-perl-addon-5.8.8-2.2.8-installer.exe" |
1255 | -!define XAMPP_PERL_VERSION "5.8.8" |
1256 | - |
1257 | -; MUI 1.67 compatible ------ |
1258 | -!include "MUI.nsh" |
1259 | - |
1260 | -; MUI Settings |
1261 | -!define MUI_ABORTWARNING |
1262 | -!define MUI_ICON "..\win32_agent\Agent\res\OCSInventory.ico" |
1263 | -!define MUI_UNICON "..\win32_agent\Agent\res\OCSInventory.ico" |
1264 | - |
1265 | -; Language Selection Dialog Settings |
1266 | -!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" |
1267 | -!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" |
1268 | -!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" |
1269 | - |
1270 | -; Welcome page |
1271 | -!define MUI_WELCOMEPAGE_TITLE_3LINES |
1272 | -!insertmacro MUI_PAGE_WELCOME |
1273 | -; License page |
1274 | -;!define MUI_LICENSEPAGE_RADIOBUTTONS |
1275 | -!define MUI_LICENSEPAGE_CHECKBOX |
1276 | -!insertmacro MUI_PAGE_LICENSE "License.txt" |
1277 | -; Directory page |
1278 | -!insertmacro MUI_PAGE_DIRECTORY |
1279 | -; Components page |
1280 | -!insertmacro MUI_PAGE_COMPONENTS |
1281 | -; Start menu page |
1282 | -var ICONS_GROUP |
1283 | -!define MUI_STARTMENUPAGE_NODISABLE |
1284 | -!define MUI_STARTMENUPAGE_DEFAULTFOLDER "${PRODUCT_NAME}" |
1285 | -!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" |
1286 | -!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" |
1287 | -!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" |
1288 | -!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP |
1289 | -; Instfiles page |
1290 | -!insertmacro MUI_PAGE_INSTFILES |
1291 | -; Finish page |
1292 | -!define MUI_FINISHPAGE_TITLE_3LINES |
1293 | -!define MUI_FINISHPAGE_RUN |
1294 | -!define MUI_FINISHPAGE_RUN_TEXT "Review XAMPP Security (Recommended)" |
1295 | -!define MUI_FINISHPAGE_RUN_FUNCTION "StartXamppConfig" |
1296 | -!insertmacro MUI_PAGE_FINISH |
1297 | - |
1298 | -; Uninstaller pages |
1299 | -!insertmacro MUI_UNPAGE_INSTFILES |
1300 | - |
1301 | -; Language files |
1302 | -!insertmacro MUI_LANGUAGE "English" |
1303 | -!insertmacro MUI_LANGUAGE "French" |
1304 | -!insertmacro MUI_LANGUAGE "German" |
1305 | -!insertmacro MUI_LANGUAGE "Hungarian" |
1306 | -!insertmacro MUI_LANGUAGE "Italian" |
1307 | -!insertmacro MUI_LANGUAGE "Polish" |
1308 | -!insertmacro MUI_LANGUAGE "Portuguese" |
1309 | -!insertmacro MUI_LANGUAGE "PortugueseBR" |
1310 | -!insertmacro MUI_LANGUAGE "Spanish" |
1311 | -!insertmacro MUI_LANGUAGE "Russian" |
1312 | -!insertmacro MUI_LANGUAGE "Turkish" |
1313 | - |
1314 | -; Reserve files |
1315 | -!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS |
1316 | - |
1317 | -; Include File functions plugin |
1318 | -!include "FileFunc.nsh" |
1319 | -!insertmacro GetParent |
1320 | -!insertmacro GetFileVersion |
1321 | - |
1322 | -; Include TextReplace plugin |
1323 | -!include "TextReplace.nsh" |
1324 | - |
1325 | -; Include Logic Library plugin |
1326 | -!include "LogicLib.nsh" |
1327 | - |
1328 | -; Include Registry plugin |
1329 | -!include "Registry.nsh" |
1330 | - |
1331 | -; MUI end ------ |
1332 | - |
1333 | -Name "${PRODUCT_NAME}" |
1334 | -; Caption "${PRODUCT_NAME}" |
1335 | -; Check file date and CRC |
1336 | -SetDateSave on |
1337 | -SetDatablockOptimize on |
1338 | -CRCCheck on |
1339 | -; No silent install |
1340 | -SilentInstall normal |
1341 | -; Create setup file |
1342 | -OutFile "OcsWin32ServerSetup.exe" |
1343 | -; Default install location |
1344 | -InstallDir "C:\xampp" |
1345 | -; Show install/uninstall logs |
1346 | -ShowInstDetails show |
1347 | -ShowUnInstDetails show |
1348 | - |
1349 | -;-------------------------------- |
1350 | -;Version Information |
1351 | - VIProductVersion "${Compile_version}" |
1352 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "${PRODUCT_NAME} ${PRODUCT_VERSION}" |
1353 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "${PRODUCT_NAME} ${PRODUCT_VERSION} Server for Windows Setup" |
1354 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "${PRODUCT_PUBLISHER}" |
1355 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "${PRODUCT_NAME}. Inventory and package deployement tool under GNU Licence." |
1356 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "${PRODUCT_PUBLISHER} ${PRODUCT_WEB_SITE}" |
1357 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "OcsWin32ServerSetup.exe" |
1358 | - VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "${Compile_version}" |
1359 | -;-------------------------------- |
1360 | - |
1361 | - |
1362 | -; Apache service name |
1363 | -var APACHE_SERVICE_NAME |
1364 | -; Is XAMPP and Perl Addon installed ? |
1365 | -var XAMPP_PERL_AVAILABLE |
1366 | -; Is installed XAMPP and Perl addon updatable ? |
1367 | -var XAMPP_PERL_UPDATABLE |
1368 | - |
1369 | -InstType "Full" |
1370 | -InstType "Minimal" |
1371 | - |
1372 | -; Just open web browser on XAMPP Security configuration page |
1373 | -Function StartXamppConfig |
1374 | - ExecShell "open" "http://localhost/security/index.php" |
1375 | -FunctionEnd |
1376 | - |
1377 | - |
1378 | -; StrSlash |
1379 | -; Author: dirtydingus |
1380 | -; |
1381 | -; Slash to Backslash converter. |
1382 | -; Call it with the haystack and the direction on the stack as shown in the comment above it |
1383 | -; Push $filenamestring (e.g. 'c:\this\and\that\filename.htm') |
1384 | -; Push "\" |
1385 | -; Call StrSlash |
1386 | -; Pop $R0 |
1387 | -; ;Now $R0 contains 'c:/this/and/that/filename.htm' |
1388 | -Function StrSlash |
1389 | - Exch $R3 ; $R3 = needle ("\" or "/") |
1390 | - Exch |
1391 | - Exch $R1 ; $R1 = String to replacement in (haystack) |
1392 | - Push $R2 ; Replaced haystack |
1393 | - Push $R4 ; $R4 = not $R3 ("/" or "\") |
1394 | - Push $R6 |
1395 | - Push $R7 ; Scratch reg |
1396 | - StrCpy $R2 "" |
1397 | - StrLen $R6 $R1 |
1398 | - StrCpy $R4 "\" |
1399 | - StrCmp $R3 "/" loop |
1400 | - StrCpy $R4 "/" |
1401 | -loop: |
1402 | - StrCpy $R7 $R1 1 |
1403 | - StrCpy $R1 $R1 $R6 1 |
1404 | - StrCmp $R7 $R3 found |
1405 | - StrCpy $R2 "$R2$R7" |
1406 | - StrCmp $R1 "" done loop |
1407 | -found: |
1408 | - StrCpy $R2 "$R2$R4" |
1409 | - StrCmp $R1 "" done loop |
1410 | -done: |
1411 | - StrCpy $R3 $R2 |
1412 | - Pop $R7 |
1413 | - Pop $R6 |
1414 | - Pop $R4 |
1415 | - Pop $R2 |
1416 | - Pop $R1 |
1417 | - Exch $R3 |
1418 | -FunctionEnd |
1419 | - |
1420 | -; RemoveAfterLine |
1421 | -; Author: Afrow UK |
1422 | -; |
1423 | -; This function deletes lines from a line (including that line) to another line (also including that line) |
1424 | -; Push "$EXEDIR\file.ext" ;file |
1425 | -; Push "start line$\r$\n" ;line to start deleting from |
1426 | -; Push "finish line$\r$\n" ;line to stop deleting at |
1427 | -; Call RemoveAfterLine |
1428 | -Function RemoveAfterLine |
1429 | - Exch $1 ;end string |
1430 | - Exch |
1431 | - Exch $2 ;begin string |
1432 | - Exch 2 |
1433 | - Exch $3 ;file |
1434 | - Exch 2 |
1435 | - Push $R0 |
1436 | - Push $R1 |
1437 | - Push $R2 |
1438 | - Push $R3 |
1439 | - |
1440 | - GetTempFileName $R2 |
1441 | - FileOpen $R1 $R2 w |
1442 | - FileOpen $R0 $3 r |
1443 | - ClearErrors |
1444 | - FileRead $R0 $R3 |
1445 | - IfErrors Done |
1446 | - StrCmp $R3 $2 +3 |
1447 | - FileWrite $R1 $R3 |
1448 | - Goto -5 |
1449 | - ClearErrors |
1450 | - FileRead $R0 $R3 |
1451 | - IfErrors Done |
1452 | - StrCmp $R3 $1 +4 -3 |
1453 | - FileRead $R0 $R3 |
1454 | - IfErrors Done |
1455 | - FileWrite $R1 $R3 |
1456 | - ClearErrors |
1457 | - Goto -4 |
1458 | -Done: |
1459 | - FileClose $R0 |
1460 | - FileClose $R1 |
1461 | - SetDetailsPrint none |
1462 | - Delete $3 |
1463 | - Rename $R2 $3 |
1464 | - SetDetailsPrint both |
1465 | - |
1466 | - Pop $R3 |
1467 | - Pop $R2 |
1468 | - Pop $R1 |
1469 | - Pop $R0 |
1470 | - Pop $3 |
1471 | - Pop $2 |
1472 | - Pop $1 |
1473 | -FunctionEnd |
1474 | - |
1475 | -; RemoveAfterLine |
1476 | -; Author: Afrow UK |
1477 | -; |
1478 | -; This is a simple function to write a piece of text to a file. This will write to the end always. |
1479 | -; Push "hello$\r$\n" ;text to write to file |
1480 | -; Push "$INSTDIR\log.txt" ;file to write to |
1481 | -; Call WriteToFile |
1482 | -Function WriteToFile |
1483 | - Exch $0 ;file to write to |
1484 | - Exch |
1485 | - Exch $1 ;text to write |
1486 | - |
1487 | - FileOpen $0 $0 a #open file |
1488 | - FileSeek $0 0 END #go to end |
1489 | - FileWrite $0 $1 #write to file |
1490 | - FileClose $0 |
1491 | - |
1492 | - Pop $1 |
1493 | - Pop $0 |
1494 | -FunctionEnd |
1495 | - |
1496 | -; VersionCompare |
1497 | -; Author: Instructor |
1498 | -; |
1499 | -; Compare version numbers. |
1500 | -; Syntax: |
1501 | -; ${VersionCompare} "[Version1]" "[Version2]" $var |
1502 | -; "[Version1]" ; First version |
1503 | -; "[Version2]" ; Second version |
1504 | -; $var ; Result: |
1505 | -; ; $var=0 Versions are equal |
1506 | -; ; $var=1 Version1 is newer |
1507 | -; ; $var=2 Version2 is newer |
1508 | -Function VersionCompare |
1509 | - !define VersionCompare `!insertmacro VersionCompareCall` |
1510 | - !macro VersionCompareCall _VER1 _VER2 _RESULT |
1511 | - Push `${_VER1}` |
1512 | - Push `${_VER2}` |
1513 | - Call VersionCompare |
1514 | - Pop ${_RESULT} |
1515 | - !macroend |
1516 | - Exch $1 |
1517 | - Exch |
1518 | - Exch $0 |
1519 | - Exch |
1520 | - Push $2 |
1521 | - Push $3 |
1522 | - Push $4 |
1523 | - Push $5 |
1524 | - Push $6 |
1525 | - Push $7 |
1526 | - |
1527 | -begin: |
1528 | - StrCpy $2 -1 |
1529 | - IntOp $2 $2 + 1 |
1530 | - StrCpy $3 $0 1 $2 |
1531 | - StrCmp $3 '' +2 |
1532 | - StrCmp $3 '.' 0 -3 |
1533 | - StrCpy $4 $0 $2 |
1534 | - IntOp $2 $2 + 1 |
1535 | - StrCpy $0 $0 '' $2 |
1536 | - StrCpy $2 -1 |
1537 | - IntOp $2 $2 + 1 |
1538 | - StrCpy $3 $1 1 $2 |
1539 | - StrCmp $3 '' +2 |
1540 | - StrCmp $3 '.' 0 -3 |
1541 | - StrCpy $5 $1 $2 |
1542 | - IntOp $2 $2 + 1 |
1543 | - StrCpy $1 $1 '' $2 |
1544 | - StrCmp $4$5 '' equal |
1545 | - StrCpy $6 -1 |
1546 | - IntOp $6 $6 + 1 |
1547 | - StrCpy $3 $4 1 $6 |
1548 | - StrCmp $3 '0' -2 |
1549 | - StrCmp $3 '' 0 +2 |
1550 | - StrCpy $4 0 |
1551 | - StrCpy $7 -1 |
1552 | - IntOp $7 $7 + 1 |
1553 | - StrCpy $3 $5 1 $7 |
1554 | - StrCmp $3 '0' -2 |
1555 | - StrCmp $3 '' 0 +2 |
1556 | - StrCpy $5 0 |
1557 | - StrCmp $4 0 0 +2 |
1558 | - StrCmp $5 0 begin newer2 |
1559 | - StrCmp $5 0 newer1 |
1560 | - IntCmp $6 $7 0 newer1 newer2 |
1561 | - StrCpy $4 '1$4' |
1562 | - StrCpy $5 '1$5' |
1563 | - IntCmp $4 $5 begin newer2 newer1 |
1564 | - |
1565 | -equal: |
1566 | - StrCpy $0 0 |
1567 | - goto end |
1568 | - |
1569 | -newer1: |
1570 | - StrCpy $0 1 |
1571 | - goto end |
1572 | - |
1573 | -newer2: |
1574 | - StrCpy $0 2 |
1575 | - |
1576 | -end: |
1577 | - Pop $7 |
1578 | - Pop $6 |
1579 | - Pop $5 |
1580 | - Pop $4 |
1581 | - Pop $3 |
1582 | - Pop $2 |
1583 | - Pop $1 |
1584 | - Exch $0 |
1585 | -FunctionEnd |
1586 | - |
1587 | -; Get displayed name of Apache service |
1588 | -; If Apache web Server not installed, set it to APACHE_SERVICE_NAME_DEFAULT |
1589 | -; |
1590 | -Function GetApacheServiceName |
1591 | - Push $0 |
1592 | - StrCpy $APACHE_SERVICE_NAME "" |
1593 | - services::GetServiceNameFromDisplayName "Apache" |
1594 | - Pop $0 |
1595 | - ${If} $0 <> 1 |
1596 | - StrCpy $APACHE_SERVICE_NAME "${APACHE_SERVICE_NAME_DEFAULT}" |
1597 | - ${Else} |
1598 | - IntOp $0 $0 - 1 |
1599 | - Pop $APACHE_SERVICE_NAME |
1600 | - ${EndIf} |
1601 | - Pop $0 |
1602 | -FunctionEnd |
1603 | - |
1604 | -Function .onInit |
1605 | - ; Prevent Multiple Instances |
1606 | - System::Call 'kernel32::CreateMutexA(i 0, i 0, t "${PRODUCT_NAME}") i .r1 ?e' |
1607 | - Pop $R0 |
1608 | - StrCmp $R0 0 SETUP_NOT_RUNNING |
1609 | - ; Setup is already running, abort |
1610 | - MessageBox MB_OK|MB_ICONSTOP "The installer for ${PRODUCT_NAME} is already running!" |
1611 | - Abort "The installer for ${PRODUCT_NAME} is already running!" |
1612 | - |
1613 | -SETUP_NOT_RUNNING: |
1614 | - !insertmacro MUI_LANGDLL_DISPLAY |
1615 | - ; By default, assume that XAMPP + PERL addon not installed, or are updatable (older than the provided one) |
1616 | - StrCpy $XAMPP_PERL_AVAILABLE "false" |
1617 | - StrCpy $XAMPP_PERL_UPDATABLE "true" |
1618 | - |
1619 | - ; Check if old OCS Inventory NG Server installed |
1620 | - ${registry::Read} "HKLM\Software\${PRODUCT_NAME}" "" $R0 $R1 |
1621 | - StrCmp "$R1" "REG_SZ" OLD_OCS_DETECTED OLD_OCS_NOT_DETECTED |
1622 | - |
1623 | -OLD_OCS_DETECTED: |
1624 | - ; OCS Inventory NG Server 1.0 RC3 or previous installed |
1625 | - StrCpy $INSTDIR $R0 |
1626 | - goto CHECK_XAMPP_VERSION |
1627 | - |
1628 | -OLD_OCS_NOT_DETECTED: |
1629 | - ; Check if XAMPP installed |
1630 | - ${registry::Read} "HKLM\Software\xampp" "Install_Dir" $R0 $R1 |
1631 | - StrCmp "$R1" "REG_SZ" XAMPP_DETECTED CHECK_XAMPP_VERSION |
1632 | - |
1633 | -XAMPP_DETECTED: |
1634 | - ; OCS Inventory NG Server 1.0 RC3 or previous installed |
1635 | - ; ${GetParent} "$R0" $0 |
1636 | - ; StrCpy $INSTDIR $0 |
1637 | - StrCpy $INSTDIR $R0 |
1638 | - |
1639 | -CHECK_XAMPP_VERSION: |
1640 | - ; Check if XAMPP is really installed |
1641 | - IfFileExists "$INSTDIR\xampp-control.exe" XAMPP_INSTALLED SETUP_XAMPP_PERL_REQUIRED |
1642 | - |
1643 | -XAMPP_INSTALLED: |
1644 | - ; Check if installed XAMPP is not newer than the provided one |
1645 | - ${GetFileVersion} "$INSTDIR\apache\bin\apache.exe" $0 |
1646 | - ${VersionCompare} ${APACHE_FILE_VERSION} $0 $1 |
1647 | - ${If} $1 = 2 |
1648 | - ; Installed XAMPP is newer than provided one, so not updatable |
1649 | - StrCpy $XAMPP_PERL_UPDATABLE "false" |
1650 | - ${EndIf} |
1651 | - ; Check if Perl is really installed |
1652 | - IfFileExists "$INSTDIR\apache\modules\mod_perl.so" MOD_PERL_INSTALLED MOD_PERL_NOT_INSTALLED |
1653 | - |
1654 | -MOD_PERL_NOT_INSTALLED: |
1655 | - ; XAMPP Perl addon not installed |
1656 | - StrCmp $XAMPP_PERL_UPDATABLE "false" 0 SETUP_XAMPP_PERL_REQUIRED |
1657 | - ; XAMPP Perl addon not installed, but provided version is not suitable for install |
1658 | - MessageBox MB_ICONSTOP|MB_OK "Perl addon for XAMPP Web Server not found on your computer!$\r$\n$\r$\nProvided XAMPP Perl Addon ${XAMPP_PERL_VERSION} is not suitable for your version of XAMPP. You must first download and install Perl Addon for your version of XAMPP Web Server." |
1659 | - Abort "Perl addon for XAMPP Web Server not found on your computer and Setup not able to update XAMPP Web Server!" |
1660 | - |
1661 | -MOD_PERL_INSTALLED: |
1662 | - ; As XAMPP + Perl installed, use Minimal setup |
1663 | - StrCpy $XAMPP_PERL_AVAILABLE "true" |
1664 | - SetCurInstType 1 |
1665 | - MessageBox MB_ICONINFORMATION|MB_OK "XAMPP Web Server with Perl Addon is installed into directory <$INSTDIR>.$\r$\n$\r$\nYOU MUST SELECT THIS DIRECTORY to setup ${PRODUCT_NAME} Server components.$\r$\n$\r$\nUpgrade of your current XAMPP using ${PRODUCT_NAME} Server included version is not recommended. See XAMPP web site for more informaation." |
1666 | - goto BEGIN_SETUP |
1667 | - |
1668 | -SETUP_XAMPP_PERL_REQUIRED: |
1669 | - ; Setup XAMPP + Perl Addon required |
1670 | - MessageBox MB_ICONEXCLAMATION|MB_OK "XAMPP Web Server and/or Perl Addon not found on your computer!$\r$\n$\r$\nYOU MUST INSTALL XAMPP ${XAMPP_SERVER_VERSION} Web Server components provided with this setup.$\r$\n$\r$\nNB: ${PRODUCT_NAME} Server Setup for Windows doesn't support any other web server than XAMPP." |
1671 | - SetCurInstType 0 |
1672 | - |
1673 | -BEGIN_SETUP: |
1674 | - Call GetApacheServiceName |
1675 | - ; Clear all previous errors |
1676 | - ClearErrors |
1677 | -FunctionEnd |
1678 | - |
1679 | -; Section to install XAMPP components |
1680 | -Section "XAMPP Web Server" SEC01 |
1681 | - ; Only in full type |
1682 | - SectionIn 1 |
1683 | - ; If XAMPP Installed, ensure not newer |
1684 | - StrCmp $XAMPP_PERL_UPDATABLE "true" 0 SKIP_INSTALL_XAMPP_SERVICE |
1685 | - ; Overwrite files only if newer |
1686 | - SetOverwrite ifnewer |
1687 | - ; Extract files TEMP directory |
1688 | - SetOutPath "$TEMP" |
1689 | - File "${XAMPP_SERVER_FILE}" |
1690 | - File "${XAMPP_PERL_FILE}" |
1691 | - ; Launch XAMPP Web server setup in silent mode |
1692 | - DetailPrint "Launching XAMPP Web Server setup, please wait..." |
1693 | - DetailPrint "----------------------- CAUTION ------------------------------------" |
1694 | - DetailPrint "ANSWER NO when XAMPP Installer will ask you to register Apache," |
1695 | - DetailPrint " MySQL and FileZilla FTP Server as service!" |
1696 | - DetailPrint "DO NOT USE XAMPP Control Panel to register Apache, MySQL as service!" |
1697 | - DetailPrint "--------------------------------------------------------------------" |
1698 | - ExecWait "$TEMP\${XAMPP_SERVER_FILE} /S /D=$INSTDIR" $0 |
1699 | - ${If} $0 <> 0 |
1700 | - MessageBox MB_ICONSTOP|MB_OK "XAMPP Web Server setup errors detected!$\r$\n$\r$\nUnable to continue. Try installing XAMPP Web server manually." |
1701 | - Abort "XAMPP Web Server setup errors detected !" |
1702 | - ${EndIf} |
1703 | - DetailPrint "XAMPP Web Server setup finished." |
1704 | - ; Launch XAMPP Perl addon setup in silent mode |
1705 | - DetailPrint "Now launching XAMPP Perl addon setup, please wait..." |
1706 | - ExecWait "$TEMP\${XAMPP_PERL_FILE} /S" $0 |
1707 | - ${If} $0 <> 0 |
1708 | - MessageBox MB_ICONSTOP|MB_OK "XAMPP Perl addon setup errors detected!$\r$\n$\r$\nUnable to continue. Try installing XAMPP Perl addon manually." |
1709 | - Abort "XAMPP Perl addon setup errors detected !" |
1710 | - ${EndIf} |
1711 | - DetailPrint "XAMPP Perl addon setup finished." |
1712 | - ; Check if XAMPP was previously installed. If yes, we assume that Apache and MySQL are already registered as services |
1713 | - StrCmp $XAMPP_PERL_AVAILABLE "true" SKIP_INSTALL_XAMPP_SERVICE |
1714 | - ; Register MySQL as a service |
1715 | - DetailPrint "Now registering MySQL as a service, please wait..." |
1716 | - nsExec::ExecToLog "$INSTDIR\mysql\bin\mysqld-nt --install mysql --defaults-file=$\"$INSTDIR\mysql\bin\my.cnf$\"" |
1717 | - Pop $0 |
1718 | - ${If} $0 <> 0 |
1719 | - MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to register MySQL as a service.$\r$\n$\r$\nCheck Windows EventLog for more details." |
1720 | - ${Else} |
1721 | - DetailPrint "MySQL registered as a service" |
1722 | - ${EndIf} |
1723 | - ; Register Apache as a service |
1724 | - DetailPrint "Now registering Apache Web Server as a service, please wait..." |
1725 | - nsExec::ExecToLog "$INSTDIR\apache\bin\apache -k install" |
1726 | - Pop $0 |
1727 | - ${If} $0 <> 0 |
1728 | - MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to register Apache2 as a service.$\r$\n$\r$\nCheck Apache error.log file for more details." |
1729 | - ${Else} |
1730 | - DetailPrint "Apache Web Server registered as a service" |
1731 | - ${EndIf} |
1732 | - ; Set XAMPP + Perl installed flag |
1733 | - StrCpy $XAMPP_PERL_AVAILABLE "true" |
1734 | - |
1735 | -SKIP_INSTALL_XAMPP_SERVICE: |
1736 | -SectionEnd |
1737 | - |
1738 | -Section "!${PRODUCT_NAME} Server" SEC02 |
1739 | - ; In full or minimal type |
1740 | - SectionIn 1 2 |
1741 | - ; Always overwrite files |
1742 | - SetOverwrite on |
1743 | - ; Check XAMPP + Perl installed flag |
1744 | - StrCmp $XAMPP_PERL_AVAILABLE "true" 0 ABORT_OCS_SETUP |
1745 | - ; Check if Perl is really installed |
1746 | - IfFileExists "$INSTDIR\apache\modules\mod_perl.so" BEGIN_OCS_SETUP ABORT_OCS_SETUP |
1747 | - |
1748 | -ABORT_OCS_SETUP: |
1749 | - ; Abort OCS Setup because XAMPP + Perl not installed |
1750 | - MessageBox MB_ICONSTOP|MB_OK "Perl addon and/or XAMPP Web Server not found on directory <$INSTDIR>!$\r$\n$\r$\nYou must relaunch Setup and select to install XAMPP Web Server components. If you're using XAMPP without Perl Addon, you must install suitable Perl addon for your XAMPP Version." |
1751 | - Abort "Perl addon and/or XAMPP Web Server not found!" |
1752 | - |
1753 | -BEGIN_OCS_SETUP: |
1754 | - ; First, stop Apache and MySQL services |
1755 | - services::IsServiceRunning "$APACHE_SERVICE_NAME" |
1756 | - Pop $0 |
1757 | - StrCmp $0 "Yes" 0 APACHE_SERVICE_NOT_RUNNING |
1758 | - DetailPrint "Stopping Apache Web Server, please wait..." |
1759 | - nsExec::ExecToLog "$SYSDIR\net stop $APACHE_SERVICE_NAME" |
1760 | - Pop $0 |
1761 | - ${If} $0 <> 0 |
1762 | - DetailPrint "Unable to stop Apache Web Server, perhaps not started ?" |
1763 | - ${Else} |
1764 | - DetailPrint "Apache Web Server stopped." |
1765 | - ${EndIf} |
1766 | - |
1767 | -APACHE_SERVICE_NOT_RUNNING: |
1768 | - services::IsServiceRunning "mysql" |
1769 | - Pop $0 |
1770 | - StrCmp $0 "Yes" 0 MYSQL_SERVICE_NOT_RUNNING |
1771 | - DetailPrint "Stopping MySQL service, please wait..." |
1772 | - nsExec::ExecToLog "$SYSDIR\net stop mysql" |
1773 | - Pop $0 |
1774 | - ${If} $0 <> 0 |
1775 | - DetailPrint "Unable to stop MySQL service, perhaps not started ?" |
1776 | - ${Else} |
1777 | - DetailPrint "MySQL service stopped." |
1778 | - ${EndIf} |
1779 | - |
1780 | -MYSQL_SERVICE_NOT_RUNNING: |
1781 | - ; Delete OCS communication server older than 1.0 RC3 |
1782 | - DetailPrint "Removing Communication Server 1.0 RC2 or previous files, please wait..." |
1783 | - RMDir /r "$INSTDIR\htdocs\ocsinventory-NG" |
1784 | - ; Remove OCS Inventory NG Communication server 1.0 RC2 or previous config |
1785 | - DetailPrint "Removing Communication Server 1.0 RC2 or previous configuration from httpd.conf, please wait..." |
1786 | - Push "$INSTDIR\apache\conf\httpd.conf" ;file |
1787 | - Push "#ocsinventory-ng configuration$\r$\n" ;line to start deleting from |
1788 | - Push "</Location>$\r$\n" ;line to stop deleting at |
1789 | - Call RemoveAfterLine |
1790 | - ; Remove OCS Inventory NG Communication server 1.0 RC3 or previous config |
1791 | - DetailPrint "Removing Communication Server 1.0 RC3 configuration from httpd.conf, please wait..." |
1792 | - Push "$INSTDIR\apache\conf\httpd.conf" ;file |
1793 | - Push "#ocsinventory-ng RC3 configuration$\r$\n" ;line to start deleting from |
1794 | - Push "Include conf/ocsinventory.conf$\r$\n" ;line to stop deleting at |
1795 | - Call RemoveAfterLine |
1796 | - Delete "$INSTDIR\apache\conf\ocsinventory.conf" |
1797 | - ; Remove OCS Inventory NG Communication server 1.0 RC3 or previous config |
1798 | - DetailPrint "Removing Communication Server 1.01 configuration from httpd.conf, please wait..." |
1799 | - Push "$INSTDIR\apache\conf\httpd.conf" ;file |
1800 | - Push "# OCS Inventory NG Communication Server$\r$\n" ;line to start deleting from |
1801 | - Push "Include conf/extra/ocsinventory.conf$\r$\n" ;line to stop deleting at |
1802 | - Call RemoveAfterLine |
1803 | - Delete "$INSTDIR\apache\conf\extra\ocsinventory.conf" |
1804 | - |
1805 | - ; Clear all previous errors |
1806 | - ClearErrors |
1807 | - |
1808 | - ; DTD |
1809 | - DetailPrint "Installing DTD, please wait..." |
1810 | - RMDir /r "$INSTDIR\..\${PRODUCT_NAME} DTD" |
1811 | - SetOutPath "$INSTDIR\${PRODUCT_NAME}\DTD" |
1812 | - File "..\server\dtd\file_request.dtd" |
1813 | - File "..\server\dtd\inventory_reply.dtd" |
1814 | - File "..\server\dtd\inventory_request.dtd" |
1815 | - File "..\server\dtd\prolog_reply.dtd" |
1816 | - File "..\server\dtd\prolog_request.dtd" |
1817 | - File "..\server\dtd\update_reply.dtd" |
1818 | - File "..\server\dtd\update_request.dtd" |
1819 | - SetOutPath "$INSTDIR\${PRODUCT_NAME}\DTD\Interface" |
1820 | - File "..\server\dtd\Interface\get_computers_V1-request.dtd" |
1821 | - |
1822 | - ; ocsreports |
1823 | - DetailPrint "Installing Administration Console files, please wait..." |
1824 | - SetOutPath "$INSTDIR\htdocs\ocsreports" |
1825 | - File "..\server\ocsreports\admin_attrib.php" |
1826 | - File "..\server\ocsreports\admin_language.php" |
1827 | - File "..\server\ocsreports\ajout_maj.php" |
1828 | - File "..\server\ocsreports\all_soft.php" |
1829 | - File "..\server\ocsreports\blacklist.php" |
1830 | - File "..\server\ocsreports\confiGale.php" |
1831 | - File "..\server\ocsreports\console.php" |
1832 | - File "..\server\ocsreports\cvs.php" |
1833 | - File "..\server\ocsreports\dico.php" |
1834 | - File "..\server\ocsreports\donAdmini.php" |
1835 | - File "..\server\ocsreports\donnees.php" |
1836 | - File "..\server\ocsreports\doublons.php" |
1837 | - File "..\server\ocsreports\download.php" |
1838 | - File "..\server\ocsreports\favicon.ico" |
1839 | - File "..\server\ocsreports\fichierConf.class.php" |
1840 | - File "..\server\ocsreports\footer.php" |
1841 | - File "..\server\ocsreports\group_show.php" |
1842 | - File "..\server\ocsreports\groups.php" |
1843 | - File "..\server\ocsreports\header.php" |
1844 | - File "..\server\ocsreports\index.php" |
1845 | - File "..\server\ocsreports\install.php" |
1846 | - File "..\server\ocsreports\ipcsv.php" |
1847 | - File "..\server\ocsreports\ipdiscover.php" |
1848 | - File "..\server\ocsreports\label.php" |
1849 | - File "..\server\ocsreports\local.php" |
1850 | - File "..\server\ocsreports\machine.php" |
1851 | - File "..\server\ocsreports\multicritere.php" |
1852 | - File "..\server\ocsreports\opt_download.php" |
1853 | - File "..\server\ocsreports\opt_frequency.php" |
1854 | - File "..\server\ocsreports\opt_ipdiscover.php" |
1855 | - File "..\server\ocsreports\opt_param.php" |
1856 | - File "..\server\ocsreports\opt_prolog.php" |
1857 | - File "..\server\ocsreports\opt_suppr.php" |
1858 | - File "..\server\ocsreports\pass.php" |
1859 | - File "..\server\ocsreports\popup_rules_redistribution.php" |
1860 | - File "..\server\ocsreports\preferences.php" |
1861 | - File "..\server\ocsreports\req.class.php" |
1862 | - File "..\server\ocsreports\reqRegistre.php" |
1863 | - File "..\server\ocsreports\resultats.php" |
1864 | - File "..\server\ocsreports\rules_redistrib.php" |
1865 | - File "..\server\ocsreports\server_redistrib.php" |
1866 | - File "..\server\ocsreports\tele_activate.php" |
1867 | - File "..\server\ocsreports\tele_actives.php" |
1868 | - File "..\server\ocsreports\tele_affect.php" |
1869 | - File "..\server\ocsreports\tele_compress.php" |
1870 | - File "..\server\ocsreports\tele_massaffect.php" |
1871 | - File "..\server\ocsreports\tele_package.php" |
1872 | - File "..\server\ocsreports\tele_stats.php" |
1873 | - File "..\server\ocsreports\uploadfile.php" |
1874 | - File "..\server\ocsreports\users.php" |
1875 | - SetOutPath "$INSTDIR\htdocs\ocsreports\css" |
1876 | - File "..\server\ocsreports\css\boxsizing.htc" |
1877 | - File "..\server\ocsreports\css\ocsreports.css" |
1878 | - File "..\server\ocsreports\css\onglets.css" |
1879 | - File "..\server\ocsreports\css\winclassic.css" |
1880 | - SetOutPath "$INSTDIR\htdocs\ocsreports\files" |
1881 | - Delete "$INSTDIR\htdocs\ocsreports\files\OcsAgent.exe" |
1882 | - Delete "$INSTDIR\htdocs\ocsreports\files\guide.pdf" |
1883 | - File "..\server\ocsreports\files\ocsbase.sql" |
1884 | - File "..\server\ocsreports\files\oui.txt" |
1885 | - SetOutPath "$INSTDIR\htdocs\ocsreports\image" |
1886 | - File "..\server\ocsreports\image\activer.png" |
1887 | - File "..\server\ocsreports\image\adm.png" |
1888 | - File "..\server\ocsreports\image\adm_a.png" |
1889 | - File "..\server\ocsreports\image\administration.png" |
1890 | - File "..\server\ocsreports\image\administration_a.png" |
1891 | - File "..\server\ocsreports\image\agent.png" |
1892 | - File "..\server\ocsreports\image\agent_a.png" |
1893 | - File "..\server\ocsreports\image\aide.png" |
1894 | - File "..\server\ocsreports\image\aide_a.png" |
1895 | - File "..\server\ocsreports\image\archive.png" |
1896 | - File "..\server\ocsreports\image\archives.png" |
1897 | - File "..\server\ocsreports\image\banner-ocs.png" |
1898 | - File "..\server\ocsreports\image\bios.png" |
1899 | - File "..\server\ocsreports\image\bios_a.png" |
1900 | - File "..\server\ocsreports\image\bios_d.png" |
1901 | - File "..\server\ocsreports\image\blanc.png" |
1902 | - File "..\server\ocsreports\image\cal.gif" |
1903 | - File "..\server\ocsreports\image\codes.png" |
1904 | - File "..\server\ocsreports\image\codes_a.png" |
1905 | - File "..\server\ocsreports\image\compress.png" |
1906 | - File "..\server\ocsreports\image\configuration.png" |
1907 | - File "..\server\ocsreports\image\configuration_a.png" |
1908 | - File "..\server\ocsreports\image\connexion.png" |
1909 | - File "..\server\ocsreports\image\controleur.png" |
1910 | - File "..\server\ocsreports\image\controleur_a.png" |
1911 | - File "..\server\ocsreports\image\controleur_d.png" |
1912 | - File "..\server\ocsreports\image\deconnexion.png" |
1913 | - File "..\server\ocsreports\image\delete_all.png" |
1914 | - File "..\server\ocsreports\image\dictionnaire.png" |
1915 | - File "..\server\ocsreports\image\dictionnaire_a.png" |
1916 | - File "..\server\ocsreports\image\disque.png" |
1917 | - File "..\server\ocsreports\image\disque_a.png" |
1918 | - File "..\server\ocsreports\image\disque_d.png" |
1919 | - File "..\server\ocsreports\image\doublons.png" |
1920 | - File "..\server\ocsreports\image\doublons_a.png" |
1921 | - File "..\server\ocsreports\image\down.png" |
1922 | - File "..\server\ocsreports\image\fond.png" |
1923 | - File "..\server\ocsreports\image\fond_orig.png" |
1924 | - File "..\server\ocsreports\image\Gest_admin1.png" |
1925 | - File "..\server\ocsreports\image\Gest_admin2.png" |
1926 | - File "..\server\ocsreports\image\groups.png" |
1927 | - File "..\server\ocsreports\image\groups_a.png" |
1928 | - File "..\server\ocsreports\image\imprimante.png" |
1929 | - File "..\server\ocsreports\image\imprimante_a.png" |
1930 | - File "..\server\ocsreports\image\imprimante_d.png" |
1931 | - File "..\server\ocsreports\image\imprimer.png" |
1932 | - File "..\server\ocsreports\image\interdit.jpg" |
1933 | - File "..\server\ocsreports\image\label.png" |
1934 | - File "..\server\ocsreports\image\label_a.png" |
1935 | - File "..\server\ocsreports\image\local.png" |
1936 | - File "..\server\ocsreports\image\local_a.png" |
1937 | - File "..\server\ocsreports\image\logiciels.png" |
1938 | - File "..\server\ocsreports\image\logiciels_a.png" |
1939 | - File "..\server\ocsreports\image\logiciels_d.png" |
1940 | - File "..\server\ocsreports\image\logo OCS-ng-48.png" |
1941 | - File "..\server\ocsreports\image\mail.gif" |
1942 | - File "..\server\ocsreports\image\memoire.png" |
1943 | - File "..\server\ocsreports\image\memoire_a.png" |
1944 | - File "..\server\ocsreports\image\memoire_d.png" |
1945 | - File "..\server\ocsreports\image\message.gif" |
1946 | - File "..\server\ocsreports\image\modem.png" |
1947 | - File "..\server\ocsreports\image\modem_a.png" |
1948 | - File "..\server\ocsreports\image\modem_d.png" |
1949 | - File "..\server\ocsreports\image\modif.png" |
1950 | - File "..\server\ocsreports\image\modif_a.png" |
1951 | - File "..\server\ocsreports\image\modif_all.png" |
1952 | - File "..\server\ocsreports\image\modif_anul.png" |
1953 | - File "..\server\ocsreports\image\modif_anul_v2.png" |
1954 | - File "..\server\ocsreports\image\modif_tab.png" |
1955 | - File "..\server\ocsreports\image\modif_valid.png" |
1956 | - File "..\server\ocsreports\image\modif_valid_v2.png" |
1957 | - File "..\server\ocsreports\image\moniteur.png" |
1958 | - File "..\server\ocsreports\image\moniteur_a.png" |
1959 | - File "..\server\ocsreports\image\moniteur_d.png" |
1960 | - File "..\server\ocsreports\image\norm_left.gif" |
1961 | - File "..\server\ocsreports\image\norm_left_on.gif" |
1962 | - File "..\server\ocsreports\image\norm_right.gif" |
1963 | - File "..\server\ocsreports\image\norm_right.gif.png" |
1964 | - File "..\server\ocsreports\image\norm_right_on.gif" |
1965 | - File "..\server\ocsreports\image\norm_right_on.gif.png" |
1966 | - File "..\server\ocsreports\image\oeil.png" |
1967 | - File "..\server\ocsreports\image\pack.png" |
1968 | - File "..\server\ocsreports\image\pack_a.png" |
1969 | - File "..\server\ocsreports\image\paquets.png" |
1970 | - File "..\server\ocsreports\image\paquets_a.png" |
1971 | - File "..\server\ocsreports\image\paquets_d.png" |
1972 | - File "..\server\ocsreports\image\pass.png" |
1973 | - File "..\server\ocsreports\image\pass_a.png" |
1974 | - File "..\server\ocsreports\image\peripherique.png" |
1975 | - File "..\server\ocsreports\image\peripherique_a.png" |
1976 | - File "..\server\ocsreports\image\peripherique_d.png" |
1977 | - File "..\server\ocsreports\image\port.png" |
1978 | - File "..\server\ocsreports\image\port_a.png" |
1979 | - File "..\server\ocsreports\image\port_d.png" |
1980 | - File "..\server\ocsreports\image\prec16.png" |
1981 | - File "..\server\ocsreports\image\prec24.png" |
1982 | - File "..\server\ocsreports\image\processeur.png" |
1983 | - File "..\server\ocsreports\image\processeur_a.png" |
1984 | - File "..\server\ocsreports\image\processeur_d.png" |
1985 | - File "..\server\ocsreports\image\proch16.png" |
1986 | - File "..\server\ocsreports\image\proch24.png" |
1987 | - File "..\server\ocsreports\image\recherche.png" |
1988 | - File "..\server\ocsreports\image\recherche_a.png" |
1989 | - File "..\server\ocsreports\image\recurrence.png" |
1990 | - File "..\server\ocsreports\image\recurrence_a.png" |
1991 | - File "..\server\ocsreports\image\red.png" |
1992 | - File "..\server\ocsreports\image\regconfig.png" |
1993 | - File "..\server\ocsreports\image\regconfig_a.png" |
1994 | - File "..\server\ocsreports\image\registre.png" |
1995 | - File "..\server\ocsreports\image\registre_a.png" |
1996 | - File "..\server\ocsreports\image\registre_d.png" |
1997 | - File "..\server\ocsreports\image\repartition.png" |
1998 | - File "..\server\ocsreports\image\repartition_a.png" |
1999 | - File "..\server\ocsreports\image\reseau.png" |
2000 | - File "..\server\ocsreports\image\reseau_a.png" |
2001 | - File "..\server\ocsreports\image\reseau_d.png" |
2002 | - File "..\server\ocsreports\image\rien.png" |
2003 | - File "..\server\ocsreports\image\rien_a.png" |
2004 | - File "..\server\ocsreports\image\securite.png" |
2005 | - File "..\server\ocsreports\image\securite_a.png" |
2006 | - File "..\server\ocsreports\image\slot.png" |
2007 | - File "..\server\ocsreports\image\slot_a.png" |
2008 | - File "..\server\ocsreports\image\slot_d.png" |
2009 | - File "..\server\ocsreports\image\son.png" |
2010 | - File "..\server\ocsreports\image\son_a.png" |
2011 | - File "..\server\ocsreports\image\son_d.png" |
2012 | - File "..\server\ocsreports\image\spec.png" |
2013 | - File "..\server\ocsreports\image\spec_a.png" |
2014 | - File "..\server\ocsreports\image\stat.png" |
2015 | - File "..\server\ocsreports\image\stockage.png" |
2016 | - File "..\server\ocsreports\image\stockage_a.png" |
2017 | - File "..\server\ocsreports\image\stockage_d.png" |
2018 | - File "..\server\ocsreports\image\supp.png" |
2019 | - File "..\server\ocsreports\image\suppv.png" |
2020 | - File "..\server\ocsreports\image\test.jpg" |
2021 | - File "..\server\ocsreports\image\ttaff.png" |
2022 | - File "..\server\ocsreports\image\ttlogiciels.png" |
2023 | - File "..\server\ocsreports\image\ttlogiciels_a.png" |
2024 | - File "..\server\ocsreports\image\ttmachines.png" |
2025 | - File "..\server\ocsreports\image\ttmachines_a.png" |
2026 | - File "..\server\ocsreports\image\ttmachinesred.png" |
2027 | - File "..\server\ocsreports\image\ttmachinesred_a.png" |
2028 | - File "..\server\ocsreports\image\up.png" |
2029 | - File "..\server\ocsreports\image\utilisateur OK.png" |
2030 | - File "..\server\ocsreports\image\utilisateurOK_a.png" |
2031 | - File "..\server\ocsreports\image\utilisateurs.png" |
2032 | - File "..\server\ocsreports\image\utilisateurs_.png" |
2033 | - File "..\server\ocsreports\image\utilisateurs_a.png" |
2034 | - File "..\server\ocsreports\image\video.png" |
2035 | - File "..\server\ocsreports\image\video_a.png" |
2036 | - File "..\server\ocsreports\image\video_d.png" |
2037 | - SetOutPath "$INSTDIR\htdocs\ocsreports\js" |
2038 | - File "..\server\ocsreports\js\datetimepicker.js" |
2039 | - File "..\server\ocsreports\js\range.js" |
2040 | - File "..\server\ocsreports\js\slider.js" |
2041 | - File "..\server\ocsreports\js\timer.js" |
2042 | - SetOutPath "$INSTDIR\htdocs\ocsreports\languages" |
2043 | - File "..\server\ocsreports\languages\brazilian_portuguese.png" |
2044 | - File "..\server\ocsreports\languages\brazilian_portuguese.txt" |
2045 | - File "..\server\ocsreports\languages\english.png" |
2046 | - File "..\server\ocsreports\languages\english.txt" |
2047 | - File "..\server\ocsreports\languages\french.png" |
2048 | - File "..\server\ocsreports\languages\french.txt" |
2049 | - File "..\server\ocsreports\languages\german.png" |
2050 | - File "..\server\ocsreports\languages\german.txt" |
2051 | - File "..\server\ocsreports\languages\hungarian.png" |
2052 | - File "..\server\ocsreports\languages\hungarian.txt" |
2053 | - File "..\server\ocsreports\languages\italian.png" |
2054 | - File "..\server\ocsreports\languages\italian.txt" |
2055 | - File "..\server\ocsreports\languages\polish.png" |
2056 | - File "..\server\ocsreports\languages\polish.txt" |
2057 | - File "..\server\ocsreports\languages\portuguese.png" |
2058 | - File "..\server\ocsreports\languages\portuguese.txt" |
2059 | - File "..\server\ocsreports\languages\russian.png" |
2060 | - File "..\server\ocsreports\languages\russian.txt" |
2061 | - File "..\server\ocsreports\languages\slovenian.png" |
2062 | - File "..\server\ocsreports\languages\slovenian.txt" |
2063 | - File "..\server\ocsreports\languages\spanish.png" |
2064 | - File "..\server\ocsreports\languages\spanish.txt" |
2065 | - File "..\server\ocsreports\languages\turkish.png" |
2066 | - File "..\server\ocsreports\languages\turkish.txt" |
2067 | - SetOutPath "$INSTDIR\htdocs\ocsreports\libraries" |
2068 | - File "..\server\ocsreports\libraries\zip.lib.php" |
2069 | - SetOutPath "$INSTDIR\htdocs\ocsreports\require" |
2070 | - File "..\server\ocsreports\require\function_config_generale.php" |
2071 | - File "..\server\ocsreports\require\function_dico.php" |
2072 | - File "..\server\ocsreports\require\function_opt_param.php" |
2073 | - File "..\server\ocsreports\require\function_rules.php" |
2074 | - File "..\server\ocsreports\require\function_server.php" |
2075 | - File "..\server\ocsreports\require\function_table_html.php" |
2076 | - |
2077 | - ; Local import PERL utility |
2078 | - DetailPrint "Installing local Perl utility files, please wait..." |
2079 | - ; Delete old import utility and directory |
2080 | - RMDir /r "$INSTDIR\..\binutils" |
2081 | - SetOutPath "$INSTDIR\${PRODUCT_NAME}\binutils" |
2082 | - File "..\server\Apache\binutils\ipdiscover-util.pl" |
2083 | - File "..\server\Apache\binutils\ipdiscover-util.README" |
2084 | - File "..\server\Apache\binutils\ocs-errors" |
2085 | - File "..\server\Apache\binutils\ocsinventory-injector.pl" |
2086 | - File "..\server\Apache\binutils\ocsinventory-injector.README" |
2087 | - File "..\server\Apache\binutils\ocsinventory-log.pl" |
2088 | - File "..\server\Apache\binutils\ocsinventory-log.README" |
2089 | - File "..\server\Apache\binutils\soap-client.pl" |
2090 | - File "..\server\Apache\binutils\soap-client.README" |
2091 | - |
2092 | - ; Communication server |
2093 | - DetailPrint "Installing Communication Server files, please wait..." |
2094 | - SetOutPath "$INSTDIR\perl\site\lib\Apache" |
2095 | - File "..\server\Apache\Ocsinventory.pm" |
2096 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory" |
2097 | - File "..\server\Apache\Ocsinventory\Interface.pm" |
2098 | - File "..\server\Apache\Ocsinventory\Map.pm" |
2099 | - File "..\server\Apache\Ocsinventory\SOAP.pm" |
2100 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server" |
2101 | - File "..\server\Apache\Ocsinventory\Server\Communication.pm" |
2102 | - File "..\server\Apache\Ocsinventory\Server\Constants.pm" |
2103 | - File "..\server\Apache\Ocsinventory\Server\Duplicate.pm" |
2104 | - File "..\server\Apache\Ocsinventory\Server\Groups.pm" |
2105 | - File "..\server\Apache\Ocsinventory\Server\Inventory.pm" |
2106 | - File "..\server\Apache\Ocsinventory\Server\Modperl1.pm" |
2107 | - File "..\server\Apache\Ocsinventory\Server\Modperl2.pm" |
2108 | - File "..\server\Apache\Ocsinventory\Server\System.pm" |
2109 | - RMDIR /r "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Option" |
2110 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Capacities" |
2111 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Download.pm" |
2112 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Example.pm" |
2113 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Filter.pm" |
2114 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Ipdiscover.pm" |
2115 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Notify.pm" |
2116 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Registry.pm" |
2117 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Update.pm" |
2118 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Capacities\Download" |
2119 | - File "..\server\Apache\Ocsinventory\Server\Capacities\Download\Inventory.pm" |
2120 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Communication" |
2121 | - File "..\server\Apache\Ocsinventory\Server\Communication\Session.pm" |
2122 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Inventory" |
2123 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Cache.pm" |
2124 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Capacities.pm" |
2125 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Data.pm" |
2126 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Export.pm" |
2127 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Filter.pm" |
2128 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Update.pm" |
2129 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\Inventory\Update" |
2130 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Update\AccountInfos.pm" |
2131 | - File "..\server\Apache\Ocsinventory\Server\Inventory\Update\Hardware.pm" |
2132 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Server\System" |
2133 | - File "..\server\Apache\Ocsinventory\Server\System\Config.pm" |
2134 | - SetOutPath "$INSTDIR\perl\site\lib\Apache\Ocsinventory\Interface" |
2135 | - File "..\server\Apache\Ocsinventory\Interface\Config.pm" |
2136 | - File "..\server\Apache\Ocsinventory\Interface\Database.pm" |
2137 | - File "..\server\Apache\Ocsinventory\Interface\Extensions.pm" |
2138 | - File "..\server\Apache\Ocsinventory\Interface\History.pm" |
2139 | - File "..\server\Apache\Ocsinventory\Interface\Internals.pm" |
2140 | - File "..\server\Apache\Ocsinventory\Interface\Inventory.pm" |
2141 | - File "..\server\Apache\Ocsinventory\Interface\Ipdiscover.pm" |
2142 | - |
2143 | - ; OCS Inventory NG Communication server config file |
2144 | - DetailPrint "Installing Communication Server configuration file, please wait..." |
2145 | - SetOutPath "$INSTDIR\apache\conf\extra" |
2146 | - File "..\server\Apache\etc\ocsinventory\ocsinventory-server.conf" |
2147 | - |
2148 | - IfErrors 0 CONFIGURE_OCS |
2149 | - MessageBox MB_ICONSTOP|MB_OK "Errors where detected while copying files!$\r$\n$\r$\nUnable to continue." |
2150 | - Abort "Errors where detected while copying files!" |
2151 | - |
2152 | -CONFIGURE_OCS: |
2153 | - ; Clear all previous errors |
2154 | - ClearErrors |
2155 | - ; Update ocsinventory-server.conf |
2156 | - DetailPrint "Configuring Communication Server, please wait..." |
2157 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "VERSION_MP" "2" "/S=1 /C=1 /AO=1" $0 |
2158 | - Push "$INSTDIR\apache\logs" |
2159 | - Push "\" |
2160 | - Call StrSlash |
2161 | - Pop $R0 |
2162 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "PATH_TO_LOG_DIRECTORY" "$R0" "/S=1 /C=1 /AO=1" $0 |
2163 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "DATABASE_SERVER" "localhost" "/S=1 /C=1 /AO=1" $0 |
2164 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "DATABASE_PORT" "3306" "/S=1 /C=1 /AO=1" $0 |
2165 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "$INSTDIR\apache\conf\extra\ocsinventory-server.conf" "Apache::DBI" "DBI" "/S=1 /C=1 /AO=1" $0 |
2166 | - ; Add call to ocsinventory-server.conf into httpd.conf if needed |
2167 | - DetailPrint "Checking Apache configuration, please wait..." |
2168 | - ${textreplace::FindInFile} "$INSTDIR\apache\conf\httpd.conf" "Include conf/extra/ocsinventory-server.conf" "/S=1" $0 |
2169 | - ${If} $0 == 0 |
2170 | - ; Add include to OCS Inventory NG Communication server config file |
2171 | - DetailPrint "Adding Communication Server configuration call to httpd.conf, please wait..." |
2172 | - Push "$\r$\n# OCS Inventory NG Communication Server$\r$\nInclude conf/extra/ocsinventory-server.conf$\r$\n" ;text to write to file |
2173 | - Push "$INSTDIR\apache\conf\httpd.conf" ;file to write to |
2174 | - Call WriteToFile |
2175 | - ${Else} |
2176 | - DetailPrint "Communication Server configuration call in httpd.conf already set, skipping..." |
2177 | - ${EndIf} |
2178 | - |
2179 | - ; Enable MySQL InnoDB engine into default MySQL Configuration file my.cnf |
2180 | - DetailPrint "Activating MySQL InnoDB engine, please wait..." |
2181 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "max_allowed_packet = 1M" "max_allowed_packet = 4M" "/S=1 /C=1 /AO=1" $0 |
2182 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "skip-innodb" "# skip-innodb" "/S=1 /C=1 /AO=1" $0 |
2183 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_data_home_dir" "innodb_data_home_dir" "/S=1 /C=1 /AO=1" $0 |
2184 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_data_file_path" "innodb_data_file_path" "/S=1 /C=1 /AO=1" $0 |
2185 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_log_group_home_dir" "innodb_log_group_home_dir" "/S=1 /C=1 /AO=1" $0 |
2186 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_log_arch_dir" "innodb_log_arch_dir" "/S=1 /C=1 /AO=1" $0 |
2187 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_buffer_pool_size" "set-variable = innodb_buffer_pool_size" "/S=1 /C=1 /AO=1" $0 |
2188 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_additional_mem_pool_size" "set-variable = innodb_additional_mem_pool_size" "/S=1 /C=1 /AO=1" $0 |
2189 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_log_file_size" "set-variable = innodb_log_file_size" "/S=1 /C=1 /AO=1" $0 |
2190 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_log_buffer_size" "set-variable = innodb_log_buffer_size" "/S=1 /C=1 /AO=1" $0 |
2191 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#innodb_flush_log_at_trx_commit" "innodb_flush_log_at_trx_commit" "/S=1 /C=1 /AO=1" $0 |
2192 | - ${textreplace::ReplaceInFile} "$INSTDIR\mysql\bin\my.cnf" "$INSTDIR\mysql\bin\my.cnf" "#set-variable = innodb_lock_wait_timeout" "set-variable = innodb_lock_wait_timeout" "/S=1 /C=1 /AO=1" $0 |
2193 | - IfFileExists "$WINDIR\my.ini" UPDATE_MY_INI INNODB_ENABLED |
2194 | - |
2195 | -UPDATE_MY_INI: |
2196 | - ; Enable MySQL InnoDB engine into actually in use MySQL Configuration file my.ini |
2197 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "max_allowed_packet = 1M" "max_allowed_packet = 4M" "/S=1 /C=1 /AO=1" $0 |
2198 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "skip-innodb" "# skip-innodb" "/S=1 /C=1 /AO=1" $0 |
2199 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_data_home_dir" "innodb_data_home_dir" "/S=1 /C=1 /AO=1" $0 |
2200 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_data_file_path" "innodb_data_file_path" "/S=1 /C=1 /AO=1" $0 |
2201 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_log_group_home_dir" "innodb_log_group_home_dir" "/S=1 /C=1 /AO=1" $0 |
2202 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_log_arch_dir" "innodb_log_arch_dir" "/S=1 /C=1 /AO=1" $0 |
2203 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_buffer_pool_size" "set-variable = innodb_buffer_pool_size" "/S=1 /C=1 /AO=1" $0 |
2204 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_additional_mem_pool_size" "set-variable = innodb_additional_mem_pool_size" "/S=1 /C=1 /AO=1" $0 |
2205 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_log_file_size" "set-variable = innodb_log_file_size" "/S=1 /C=1 /AO=1" $0 |
2206 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_log_buffer_size" "set-variable = innodb_log_buffer_size" "/S=1 /C=1 /AO=1" $0 |
2207 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#innodb_flush_log_at_trx_commit" "innodb_flush_log_at_trx_commit" "/S=1 /C=1 /AO=1" $0 |
2208 | - ${textreplace::ReplaceInFile} "$WINDIR\my.ini" "$WINDIR\my.ini" "#set-variable = innodb_lock_wait_timeout" "set-variable = innodb_lock_wait_timeout" "/S=1 /C=1 /AO=1" $0 |
2209 | - |
2210 | -INNODB_ENABLED: |
2211 | - ; Set memory_limit, file_uploads, upload_max_filesize, post_max_size, max_execution_time and max_input_time PHP values for XAMPP |
2212 | - DetailPrint "Configuring Apache and PHP to allow deployment up to 200MB, please wait..." |
2213 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "memory_limit =" "memory_limit = 32M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2214 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "file_uploads =" "file_uploads = On ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2215 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "upload_max_filesize =" "upload_max_filesize = 200M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2216 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "post_max_size =" "post_max_size = 201M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2217 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "max_execution_time =" "max_execution_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2218 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" "max_input_time =" "max_input_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2219 | - ${textreplace::ReplaceInFile} "$INSTDIR\apache\bin\php.ini" "$INSTDIR\apache\bin\php.ini" ";extension=php_openssl.dll" "extension=php_openssl.dll ; Was not enabled before OCS setup" "/S=1 /C=1 /AO=1" $0 |
2220 | - IfFileExists "$WINDIR\php.ini" UPDATE_PHP_WIN_INI PHP_UPDATED |
2221 | - |
2222 | -UPDATE_PHP_WIN_INI: |
2223 | - ; Set memory_limit, file_uploads, upload_max_filesize, post_max_size, max_execution_time and max_input_time PHP values for default PHP install |
2224 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "memory_limit =" "memory_limit = 32M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2225 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "file_uploads =" "file_uploads = On ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2226 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "upload_max_filesize =" "upload_max_filesize = 200M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2227 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "post_max_size =" "post_max_size = 201M ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2228 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "max_execution_time =" "max_execution_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2229 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" "max_input_time =" "max_input_time = 0 ; Before OCS setup, value was" "/S=1 /C=1 /AO=1" $0 |
2230 | - ${textreplace::ReplaceInFile} "$WINDIR\php.ini" "$WINDIR\php.ini" ";extension=php_openssl.dll" "extension=php_openssl.dll ; Was not enabled before OCS setup" "/S=1 /C=1 /AO=1" $0 |
2231 | - |
2232 | -PHP_UPDATED: |
2233 | - ; Start MySQL and Apache services |
2234 | - DetailPrint "Starting MySQL service, please wait..." |
2235 | - nsExec::ExecToLog "$SYSDIR\net start mysql" |
2236 | - Pop $0 |
2237 | - ${If} $0 <> 0 |
2238 | - DetailPrint "Unable to start MySQL service." |
2239 | - MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to start MySQL service.$\r$\n$\r$\nCheck Windows EventLog for more details." |
2240 | - ${Else} |
2241 | - DetailPrint "MySQL service started." |
2242 | - DetailPrint "Starting Apache Web Server, please wait..." |
2243 | - nsExec::ExecToLog "$SYSDIR\net start $APACHE_SERVICE_NAME" |
2244 | - Pop $0 |
2245 | - ${If} $0 <> 0 |
2246 | - DetailPrint "Unable to start Apache Web Server." |
2247 | - MessageBox MB_ICONEXCLAMATION|MB_OK "Unable to start Apache Web Server.$\r$\n$\r$\nCheck Apache Web Server error.log for more details." |
2248 | - ${Else} |
2249 | - DetailPrint "Apache Web Server started" |
2250 | - DetailPrint "Launching OCS Inventory NG Administration Console into you web browser." |
2251 | - DetailPrint "Database configuration or upgrade wizard will start if needed, please wait..." |
2252 | - ExecShell "open" "http://localhost/ocsreports/install.php" |
2253 | - DetailPrint "${PRODUCT_NAME} Setup completed." |
2254 | - ${EndIf} |
2255 | - ${EndIf} |
2256 | - |
2257 | - ; Delete XAMPP installations |
2258 | - DetailPrint "Removing XAMPP temporary installation files, please wait..." |
2259 | - Delete "$TEMP\${XAMPP_PERL_FILE}" |
2260 | - Delete "$TEMP\${XAMPP_SERVER_FILE}" |
2261 | - |
2262 | - ; Shortcuts |
2263 | - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application |
2264 | - !insertmacro MUI_STARTMENU_WRITE_END |
2265 | -SectionEnd |
2266 | - |
2267 | -Section -AdditionalIcons |
2268 | - !insertmacro MUI_STARTMENU_WRITE_BEGIN Application |
2269 | - ; Add icon group to All Users |
2270 | - SetShellVarContext all |
2271 | - RMDir /r "$SMPROGRAMS\$ICONS_GROUP" |
2272 | - CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" |
2273 | - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG Reports.lnk" "http://localhost/ocsreports" "" "$INSTDIR\htdocs\ocsreports\favicon.ico" |
2274 | - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG Installation and Administration Guide.lnk" "http://wiki.ocsinventory-ng.org/index.php/Documentation:Main" "" "$SYSDIR\Shell32.dll" 23 |
2275 | - Delete "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG Website.lnk" |
2276 | - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\OCS Inventory NG on the Web.lnk" "${PRODUCT_WEB_SITE}" "" "$SYSDIR\Shell32.dll" 13 |
2277 | - Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" |
2278 | - CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall ${PRODUCT_NAME} Server.lnk" "$INSTDIR\${PRODUCT_NAME}\uninst.exe" "" "$SYSDIR\msiexec.exe" |
2279 | - CreateShortCut "$DESKTOP\OCS Inventory NG Reports.lnk" "http://localhost/ocsreports" "" "$INSTDIR\htdocs\ocsreports\favicon.ico" |
2280 | - ; Remove old current user icon group |
2281 | - SetShellVarContext current |
2282 | - RMDir /r "$SMPROGRAMS\$ICONS_GROUP" |
2283 | -!insertmacro MUI_STARTMENU_WRITE_END |
2284 | -SectionEnd |
2285 | - |
2286 | -Section -Post |
2287 | - WriteUninstaller "$INSTDIR\${PRODUCT_NAME}\uninst.exe" |
2288 | - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" |
2289 | - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\${PRODUCT_NAME}\uninst.exe" |
2290 | - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" |
2291 | - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" |
2292 | - WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" |
2293 | -SectionEnd |
2294 | - |
2295 | -; Section descriptions |
2296 | -!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN |
2297 | - !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Install or update ApacheFriends XAMPP Web Server ${XAMPP_SERVER_VERSION} (Apache2, MySQL,...) with Perl ${XAMPP_PERL_VERSION} addon." |
2298 | - !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Install or update ${PRODUCT_NAME} Server for Windows (requires XAMPP Web Server with Perl addon)" |
2299 | -!insertmacro MUI_FUNCTION_DESCRIPTION_END |
2300 | - |
2301 | - |
2302 | -Function un.onUninstSuccess |
2303 | - HideWindow |
2304 | - MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer.$\r$\n$\r$\nDon't forget removing line <Include conf/extra/ocsinventory-server.conf> from file <$INSTDIR\apache\conf\httpd.conf>!$\r$\nThen restart Apache Web Server." |
2305 | -FunctionEnd |
2306 | - |
2307 | -Function un.onInit |
2308 | -!insertmacro MUI_UNGETLANGUAGE |
2309 | - MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Do you really want to uninstall $(^Name) ?$\r$\n$\r$\nNB: XAMPP components will not be uninstalled." IDYES +2 |
2310 | - Abort |
2311 | -FunctionEnd |
2312 | - |
2313 | -Section Uninstall |
2314 | - !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP |
2315 | - ; Remove programs group |
2316 | - SetShellVarContext all |
2317 | - Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" |
2318 | - Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall $ICONS_GROUP Server.lnk" |
2319 | - Delete "$SMPROGRAMS\$ICONS_GROUP\$ICONS_GROUP Website.lnk" |
2320 | - Delete "$SMPROGRAMS\$ICONS_GROUP\$ICONS_GROUP on the Web.lnk" |
2321 | - Delete "$SMPROGRAMS\$ICONS_GROUP\$ICONS_GROUP Reports.lnk" |
2322 | - Delete "$DESKTOP\$ICONS_GROUP Reports.lnk" |
2323 | - Delete "$INSTDIR\..\perl\site\lib\Apache\Ocsinventory.pm" |
2324 | - Delete "$INSTDIR\..\apache\conf\extra\ocsinventory-server.conf" |
2325 | - ; Remove folders |
2326 | - RMDir /r "$SMPROGRAMS\$ICONS_GROUP" |
2327 | - RMDir /r "$INSTDIR\..\perl\site\lib\Apache\Ocsinventory" |
2328 | - RMDir /r "$INSTDIR\..\htdocs\ocsreports" |
2329 | - RMDir /r "$INSTDIR" |
2330 | - ; Remove registry key |
2331 | - DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" |
2332 | - SetShellVarContext current |
2333 | - SetAutoClose true |
2334 | -SectionEnd |
2335 | \ No newline at end of file |
2336 | |
2337 | === added file 'Readme.txt' |
2338 | --- Readme.txt 1970-01-01 00:00:00 +0000 |
2339 | +++ Readme.txt 2010-05-08 06:35:34 +0000 |
2340 | @@ -0,0 +1,135 @@ |
2341 | +//============================================================================== |
2342 | +// Open Computer and Software Inventory Next Generation |
2343 | +// Copyleft 2010 OCS Inventory NG Team |
2344 | +// Web: http://www.ocsinventory-ng.org |
2345 | + |
2346 | +// This code is open source and may be copied and modified as long as the source |
2347 | +// code is always made freely available. |
2348 | +// Please refer to the General Public Licence Version 2.0 |
2349 | +// http://www.gnu.org/ or Licence.txt |
2350 | +//============================================================================== |
2351 | + |
2352 | + |
2353 | +REQUIREMENTS |
2354 | +============ |
2355 | + |
2356 | +- NSIS 2.10 or higher (http://nsis.sourceforge.net)) |
2357 | +- File functions standard NSIS plugin (http://nsis.sourceforge.net/Docs/AppendixE.html) |
2358 | +- TextReplace plugin (http://nsis.sourceforge.net/TextReplace_plugin) |
2359 | +- Logic Library plugin (http://nsis.sourceforge.net/LogicLib) |
2360 | +- Registry plugin (http://nsis.sourceforge.net/Registry_plug-in) |
2361 | +- ZipDLL plugin (http://nsis.sourceforge.net/ZipDLL_plug-in) |
2362 | +- Services plugin (http://nsis.sourceforge.net/Services_plug-in) |
2363 | + |
2364 | + |
2365 | +BUILDING DEPENDANCIES |
2366 | +===================== |
2367 | + |
2368 | +OCS Inventory NG Server for Windows uses following packages: |
2369 | + |
2370 | +- XAMPP for Windows, ZIP version package xampp-win32-1.7.3.zip (http://www.apachefriends.org/en/xampp-windows.html) |
2371 | + XAMPP Zip version 1.7.3 include Perl and mod_perl, so no need of additionnal |
2372 | + XAMPP Perl Addon as with previous version |
2373 | +- Perl XML::Simple module sources, XML-Simple-2.18.tar.gz (http://search.cpan.org/dist/XML-Simple/) |
2374 | + |
2375 | + |
2376 | +OCS Inventory NG Server for Windows needs the following directory structure: |
2377 | + |
2378 | ++---+--- ocsinventory-server (Sources of Communication Server) |
2379 | + | |
2380 | + +--- ocsinventory-reports (Sources of Administration Console) |
2381 | + | |
2382 | + +--+ ocsinventory-windows-server (Sources of Windows Server setup) |
2383 | + | |
2384 | + +--- XML-Simple-2.18 |
2385 | + |
2386 | + |
2387 | +BUIDLING NSIS INSTALLER |
2388 | +======================= |
2389 | + |
2390 | +1) Get OCS Inventory NG Communication Server sources into folder ocsinventory-server |
2391 | +bzr branch https://code.launchpad.net/ocsinventory-server/stable-1.3.1 |
2392 | + |
2393 | +2) Get OCS Inventory NG Administration Console sources into folder ocsinventory-ocsreports |
2394 | +bzr branch https://code.launchpad.net/ocsinventory-ocsreports/stable-1.3.1 |
2395 | + |
2396 | +3) Get OCS Inventory NG Server for Windows sources into folder ocsinventory-windows-server |
2397 | +bzr branch https://code.launchpad.net/ocsinventory-windows-server/stable-1.3.1 |
2398 | + |
2399 | +4) Put XAMPP Zip xampp-win32-1.7.3.zip file into folder ocsinventory-windows-server, |
2400 | + WITHOUT uncompressing it. It's the NSIS installer which will uncompress it. |
2401 | + |
2402 | +5) Extract XML::Simple sources into folder ocsinventory-windows-server/XML-Simple-2.18 |
2403 | + |
2404 | +6) Compile NSIS script ocsinventory-windows-server/OCSNG-Windows-Server-Setup.nsi |
2405 | + to create installer. |
2406 | + |
2407 | + |
2408 | +INFORMATION ABOUT INSTALLER CODE |
2409 | +================================ |
2410 | + |
2411 | +OnInit function: |
2412 | +- Ensure only one instance is running |
2413 | +- |
2414 | +- Checks "HKLM\Software\OCS Inventory NG" for previous version to get previous |
2415 | + setup folder |
2416 | +- Checks "HKLM\Software\xampp" for already installed XAMPP (no more filled with |
2417 | + XAMPP 1.7.3) to get setup folder |
2418 | +- Checks "$INSTDIR\xammp-control.exe" to see if XAMPP is really installed |
2419 | +- Checks "$INSTDIR\Perl\bin\perl.exe" to see if Perl is really installed |
2420 | +- Checks "$INSTDIR\apache\modules\mod_perl.so" to see if mod_perl is really |
2421 | + installed |
2422 | + |
2423 | +Section SEC01 "XAMPP Web Server" is used to setup XAMPP: |
2424 | +- Extract XAMPP ZIP File into TEMP directory |
2425 | +- Uncompress ZIP to user selected installation folder |
2426 | +- Copy XML::Simple files into XAMPP Perl site library ($INSTDIR\perl\site\lib) |
2427 | +- Launch XAMPP Setup batch command |
2428 | +- Register MySQL as a Windows service |
2429 | +- Register Apache as a Windows service |
2430 | + |
2431 | + |
2432 | +Section SEC02 "OCS Inventory NG Server" is used to setup OCS Inventory NG Server: |
2433 | +- Checks "$INSTDIR\xammp-control.exe" to see if XAMPP is really installed |
2434 | +- Checks "$INSTDIR\Perl\bin\perl.exe" to see if Perl is really installed |
2435 | +- Checks "$INSTDIR\apache\modules\mod_perl.so" to see if mod_perl is really |
2436 | + installed |
2437 | +- Stop Apache service |
2438 | +- Stop MySQL service |
2439 | +- Remove old OCS config (1.0 RC) |
2440 | +- Copy Communication Server files to Perl site library ($INSTDIR\perl\site\lib). |
2441 | + Some files Like DTD and docs are copied to $INSTDIR\OCS Inventory NG, with |
2442 | + uninstaller. |
2443 | +- Copy Apache Communication Server configuration file to $INSTDIR\Apache\conf\extra |
2444 | +- Copy Administration Console files to $INSTDIR\htdocs\ocsreports |
2445 | +- Create package deployement directory into INSTDIR\htdocs\download |
2446 | +- Update Apache Communication Server configuration file |
2447 | +- Update MySQL configuration file $INSTDIR\mysql\bin\my.cnf to enable InnoDB |
2448 | + and set max_allowed_packet to 4 MB |
2449 | +- Update MySQL configuration file $WINDIR\my.ini (if exist) to enable InnoDB |
2450 | + and set max_allowed_packet to 4 MB |
2451 | +- Update HP configuration file $WINDIR\php.ini and $INSTDIR\Apache\bin\php.ini |
2452 | + (if exist) to set memory_limit, post_max_size, upload_max_filesize to 128 MB, |
2453 | + enable file_uploads, php_zip and php_openssl extensions |
2454 | +- Start MySQL service |
2455 | +- Start Apache service |
2456 | +- Launch Web browser to configure Administration Console. |
2457 | + |
2458 | + |
2459 | +Section "-AdditionalIcons" creates icons for OCS Inventory NG is start menu and |
2460 | +desktop. |
2461 | + |
2462 | + |
2463 | +Section "-Post" creates uninstaller. |
2464 | + |
2465 | + |
2466 | +Section "Uninstall" is used to remove OCS Inventory NG Server files, but not |
2467 | +XAMPP Web Server. |
2468 | + |
2469 | + |
2470 | + |
2471 | + |
2472 | + |
2473 | +We hope it will works for you ! |
2474 | + |
2475 | +OCS Inventory Team |
2476 | \ No newline at end of file |