~ubuntu-branches/debian/experimental/gpac/experimental

« back to all changes in this revision

Viewing changes to packagers/win32_64/nsis/gpac_installer.nsi

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler
  • Date: 2014-02-22 18:15:00 UTC
  • mfrom: (1.2.2) (3.1.6 sid)
  • Revision ID: package-import@ubuntu.com-20140222181500-b4phupo05gjpmopa
Tags: 0.5.0+svn5104~dfsg1-1
* New  upstream version 0.5.0+svn5104~dfsg1:
  - src/utils/sha1.c is relicensed under LGPLv2.1, Closes: #730759
* Don't install modules in multi-arch directories, Closes: #730497
* Add libusb-1.0.0-dev headers because libfreenect requires this
* Fix install rule
* Follow upstream soname bump
  - Drop the symbols file for now until it has been revised thourougly
* Let binaries produce the correct svn revision
* Refresh patches
* Patch and build against libav10, Closes: #739321
* Bump standards version, no changes necessary

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
;--------------------------------
 
2
;General
 
3
!define GPAC_VERSION    0.5.1-DEV
 
4
!include default.out
 
5
 
 
6
!define GPAC_ROOT ..\..\..
 
7
!ifdef IS_WIN64
 
8
!define GPAC_BIN ${GPAC_ROOT}\bin\x64\release
 
9
!define GPAC_EXTRA_LIB ${GPAC_ROOT}\extra_lib\lib\x64\release
 
10
InstallDir "$PROGRAMFILES64\GPAC"
 
11
!else
 
12
!define GPAC_BIN ${GPAC_ROOT}\bin\win32\release
 
13
!define GPAC_EXTRA_LIB ${GPAC_ROOT}\extra_lib\lib\win32\release
 
14
InstallDir "$PROGRAMFILES32\GPAC"
 
15
!endif
 
16
 
 
17
InstallDirRegKey HKCU "SOFTWARE\GPAC" "InstallDir"
 
18
 
 
19
RequestExecutionLevel highest
 
20
!include LogicLib.nsh
 
21
 
 
22
Function .onInit
 
23
!ifdef IS_WIN64
 
24
!include "x64.nsh"
 
25
${If} ${RunningX64}
 
26
${Else}
 
27
        MessageBox MB_OK|MB_ICONSTOP "This installer is for 64bits operating systems only.$\n Please go to our website and get the 32 BITS installer."
 
28
        Quit
 
29
${Endif}
 
30
!endif
 
31
 
 
32
UserInfo::GetAccountType
 
33
pop $0
 
34
FunctionEnd
 
35
 
 
36
;--------------------------------
 
37
;Include Modern UI
 
38
 
 
39
  !include "MUI2.nsh"
 
40
 
 
41
WindowIcon on
 
42
Icon "${GPAC_ROOT}\doc\osmo4.ico"
 
43
UninstallIcon "${GPAC_ROOT}\doc\osmo4.ico"
 
44
 
 
45
;--------------------------------
 
46
;Interface Settings
 
47
 
 
48
  !define MUI_ABORTWARNING
 
49
 
 
50
Var DIALOG
 
51
Var Label
 
52
Var Confirm
 
53
 
 
54
LangString PAGE_TITLE ${LANG_ENGLISH} "Title"
 
55
LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"
 
56
 
 
57
Function EnableNext
 
58
  Pop $R1
 
59
  ${NSD_GetState} $Confirm $R1
 
60
        GetDlgItem $0 $HWNDPARENT 1
 
61
        ${If} $R1 == ${BST_CHECKED}
 
62
   EnableWindow $0 1
 
63
  ${Else} 
 
64
   EnableWindow $0 0
 
65
  ${Endif} 
 
66
FunctionEnd
 
67
 
 
68
Function customPage
 
69
        !insertmacro MUI_HEADER_TEXT "Patents and Royalties" "Please read carefully the following clause."
 
70
        GetDlgItem $0 $HWNDPARENT 1
 
71
        EnableWindow $0 0
 
72
        nsDialogs::Create 1018
 
73
        Pop $DIALOG
 
74
 
 
75
  ${NSD_CreateLabel} 0 0 100% 120u "Multimedia technologies are often covered by various patents which are most of the time hard to identify. These patents may or may not apply in your local jurisdiction. By installing this software, you acknowledge that you may have to pay royaltee fees in order to legally use this software. Do not proceed with this setup if you do not understand or do not agree with these terms. In any case, the authors and/or distributors bears no liability for any infringing usage of this software, which is provided for educational or research purposes."
 
76
        Pop $Label
 
77
 
 
78
  ${NSD_CreateCheckBox} 0 -30 100% 12u "I understand and accept the conditions"
 
79
  Pop $Confirm
 
80
        GetFunctionAddress $0 EnableNext
 
81
        nsDialogs::OnClick $Confirm $0
 
82
  
 
83
  
 
84
  nsDialogs::Show
 
85
FunctionEnd
 
86
 
 
87
;--------------------------------
 
88
;Pages
 
89
 
 
90
  !insertmacro MUI_PAGE_WELCOME
 
91
  !insertmacro MUI_PAGE_LICENSE "${GPAC_ROOT}\COPYING" 
 
92
  Page custom customPage
 
93
  !insertmacro MUI_PAGE_COMPONENTS
 
94
  !insertmacro MUI_PAGE_DIRECTORY
 
95
    
 
96
  !insertmacro MUI_PAGE_INSTFILES
 
97
  !insertmacro MUI_PAGE_FINISH
 
98
  
 
99
  !insertmacro MUI_UNPAGE_CONFIRM
 
100
  !insertmacro MUI_UNPAGE_INSTFILES
 
101
 
 
102
  !insertmacro MUI_LANGUAGE "English"
 
103
 
 
104
ComponentText "This will install the GPAC Framework on your computer. Select which optional things you want installed."
 
105
DirText "This will install the GPAC Framework on your computer. Choose a directory"
 
106
 
 
107
 
 
108
Function FctWriteRegStrAuth
 
109
   ;local var
 
110
   Push $0
 
111
   Push $R0
 
112
   Push $R1
 
113
   Push $R2
 
114
   Push $R3
 
115
   ;pop function arguments
 
116
   Exch 5
 
117
   Pop $R3
 
118
   Exch 5
 
119
   Pop $R2
 
120
   Exch 5
 
121
   Pop $R1
 
122
   Exch 5
 
123
   Pop $R0
 
124
 
 
125
   ;test if calling HKCR
 
126
   StrCmp $R0 "HKCR" +1 +3
 
127
   WriteRegStr HKCR $R1 $R2 $R3
 
128
   goto lbl_end
 
129
   
 
130
   #has current user admin privileges?
 
131
   userInfo::getAccountType
 
132
   Pop $0
 
133
   StrCmp $0 "Admin" lbl_admin lbl_not_admin
 
134
 
 
135
   lbl_admin:
 
136
      WriteRegStr HKLM $R1 $R2 $R3
 
137
      goto lbl_end
 
138
 
 
139
   lbl_not_admin:
 
140
      WriteRegStr HKCU $R1 $R2 $R3
 
141
 
 
142
   lbl_end:
 
143
      Pop $R3
 
144
      Pop $R2
 
145
      Pop $R1
 
146
      Pop $R0
 
147
      Pop $0
 
148
FunctionEnd
 
149
 
 
150
!macro WriteRegStrAuth HKREG SUBREG ENTRY VALUESTR
 
151
    Push "${HKREG}"
 
152
    Push "${SUBREG}"
 
153
    Push "${ENTRY}"
 
154
    Push "${VALUESTR}"
 
155
    Call FctWriteRegStrAuth
 
156
!macroend
 
157
 
 
158
!define WriteRegStrAuth "!insertmacro WriteRegStrAuth"
 
159
 
 
160
 
 
161
Function un.FctDeleteRegKeyAuth
 
162
   ;local var
 
163
   Push $0
 
164
   Push $R0
 
165
   Push $R1
 
166
   ;pop function arguments
 
167
   Exch 3
 
168
   Pop $R1
 
169
   Exch 3
 
170
   Pop $R0
 
171
 
 
172
   ;test if calling HKCR
 
173
   StrCmp $R0 "HKCR" +1 +3
 
174
   DeleteRegKey HKCR $R1
 
175
   goto lbl_end
 
176
   
 
177
   #has current user admin privileges?
 
178
   userInfo::getAccountType
 
179
   Pop $0
 
180
   StrCmp $0 "Admin" lbl_admin lbl_not_admin
 
181
   
 
182
   lbl_admin:
 
183
      DeleteRegKey HKLM $R1
 
184
      goto lbl_end
 
185
   
 
186
   lbl_not_admin:
 
187
      DeleteRegKey HKCU $R1
 
188
 
 
189
   lbl_end:
 
190
      Pop $0
 
191
      Pop $R1
 
192
      Pop $R0
 
193
FunctionEnd
 
194
 
 
195
!macro DeleteRegKeyAuth HKREG SUBREG
 
196
    Push "${HKREG}"
 
197
    Push "${SUBREG}"
 
198
    Call un.FctDeleteRegKeyAuth
 
199
!macroend
 
200
 
 
201
!define DeleteRegKeyAuth "!insertmacro DeleteRegKeyAuth"
 
202
 
 
203
Function InsertGDIPLUS
 
204
   Push $R0
 
205
   Push $R1
 
206
   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
 
207
   StrCmp $R0 "" 0 lbl_winnt
 
208
 
 
209
   ;NOT NT
 
210
   ReadRegStr $R0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber
 
211
 
 
212
   StrCpy $R1 $R0 1
 
213
   ; win95, NOT SUPPORTED
 
214
   StrCmp $R1 '4' 0 lbl_err_95
 
215
   StrCpy $R1 $R0 3
 
216
   StrCmp $R1 '4.0' lbl_err_95
 
217
   ;winME or 98 otherwise
 
218
   StrCmp $R1 '4.9' lbl_add lbl_add
 
219
 
 
220
lbl_err_nt:
 
221
   MessageBox MB_OK "Microsoft GDI+ cannot be installed on NT 3 Systems"
 
222
   Goto lbl_done
 
223
 
 
224
lbl_err_95:
 
225
   MessageBox MB_OK "Microsoft GDI+ cannot be installed on Windows 95 and older Systems"
 
226
   Goto lbl_done
 
227
 
 
228
lbl_winnt:
 
229
   StrCpy $R1 $R0 1
 
230
   StrCmp $R1 '3' lbl_err_nt
 
231
   StrCmp $R1 '4' lbl_add
 
232
   StrCpy $R1 $R0 3
 
233
   StrCmp $R1 '5.0' lbl_add     ;2000
 
234
   StrCmp $R1 '5.1' lbl_xp      ;XP
 
235
   StrCmp $R1 '5.2' lbl_done    ;.NET server
 
236
 
 
237
lbl_add:
 
238
 !ifndef IS_WIN64
 
239
   File "${GPAC_BIN}\Gdiplus.dll"
 
240
  !endif
 
241
 
 
242
lbl_xp:
 
243
   File "${GPAC_BIN}\gm_gdip_raster.dll"
 
244
 
 
245
lbl_done:
 
246
FunctionEnd
 
247
 
 
248
;osmo4 install
 
249
Section "Osmo4/GPAC Player" SecOsmo4
 
250
  SectionIn RO
 
251
  SetOutPath $INSTDIR
 
252
 
 
253
  File /oname=ReadMe.txt "${GPAC_ROOT}\README"
 
254
  File /oname=License.txt "${GPAC_ROOT}\COPYING"
 
255
  File /oname=Changelog.txt "${GPAC_ROOT}\Changelog"
 
256
  File "${GPAC_ROOT}\doc\configuration.html"
 
257
  File "${GPAC_ROOT}\doc\gpac.mp4"
 
258
 
 
259
  !ifndef IS_WIN64
 
260
  File "${GPAC_BIN}\Osmo4.exe"
 
261
  !endif
 
262
  File "${GPAC_ROOT}\doc\osmo4.ico"
 
263
  File "${GPAC_BIN}\libgpac.dll"
 
264
  File "${GPAC_BIN}\gm_dummy_in.dll"
 
265
  File "${GPAC_BIN}\gm_dx_hw.dll"
 
266
  File "${GPAC_BIN}\js.dll"
 
267
  File "${GPAC_BIN}\gm_gpac_js.dll"
 
268
  File "${GPAC_BIN}\libeay32.dll"
 
269
  File "${GPAC_BIN}\ssleay32.dll"
 
270
  File "${GPAC_BIN}\gm_ismacryp.dll"
 
271
 
 
272
  ;create default cache
 
273
  SetOutPath $INSTDIR\cache
 
274
 
 
275
 
 
276
  ;copy GUI
 
277
  SetOutPath $INSTDIR\gui
 
278
  File "${GPAC_ROOT}\gui\gui.bt"
 
279
  File "${GPAC_ROOT}\gui\gui.js"
 
280
  File "${GPAC_ROOT}\gui\gwlib.js"
 
281
  File "${GPAC_ROOT}\gui\mpegu-core.js"
 
282
  File "${GPAC_ROOT}\gui\webvtt-renderer.js"
 
283
  SetOutPath $INSTDIR\gui\icons
 
284
  File /r /x .svn ${GPAC_ROOT}\gui\icons\*
 
285
  SetOutPath $INSTDIR\gui\extensions
 
286
  File /r /x .svn ${GPAC_ROOT}\gui\extensions\*
 
287
 
 
288
  SetOutPath $INSTDIR
 
289
  
 
290
  ${WriteRegStrAuth} HKCU "SOFTWARE\GPAC" "InstallDir" "$INSTDIR"
 
291
  ${WriteRegStrAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4" "DisplayName" "Osmo4/GPAC (remove only)"
 
292
  ${WriteRegStrAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4" "UninstallString" "$INSTDIR\uninstall.exe"
 
293
  WriteUninstaller "uninstall.exe"
 
294
 
 
295
SectionEnd
 
296
 
 
297
SubSection "GPAC Plugins" SecPlugins
 
298
 
 
299
 
 
300
;
 
301
;       2 install modes, normal one and full one
 
302
 
 
303
Section "MPEG-4 BIFS Decoder" SecBIFS
 
304
  SectionIn 1
 
305
  File "${GPAC_BIN}\gm_bifs_dec.dll"
 
306
SectionEnd
 
307
 
 
308
Section "MPEG-4 ODF Decoder" SecODF
 
309
  SectionIn 1
 
310
  File "${GPAC_BIN}\gm_odf_dec.dll"
 
311
SectionEnd
 
312
 
 
313
Section "MPEG-4 LASeR Decoder" SecLASeR
 
314
  SectionIn 1
 
315
  File "${GPAC_BIN}\gm_laser_dec.dll"
 
316
SectionEnd
 
317
 
 
318
Section "MPEG-4 SAF Demultiplexer" SecSAF
 
319
  SectionIn 1
 
320
  File "${GPAC_BIN}\gm_saf_in.dll"
 
321
SectionEnd
 
322
 
 
323
Section "Textual MPEG-4 Loader" SecTextLoad
 
324
  SectionIn 1
 
325
  File "${GPAC_BIN}\gm_ctx_load.dll"
 
326
SectionEnd
 
327
 
 
328
Section "Image Package (PNG, JPEG, BMP)" SecIMG
 
329
  SectionIn 1
 
330
  File "${GPAC_BIN}\gm_img_in.dll"
 
331
SectionEnd
 
332
 
 
333
Section "AAC Audio" SecAAC
 
334
  SectionIn 1
 
335
  File "${GPAC_BIN}\gm_aac_in.dll"
 
336
SectionEnd
 
337
 
 
338
Section "MP3 Audio" SecMP3
 
339
  SectionIn 1
 
340
  File "${GPAC_BIN}\gm_mp3_in.dll"
 
341
SectionEnd
 
342
 
 
343
Section "AC3 Audio" SecAC3
 
344
  SectionIn 1
 
345
  File "${GPAC_BIN}\gm_ac3_in.dll"
 
346
SectionEnd
 
347
 
 
348
Section "FFMPEG" SecFFMPEG
 
349
  SectionIn 1
 
350
  File "${GPAC_BIN}\gm_ffmpeg_in.dll"
 
351
  File "${GPAC_BIN}\avcodec-*.dll"
 
352
  File "${GPAC_BIN}\avdevice-*.dll"
 
353
  File "${GPAC_BIN}\avfilter-*.dll"
 
354
  File "${GPAC_BIN}\avformat-*.dll"
 
355
  File "${GPAC_BIN}\avutil-*.dll"
 
356
  File "${GPAC_BIN}\postproc-*.dll"
 
357
  File "${GPAC_BIN}\swresample-*.dll"
 
358
  File "${GPAC_BIN}\swscale-*.dll"
 
359
SectionEnd
 
360
 
 
361
Section "XviD Video Decoder" SecXVID
 
362
  SectionIn 1
 
363
  File "${GPAC_BIN}\gm_xvid_dec.dll"
 
364
SectionEnd
 
365
 
 
366
;Section "AMR NB & WB" SecAMRFT
 
367
;  SectionIn 1
 
368
;  File "..\gm_amr_float_dec.dll"
 
369
;SectionEnd
 
370
 
 
371
Section "Subtitles" SecSUBS
 
372
  SectionIn 1
 
373
  File "${GPAC_BIN}\gm_timedtext.dll"
 
374
SectionEnd
 
375
 
 
376
Section "ISO File Format" SecISOFF
 
377
  SectionIn 1
 
378
  File "${GPAC_BIN}\gm_isom_in.dll"
 
379
SectionEnd
 
380
 
 
381
Section "MPEG-2 TS" SecM2TS
 
382
  SectionIn 1
 
383
  File "${GPAC_BIN}\gm_mpegts_in.dll"
 
384
SectionEnd
 
385
 
 
386
Section "RTP/RTSP" SecRTP
 
387
  SectionIn 1
 
388
  File "${GPAC_BIN}\gm_rtp_in.dll"
 
389
SectionEnd
 
390
 
 
391
Section "SVG" SecSVG
 
392
  SectionIn 1
 
393
  File "${GPAC_BIN}\gm_svg_in.dll"
 
394
SectionEnd
 
395
 
 
396
Section "WebVTT" SecWebVTT
 
397
  SectionIn 1
 
398
  File "${GPAC_BIN}\gm_vtt_in.dll"
 
399
SectionEnd
 
400
 
 
401
Section "GDI+" SecGDIP
 
402
  SectionIn 1
 
403
  call InsertGDIPLUS
 
404
SectionEnd
 
405
 
 
406
Section "GPAC 2D Raster" SecG2DS
 
407
  SectionIn 1
 
408
  File "${GPAC_BIN}\gm_soft_raster.dll"
 
409
SectionEnd
 
410
 
 
411
Section "FreeType" SecFT
 
412
  SectionIn 1
 
413
  File "${GPAC_BIN}\gm_ft_font.dll"
 
414
SectionEnd
 
415
 
 
416
Section "Windows MME Audio" SecWAVE
 
417
  SectionIn 1
 
418
  File "${GPAC_BIN}\gm_wav_out.dll"
 
419
SectionEnd
 
420
 
 
421
Section "Xiph" SecXIPH
 
422
  SectionIn 1
 
423
  File "${GPAC_BIN}\gm_ogg.dll"
 
424
SectionEnd
 
425
 
 
426
Section "OpenSVC Decoder" SecOSVC
 
427
  SectionIn 1
 
428
  File "${GPAC_BIN}\OpenSVCDecoder.dll"
 
429
  File "${GPAC_BIN}\gm_opensvc_dec.dll"
 
430
SectionEnd
 
431
 
 
432
Section "OpenHEVC Decoder" SecOHEVC
 
433
  SectionIn 1
 
434
  File "${GPAC_BIN}\libLibOpenHevcWrapper.dll"
 
435
  File "${GPAC_BIN}\gm_openhevc_dec.dll"
 
436
SectionEnd
 
437
 
 
438
Section "MPEG DASH Suppport" SecDASH
 
439
  SectionIn 1
 
440
  File "${GPAC_BIN}\gm_mpd_in.dll"
 
441
SectionEnd
 
442
 
 
443
Section "HTML 5 Media Source Extensions Suppport" SecMSE
 
444
  SectionIn 1
 
445
  File "${GPAC_BIN}\gm_mse_in.dll"
 
446
SectionEnd
 
447
 
 
448
Section "UPnP Support" SecUPnP
 
449
  SectionIn 1
 
450
  File "${GPAC_BIN}\gm_platinum.dll"
 
451
SectionEnd
 
452
 
 
453
Section "Widget Manager" SecMPEGU
 
454
  SectionIn 1
 
455
  File "${GPAC_BIN}\gm_widgetman.dll"
 
456
SectionEnd
 
457
 
 
458
;Section "MobileIP Framework" SecMobIP
 
459
;  SectionIn 1
 
460
;  File "..\gm_mobile_ip.dll"
 
461
;  File "..\MobileSession.dll"
 
462
;SectionEnd
 
463
 
 
464
 
 
465
;Section "OFFIS Audio compressor" SecOffisComp
 
466
;  SectionIn 1
 
467
;  ;copy GUI
 
468
;  File "..\gm_offis_compressor.dll"
 
469
;  File "..\QtCore4.dll"
 
470
;  File "..\QtGui4.dll"
 
471
;  SetOutPath $INSTDIR\gui\extensions
 
472
;  File /r /x .svn ..\..\..\..\gui\extensions\offis*
 
473
;  SetOutPath $INSTDIR
 
474
;SectionEnd
 
475
 
 
476
SubSectionEnd
 
477
 
 
478
 
 
479
Section "MP4Box" SecMP4B
 
480
  SectionIn 1
 
481
  SetOutPath $INSTDIR
 
482
  File "${GPAC_BIN}\MP4Box.exe"
 
483
  File "${GPAC_BIN}\MP42TS.exe"
 
484
  File "${GPAC_BIN}\dashcast.exe"
 
485
 
 
486
  Push $INSTDIR
 
487
  Call AddToPath
 
488
SectionEnd
 
489
 
 
490
 
 
491
Section "GPAC SDK" SecSDK
 
492
  SectionIn 1
 
493
  SetOutPath $INSTDIR\sdk\include
 
494
  File /r /x CVS ${GPAC_ROOT}\include\*.h
 
495
  SetOutPath $INSTDIR\sdk\lib
 
496
  File ${GPAC_BIN}\libgpac.lib
 
497
  File ${GPAC_EXTRA_LIB}\js.lib
 
498
SectionEnd
 
499
 
 
500
 
 
501
!ifndef IS_WIN64
 
502
!define HK_MOZ "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"
 
503
 
 
504
Section "Osmozilla" SecZILLA
 
505
  SectionIn 1
 
506
  SetOutPath $INSTDIR
 
507
  File "${GPAC_BIN}\nposmozilla.dll"
 
508
  File "${GPAC_BIN}\nposmozilla.xpt"
 
509
 
 
510
  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Path" "$INSTDIR\nposmozilla.dll"
 
511
  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "XPTPath" "$INSTDIR\nposmozilla.xpt"
 
512
  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Version" "${GPAC_VERSION}"
 
513
  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Vendor" "GPAC"
 
514
  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "Description" "GPAC plugin"
 
515
  ${WriteRegStrAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0" "ProductName" "Osmozilla"
 
516
SectionEnd
 
517
!endif
 
518
 
 
519
Section "GPAX" SecGPAX
 
520
  SectionIn 1
 
521
  SetOutPath $INSTDIR
 
522
  File "${GPAC_BIN}\GPAX.dll"
 
523
  RegDLL "$INSTDIR\GPAX.dll"
 
524
SectionEnd
 
525
 
 
526
 
 
527
Section "MP4Client" SecMP4C
 
528
  SectionIn 1
 
529
  SetOutPath $INSTDIR
 
530
  File "${GPAC_BIN}\MP4Client.exe"
 
531
SectionEnd   
 
532
                 
 
533
                 
 
534
                  
 
535
Section "Windows Runtime Libraries" SecMSVCRT
 
536
  SectionIn 1
 
537
;  File "..\Microsoft.VC100.CRT.manifest"
 
538
;  File "..\Microsoft.VC100.MFC.manifest"       
 
539
  File "${GPAC_BIN}\msvcr100.dll"
 
540
  File "${GPAC_BIN}\mfc100.dll"
 
541
SectionEnd
 
542
 
 
543
 
 
544
 
 
545
 
 
546
SubSection "Osmo4 Shortcuts"
 
547
 
 
548
Section "Add Start Menu Shortcuts"
 
549
  SectionIn 1
 
550
  #has current user admin privileges?
 
551
  userInfo::getAccountType
 
552
  Pop $0
 
553
  StrCmp $0 "Admin" +1 +2
 
554
  SetShellVarContext all
 
555
  CreateDirectory "$SMPROGRAMS\Osmo4"
 
556
  CreateShortCut "$SMPROGRAMS\Osmo4\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
 
557
  !ifndef IS_WIN64
 
558
  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (Classic UI).lnk" "$INSTDIR\Osmo4.exe" ""
 
559
  !endif
 
560
  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (New UI).lnk" "$INSTDIR\MP4Client.exe" "-gui" 
 
561
  CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (New UI With Console).lnk" "$INSTDIR\MP4Client.exe" ""
 
562
  CreateShortCut "$SMPROGRAMS\Osmo4\Readme.lnk" "$INSTDIR\ReadMe.txt"
 
563
  CreateShortCut "$SMPROGRAMS\Osmo4\License.lnk" "$INSTDIR\License.txt"
 
564
  CreateShortCut "$SMPROGRAMS\Osmo4\History.lnk" "$INSTDIR\changelog.txt"
 
565
  CreateShortCut "$SMPROGRAMS\Osmo4\Configuration Info.lnk" "$INSTDIR\configuration.html"
 
566
SectionEnd
 
567
 
 
568
!ifndef IS_WIN64
 
569
Section "Add shortcut to QuickLaunch"
 
570
  SectionIn 1
 
571
  CreateShortCut "$QUICKLAUNCH\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0
 
572
SectionEnd
 
573
 
 
574
Section "Add shortcut to Desktop"
 
575
  SectionIn 1
 
576
  CreateShortCut "$DESKTOP\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0
 
577
SectionEnd
 
578
 
 
579
!define SHCNE_ASSOCCHANGED 0x08000000
 
580
!define SHCNF_IDLIST 0
 
581
 
 
582
Section "Make Osmo4 the default MPEG-4 Player"
 
583
  SectionIn 1
 
584
  ;write file association
 
585
  ${WriteRegStrAuth} HKCR GPAC\mp4\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"
 
586
  ${WriteRegStrAuth} HKCR GPAC\mp4\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"
 
587
  ${WriteRegStrAuth} HKCR .mp4 "" "GPAC\mp4"
 
588
  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
 
589
 
 
590
SectionEnd
 
591
 
 
592
Section "Associate 3GPP files (3GP) with Osmo4"
 
593
  SectionIn 1
 
594
  ;write file association
 
595
  ${WriteRegStrAuth} HKCR GPAC\3gp\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"
 
596
  ${WriteRegStrAuth} HKCR GPAC\3gp\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"
 
597
  ${WriteRegStrAuth} HKCR .3gp "" "GPAC\3gp"
 
598
  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
 
599
SectionEnd
 
600
 
 
601
Section "Associate 3GPP2 files (3G2) with Osmo4"
 
602
  SectionIn 1
 
603
  ;write file association
 
604
  ${WriteRegStrAuth} HKCR GPAC\3g2\DefaultIcon "" "$INSTDIR\Osmo4.ico, 0"
 
605
  ${WriteRegStrAuth} HKCR GPAC\3g2\Shell\open\command "" "$INSTDIR\Osmo4.exe %L"
 
606
  ${WriteRegStrAuth} HKCR .3g2 "" "GPAC\3g2"
 
607
  !system 'shell32.dll::SHChangeNotify(i, i, i, i) v (${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
 
608
SectionEnd
 
609
!endif
 
610
  
 
611
SubSectionEnd
 
612
 
 
613
 
 
614
 
 
615
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
 
616
  !insertmacro MUI_DESCRIPTION_TEXT ${SecOsmo4} "Osmo4 player"
 
617
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPlugins} "GPAC Plugins"
 
618
  !insertmacro MUI_DESCRIPTION_TEXT ${SecBIFS} "MPEG-4 BIFS Scene Decoder"
 
619
  !insertmacro MUI_DESCRIPTION_TEXT ${SecODF} "MPEG-4 Object Descriptor Decoder"
 
620
  !insertmacro MUI_DESCRIPTION_TEXT ${SecLASeR} "MPEG-4 LASeR Scene Decoder"
 
621
  !insertmacro MUI_DESCRIPTION_TEXT ${SecTextLoad} "Support for uncompressed MPEG-4 (BT and XMT), VRML and X3D textual formats"
 
622
  !insertmacro MUI_DESCRIPTION_TEXT ${SecSAF} "MPEG-4 SAF Demultiplexer"
 
623
  !insertmacro MUI_DESCRIPTION_TEXT ${SecIMG} "Support for PNG, JPEG, BMP and JPEG2000 images"
 
624
  !insertmacro MUI_DESCRIPTION_TEXT ${SecAAC} "Support for MPEG-4 Audio HE-AAC decoder and web radios"
 
625
  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP3} "Support for MPEG-1/2 Audio (inc. MP3) decoder and web radios"
 
626
  !insertmacro MUI_DESCRIPTION_TEXT ${SecAC3} "Support for Dolby AC3 decoder and web radios"
 
627
  !insertmacro MUI_DESCRIPTION_TEXT ${SecFFMPEG} "Support for FFMPEG libraries for various format decoding and demultiplexing"
 
628
  !insertmacro MUI_DESCRIPTION_TEXT ${SecXVID} "Support for XVID library for MPEG-4 Video Part 2 decoding"
 
629
  !insertmacro MUI_DESCRIPTION_TEXT ${SecAMRFT} "Support for AMR and AMR WideBand decoder and web radios"
 
630
  !insertmacro MUI_DESCRIPTION_TEXT ${SecSUBS} "Subtitle support include SRT, SUB, 3GPP and MPEG-4 Text formats"
 
631
  !insertmacro MUI_DESCRIPTION_TEXT ${SecISOFF} "Support for ISO-based file formats (3GP, MP4, MJ2K)"
 
632
  !insertmacro MUI_DESCRIPTION_TEXT ${SecM2TS} "Support for MPEG-2 Transport Stream"
 
633
  !insertmacro MUI_DESCRIPTION_TEXT ${SecRTP} "Support for RTP and RTSP IP streaming"
 
634
  !insertmacro MUI_DESCRIPTION_TEXT ${SecSVG} "Support for SVG including progressive loading"
 
635
  !insertmacro MUI_DESCRIPTION_TEXT ${SecWebVTT} "Support for WebVTT subtitles"
 
636
  !insertmacro MUI_DESCRIPTION_TEXT ${SecGDIP} "GDIPlus-based rasterizer"
 
637
  !insertmacro MUI_DESCRIPTION_TEXT ${SecG2DS} "GPAC software rasterizer"
 
638
  !insertmacro MUI_DESCRIPTION_TEXT ${SecFT} "FreeType font parsing"
 
639
  !insertmacro MUI_DESCRIPTION_TEXT ${SecWAVE} "Windows MME Audio output support"
 
640
  !insertmacro MUI_DESCRIPTION_TEXT ${SecXIPH} "Support for XIPP OGG, Vorbis and Theora media"
 
641
  !insertmacro MUI_DESCRIPTION_TEXT ${SecOSVC} "Support for SVC decoding through OpenSVC Decoder"
 
642
  !insertmacro MUI_DESCRIPTION_TEXT ${SecOHEVC} "Support for HEVC decoding through OpenHEVC Decoder"
 
643
  !insertmacro MUI_DESCRIPTION_TEXT ${SecDASH} "HTTP Streaming using MPEG DASH"
 
644
  !insertmacro MUI_DESCRIPTION_TEXT ${SecMSE}  "HTTP Streaming using HTML 5 Media Source Extensions"
 
645
  !insertmacro MUI_DESCRIPTION_TEXT ${SecUPnP} "Support for UPnP based on Platinum"
 
646
  !insertmacro MUI_DESCRIPTION_TEXT ${SecMPEGU} "Support for W3C and MPEG-U Widgets"
 
647
  !insertmacro MUI_DESCRIPTION_TEXT ${SecMobIP} "UNIGE Mobile IP Framework"
 
648
  !insertmacro MUI_DESCRIPTION_TEXT ${SecOffisComp} "OFFIS Audio Compressor"
 
649
  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP4B} "MP4Box command-line tool for various multimedia operations"
 
650
  !insertmacro MUI_DESCRIPTION_TEXT ${SecSDK} "GPAC SDK: headers and library files needed to develop modules for GPAC or appllication based on GPAC"
 
651
  !insertmacro MUI_DESCRIPTION_TEXT ${SecZILLA} "GPAC playback support NPAPI-based browsers (FireFox/Gecko, Safari/WebKit)"
 
652
  !insertmacro MUI_DESCRIPTION_TEXT ${SecGPAX} "GPAC playback support using ActiveX component (Internet Explorer)"
 
653
  !insertmacro MUI_DESCRIPTION_TEXT ${SecMP4C} "GPAC command-line player and AVI dumper"
 
654
  
 
655
!insertmacro MUI_FUNCTION_DESCRIPTION_END
 
656
 
 
657
 
 
658
Function .onInstSuccess
 
659
;  MessageBox MB_YESNO "GPAC Framework installation complete. Do you want to launch the Osmo4 player?" IDNO NoLaunch
 
660
;  Exec $INSTDIR\Osmo4.exe
 
661
;  NoLaunch:
 
662
FunctionEnd
 
663
 
 
664
 
 
665
 
 
666
 
 
667
 
 
668
; uninstall stuff
 
669
 
 
670
UninstallText "This will uninstall OSMO4/GPAC from your computer. Hit next to continue."
 
671
 
 
672
; special uninstall section.
 
673
Section "Uninstall"
 
674
  ; remove registry keys
 
675
  ${DeleteRegKeyAuth} HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\Osmo4"
 
676
  ${DeleteRegKeyAuth} HKCU "SOFTWARE\GPAC"
 
677
  ${DeleteRegKeyAuth} HKCU "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"
 
678
  ${DeleteRegKeyAuth} HKCR GPAC\mp4\DefaultIcon
 
679
  ${DeleteRegKeyAuth} HKCR GPAC\mp4\shell\open\command
 
680
  ${DeleteRegKeyAuth} HKCR GPAC\mp4
 
681
  ${DeleteRegKeyAuth} HKCR .mp4
 
682
  ${DeleteRegKeyAuth} HKCR GPAC\3gp\DefaultIcon
 
683
  ${DeleteRegKeyAuth} HKCR GPAC\3gp\shell\open\command
 
684
  ${DeleteRegKeyAuth} HKCR GPAC\3gp
 
685
  ${DeleteRegKeyAuth} HKCR .3gp
 
686
  ${DeleteRegKeyAuth} HKCR GPAC\3g2\DefaultIcon
 
687
  ${DeleteRegKeyAuth} HKCR GPAC\3g2\shell\open\command
 
688
  ${DeleteRegKeyAuth} HKCR GPAC\3g2
 
689
  ${DeleteRegKeyAuth} HKCR .3g2
 
690
  ${DeleteRegKeyAuth} HKCR GPAC
 
691
 
 
692
  UnRegDLL "$INSTDIR\GPAX.dll"
 
693
  RMDir /r $INSTDIR
 
694
  Push $INSTDIR
 
695
  Call un.RemoveFromPath
 
696
  #has current user admin privileges?
 
697
  userInfo::getAccountType
 
698
  Pop $0
 
699
  StrCmp $0 "Admin" +1 +2
 
700
  SetShellVarContext all
 
701
  Delete "$SMPROGRAMS\Osmo4\*.*"
 
702
  RMDir "$SMPROGRAMS\Osmo4"
 
703
  Delete "$QUICKLAUNCH\Osmo4.lnk"
 
704
  Delete "$DESKTOP\Osmo4.lnk"
 
705
 
 
706
SectionEnd
 
707
 
 
708
;path modif functions
 
709
!verbose 3
 
710
!include "WinMessages.NSH"
 
711
!verbose 4
 
712
 
 
713
!ifndef WriteEnvStr_RegKey
 
714
  !ifdef ALL_USERS
 
715
    !define WriteEnvStr_RegKey \
 
716
       'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
 
717
  !else
 
718
    !define WriteEnvStr_RegKey 'HKCU "Environment"'
 
719
  !endif
 
720
!endif
 
721
 
 
722
; AddToPath - Adds the given dir to the search path.
 
723
;        Input - head of the stack
 
724
;        Note - Win9x systems requires reboot
 
725
 
 
726
Function AddToPath
 
727
  Exch $0
 
728
  Push $1
 
729
  Push $2
 
730
  Push $3
 
731
 
 
732
  # don't add if the path doesn't exist
 
733
  IfFileExists "$0\*.*" "" AddToPath_done
 
734
 
 
735
  ReadEnvStr $1 PATH
 
736
  Push "$1;"
 
737
  Push "$0;"
 
738
  Call StrStr
 
739
  Pop $2
 
740
  StrCmp $2 "" "" AddToPath_done
 
741
  Push "$1;"
 
742
  Push "$0\;"
 
743
  Call StrStr
 
744
  Pop $2
 
745
  StrCmp $2 "" "" AddToPath_done
 
746
  GetFullPathName /SHORT $3 $0
 
747
  Push "$1;"
 
748
  Push "$3;"
 
749
  Call StrStr
 
750
  Pop $2
 
751
  StrCmp $2 "" "" AddToPath_done
 
752
  Push "$1;"
 
753
  Push "$3\;"
 
754
  Call StrStr
 
755
  Pop $2
 
756
  StrCmp $2 "" "" AddToPath_done
 
757
 
 
758
  Call IsNT
 
759
  Pop $1
 
760
  StrCmp $1 1 AddToPath_NT
 
761
    ; Not on NT
 
762
    StrCpy $1 $WINDIR 2
 
763
    FileOpen $1 "$1\autoexec.bat" a
 
764
    FileSeek $1 -1 END
 
765
    FileReadByte $1 $2
 
766
    IntCmp $2 26 0 +2 +2 # DOS EOF
 
767
      FileSeek $1 -1 END # write over EOF
 
768
    FileWrite $1 "$\r$\nSET PATH=%PATH%;$3$\r$\n"
 
769
    FileClose $1
 
770
    SetRebootFlag true
 
771
    Goto AddToPath_done
 
772
 
 
773
  AddToPath_NT:
 
774
    ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
 
775
    StrCpy $2 $1 1 -1 # copy last char
 
776
    StrCmp $2 ";" 0 +2 # if last char == ;
 
777
      StrCpy $1 $1 -1 # remove last char
 
778
    StrCmp $1 "" AddToPath_NTdoIt
 
779
      StrCpy $0 "$1;$0"
 
780
    AddToPath_NTdoIt:
 
781
      WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0
 
782
      SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
 
783
 
 
784
  AddToPath_done:
 
785
    Pop $3
 
786
    Pop $2
 
787
    Pop $1
 
788
    Pop $0
 
789
FunctionEnd
 
790
 
 
791
; RemoveFromPath - Remove a given dir from the path
 
792
;     Input: head of the stack
 
793
 
 
794
Function un.RemoveFromPath
 
795
  Exch $0
 
796
  Push $1
 
797
  Push $2
 
798
  Push $3
 
799
  Push $4
 
800
  Push $5
 
801
  Push $6
 
802
 
 
803
  IntFmt $6 "%c" 26 # DOS EOF
 
804
 
 
805
  Call un.IsNT
 
806
  Pop $1
 
807
  StrCmp $1 1 unRemoveFromPath_NT
 
808
    ; Not on NT
 
809
    StrCpy $1 $WINDIR 2
 
810
    FileOpen $1 "$1\autoexec.bat" r
 
811
    GetTempFileName $4
 
812
    FileOpen $2 $4 w
 
813
    GetFullPathName /SHORT $0 $0
 
814
    StrCpy $0 "SET PATH=%PATH%;$0"
 
815
    Goto unRemoveFromPath_dosLoop
 
816
 
 
817
    unRemoveFromPath_dosLoop:
 
818
      FileRead $1 $3
 
819
      StrCpy $5 $3 1 -1 # read last char
 
820
      StrCmp $5 $6 0 +2 # if DOS EOF
 
821
        StrCpy $3 $3 -1 # remove DOS EOF so we can compare
 
822
      StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoopRemoveLine
 
823
      StrCmp $3 "$0$\n" unRemoveFromPath_dosLoopRemoveLine
 
824
      StrCmp $3 "$0" unRemoveFromPath_dosLoopRemoveLine
 
825
      StrCmp $3 "" unRemoveFromPath_dosLoopEnd
 
826
      FileWrite $2 $3
 
827
      Goto unRemoveFromPath_dosLoop
 
828
      unRemoveFromPath_dosLoopRemoveLine:
 
829
        SetRebootFlag true
 
830
        Goto unRemoveFromPath_dosLoop
 
831
 
 
832
    unRemoveFromPath_dosLoopEnd:
 
833
      FileClose $2
 
834
      FileClose $1
 
835
      StrCpy $1 $WINDIR 2
 
836
      Delete "$1\autoexec.bat"
 
837
      CopyFiles /SILENT $4 "$1\autoexec.bat"
 
838
      Delete $4
 
839
      Goto unRemoveFromPath_done
 
840
 
 
841
  unRemoveFromPath_NT:
 
842
    ReadRegStr $1 ${WriteEnvStr_RegKey} "PATH"
 
843
    StrCpy $5 $1 1 -1 # copy last char
 
844
    StrCmp $5 ";" +2 # if last char != ;
 
845
      StrCpy $1 "$1;" # append ;
 
846
    Push $1
 
847
    Push "$0;"
 
848
    Call un.StrStr ; Find `$0;` in $1
 
849
    Pop $2 ; pos of our dir
 
850
    StrCmp $2 "" unRemoveFromPath_done
 
851
      ; else, it is in path
 
852
      # $0 - path to add
 
853
      # $1 - path var
 
854
      StrLen $3 "$0;"
 
855
      StrLen $4 $2
 
856
      StrCpy $5 $1 -$4 # $5 is now the part before the path to remove
 
857
      StrCpy $6 $2 "" $3 # $6 is now the part after the path to remove
 
858
      StrCpy $3 $5$6
 
859
 
 
860
      StrCpy $5 $3 1 -1 # copy last char
 
861
      StrCmp $5 ";" 0 +2 # if last char == ;
 
862
        StrCpy $3 $3 -1 # remove last char
 
863
 
 
864
      WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3
 
865
      SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
 
866
 
 
867
  unRemoveFromPath_done:
 
868
    Pop $6
 
869
    Pop $5
 
870
    Pop $4
 
871
    Pop $3
 
872
    Pop $2
 
873
    Pop $1
 
874
    Pop $0
 
875
FunctionEnd
 
876
 
 
877
###########################################
 
878
#            Utility Functions            #
 
879
###########################################
 
880
 
 
881
; IsNT
 
882
; no input
 
883
; output, top of the stack = 1 if NT or 0 if not
 
884
;
 
885
; Usage:
 
886
;   Call IsNT
 
887
;   Pop $R0
 
888
;  ($R0 at this point is 1 or 0)
 
889
 
 
890
!macro IsNT un
 
891
Function ${un}IsNT
 
892
  Push $0
 
893
  ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
 
894
  StrCmp $0 "" 0 IsNT_yes
 
895
  ; we are not NT.
 
896
  Pop $0
 
897
  Push 0
 
898
  Return
 
899
 
 
900
  IsNT_yes:
 
901
    ; NT!!!
 
902
    Pop $0
 
903
    Push 1
 
904
FunctionEnd
 
905
!macroend
 
906
!insertmacro IsNT ""
 
907
!insertmacro IsNT "un."
 
908
 
 
909
; StrStr
 
910
; input, top of stack = string to search for
 
911
;        top of stack-1 = string to search in
 
912
; output, top of stack (replaces with the portion of the string remaining)
 
913
; modifies no other variables.
 
914
;
 
915
; Usage:
 
916
;   Push "this is a long ass string"
 
917
;   Push "ass"
 
918
;   Call StrStr
 
919
;   Pop $R0
 
920
;  ($R0 at this point is "ass string")
 
921
 
 
922
!macro StrStr un
 
923
Function ${un}StrStr
 
924
Exch $R1 ; st=haystack,old$R1, $R1=needle
 
925
  Exch    ; st=old$R1,haystack
 
926
  Exch $R2 ; st=old$R1,old$R2, $R2=haystack
 
927
  Push $R3
 
928
  Push $R4
 
929
  Push $R5
 
930
  StrLen $R3 $R1
 
931
  StrCpy $R4 0
 
932
  ; $R1=needle
 
933
  ; $R2=haystack
 
934
  ; $R3=len(needle)
 
935
  ; $R4=cnt
 
936
  ; $R5=tmp
 
937
  loop:
 
938
    StrCpy $R5 $R2 $R3 $R4
 
939
    StrCmp $R5 $R1 done
 
940
    StrCmp $R5 "" done
 
941
    IntOp $R4 $R4 + 1
 
942
    Goto loop
 
943
done:
 
944
  StrCpy $R1 $R2 "" $R4
 
945
  Pop $R5
 
946
  Pop $R4
 
947
  Pop $R3
 
948
  Pop $R2
 
949
  Exch $R1
 
950
FunctionEnd
 
951
!macroend
 
952
!insertmacro StrStr ""
 
953
!insertmacro StrStr "un."