1
;--------------------------------
3
!define GPAC_VERSION 0.5.1-DEV
6
!define GPAC_ROOT ..\..\..
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"
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"
17
InstallDirRegKey HKCU "SOFTWARE\GPAC" "InstallDir"
19
RequestExecutionLevel highest
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."
32
UserInfo::GetAccountType
36
;--------------------------------
42
Icon "${GPAC_ROOT}\doc\osmo4.ico"
43
UninstallIcon "${GPAC_ROOT}\doc\osmo4.ico"
45
;--------------------------------
48
!define MUI_ABORTWARNING
54
LangString PAGE_TITLE ${LANG_ENGLISH} "Title"
55
LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"
59
${NSD_GetState} $Confirm $R1
60
GetDlgItem $0 $HWNDPARENT 1
61
${If} $R1 == ${BST_CHECKED}
69
!insertmacro MUI_HEADER_TEXT "Patents and Royalties" "Please read carefully the following clause."
70
GetDlgItem $0 $HWNDPARENT 1
72
nsDialogs::Create 1018
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."
78
${NSD_CreateCheckBox} 0 -30 100% 12u "I understand and accept the conditions"
80
GetFunctionAddress $0 EnableNext
81
nsDialogs::OnClick $Confirm $0
87
;--------------------------------
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
96
!insertmacro MUI_PAGE_INSTFILES
97
!insertmacro MUI_PAGE_FINISH
99
!insertmacro MUI_UNPAGE_CONFIRM
100
!insertmacro MUI_UNPAGE_INSTFILES
102
!insertmacro MUI_LANGUAGE "English"
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"
108
Function FctWriteRegStrAuth
115
;pop function arguments
125
;test if calling HKCR
126
StrCmp $R0 "HKCR" +1 +3
127
WriteRegStr HKCR $R1 $R2 $R3
130
#has current user admin privileges?
131
userInfo::getAccountType
133
StrCmp $0 "Admin" lbl_admin lbl_not_admin
136
WriteRegStr HKLM $R1 $R2 $R3
140
WriteRegStr HKCU $R1 $R2 $R3
150
!macro WriteRegStrAuth HKREG SUBREG ENTRY VALUESTR
155
Call FctWriteRegStrAuth
158
!define WriteRegStrAuth "!insertmacro WriteRegStrAuth"
161
Function un.FctDeleteRegKeyAuth
166
;pop function arguments
172
;test if calling HKCR
173
StrCmp $R0 "HKCR" +1 +3
174
DeleteRegKey HKCR $R1
177
#has current user admin privileges?
178
userInfo::getAccountType
180
StrCmp $0 "Admin" lbl_admin lbl_not_admin
183
DeleteRegKey HKLM $R1
187
DeleteRegKey HKCU $R1
195
!macro DeleteRegKeyAuth HKREG SUBREG
198
Call un.FctDeleteRegKeyAuth
201
!define DeleteRegKeyAuth "!insertmacro DeleteRegKeyAuth"
203
Function InsertGDIPLUS
206
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
207
StrCmp $R0 "" 0 lbl_winnt
210
ReadRegStr $R0 HKLM SOFTWARE\Microsoft\Windows\CurrentVersion VersionNumber
213
; win95, NOT SUPPORTED
214
StrCmp $R1 '4' 0 lbl_err_95
216
StrCmp $R1 '4.0' lbl_err_95
217
;winME or 98 otherwise
218
StrCmp $R1 '4.9' lbl_add lbl_add
221
MessageBox MB_OK "Microsoft GDI+ cannot be installed on NT 3 Systems"
225
MessageBox MB_OK "Microsoft GDI+ cannot be installed on Windows 95 and older Systems"
230
StrCmp $R1 '3' lbl_err_nt
231
StrCmp $R1 '4' lbl_add
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
239
File "${GPAC_BIN}\Gdiplus.dll"
243
File "${GPAC_BIN}\gm_gdip_raster.dll"
249
Section "Osmo4/GPAC Player" SecOsmo4
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"
260
File "${GPAC_BIN}\Osmo4.exe"
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"
272
;create default cache
273
SetOutPath $INSTDIR\cache
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\*
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"
297
SubSection "GPAC Plugins" SecPlugins
301
; 2 install modes, normal one and full one
303
Section "MPEG-4 BIFS Decoder" SecBIFS
305
File "${GPAC_BIN}\gm_bifs_dec.dll"
308
Section "MPEG-4 ODF Decoder" SecODF
310
File "${GPAC_BIN}\gm_odf_dec.dll"
313
Section "MPEG-4 LASeR Decoder" SecLASeR
315
File "${GPAC_BIN}\gm_laser_dec.dll"
318
Section "MPEG-4 SAF Demultiplexer" SecSAF
320
File "${GPAC_BIN}\gm_saf_in.dll"
323
Section "Textual MPEG-4 Loader" SecTextLoad
325
File "${GPAC_BIN}\gm_ctx_load.dll"
328
Section "Image Package (PNG, JPEG, BMP)" SecIMG
330
File "${GPAC_BIN}\gm_img_in.dll"
333
Section "AAC Audio" SecAAC
335
File "${GPAC_BIN}\gm_aac_in.dll"
338
Section "MP3 Audio" SecMP3
340
File "${GPAC_BIN}\gm_mp3_in.dll"
343
Section "AC3 Audio" SecAC3
345
File "${GPAC_BIN}\gm_ac3_in.dll"
348
Section "FFMPEG" SecFFMPEG
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"
361
Section "XviD Video Decoder" SecXVID
363
File "${GPAC_BIN}\gm_xvid_dec.dll"
366
;Section "AMR NB & WB" SecAMRFT
368
; File "..\gm_amr_float_dec.dll"
371
Section "Subtitles" SecSUBS
373
File "${GPAC_BIN}\gm_timedtext.dll"
376
Section "ISO File Format" SecISOFF
378
File "${GPAC_BIN}\gm_isom_in.dll"
381
Section "MPEG-2 TS" SecM2TS
383
File "${GPAC_BIN}\gm_mpegts_in.dll"
386
Section "RTP/RTSP" SecRTP
388
File "${GPAC_BIN}\gm_rtp_in.dll"
393
File "${GPAC_BIN}\gm_svg_in.dll"
396
Section "WebVTT" SecWebVTT
398
File "${GPAC_BIN}\gm_vtt_in.dll"
401
Section "GDI+" SecGDIP
406
Section "GPAC 2D Raster" SecG2DS
408
File "${GPAC_BIN}\gm_soft_raster.dll"
411
Section "FreeType" SecFT
413
File "${GPAC_BIN}\gm_ft_font.dll"
416
Section "Windows MME Audio" SecWAVE
418
File "${GPAC_BIN}\gm_wav_out.dll"
421
Section "Xiph" SecXIPH
423
File "${GPAC_BIN}\gm_ogg.dll"
426
Section "OpenSVC Decoder" SecOSVC
428
File "${GPAC_BIN}\OpenSVCDecoder.dll"
429
File "${GPAC_BIN}\gm_opensvc_dec.dll"
432
Section "OpenHEVC Decoder" SecOHEVC
434
File "${GPAC_BIN}\libLibOpenHevcWrapper.dll"
435
File "${GPAC_BIN}\gm_openhevc_dec.dll"
438
Section "MPEG DASH Suppport" SecDASH
440
File "${GPAC_BIN}\gm_mpd_in.dll"
443
Section "HTML 5 Media Source Extensions Suppport" SecMSE
445
File "${GPAC_BIN}\gm_mse_in.dll"
448
Section "UPnP Support" SecUPnP
450
File "${GPAC_BIN}\gm_platinum.dll"
453
Section "Widget Manager" SecMPEGU
455
File "${GPAC_BIN}\gm_widgetman.dll"
458
;Section "MobileIP Framework" SecMobIP
460
; File "..\gm_mobile_ip.dll"
461
; File "..\MobileSession.dll"
465
;Section "OFFIS Audio compressor" SecOffisComp
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
479
Section "MP4Box" SecMP4B
482
File "${GPAC_BIN}\MP4Box.exe"
483
File "${GPAC_BIN}\MP42TS.exe"
484
File "${GPAC_BIN}\dashcast.exe"
491
Section "GPAC SDK" SecSDK
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
502
!define HK_MOZ "SOFTWARE\MozillaPlugins\@gpac/osmozilla,version=1.0"
504
Section "Osmozilla" SecZILLA
507
File "${GPAC_BIN}\nposmozilla.dll"
508
File "${GPAC_BIN}\nposmozilla.xpt"
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"
519
Section "GPAX" SecGPAX
522
File "${GPAC_BIN}\GPAX.dll"
523
RegDLL "$INSTDIR\GPAX.dll"
527
Section "MP4Client" SecMP4C
530
File "${GPAC_BIN}\MP4Client.exe"
535
Section "Windows Runtime Libraries" SecMSVCRT
537
; File "..\Microsoft.VC100.CRT.manifest"
538
; File "..\Microsoft.VC100.MFC.manifest"
539
File "${GPAC_BIN}\msvcr100.dll"
540
File "${GPAC_BIN}\mfc100.dll"
546
SubSection "Osmo4 Shortcuts"
548
Section "Add Start Menu Shortcuts"
550
#has current user admin privileges?
551
userInfo::getAccountType
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
558
CreateShortCut "$SMPROGRAMS\Osmo4\Osmo4 (Classic UI).lnk" "$INSTDIR\Osmo4.exe" ""
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"
569
Section "Add shortcut to QuickLaunch"
571
CreateShortCut "$QUICKLAUNCH\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0
574
Section "Add shortcut to Desktop"
576
CreateShortCut "$DESKTOP\Osmo4.lnk" "$INSTDIR\Osmo4.exe" "" "$INSTDIR\Osmo4.exe" 0
579
!define SHCNE_ASSOCCHANGED 0x08000000
580
!define SHCNF_IDLIST 0
582
Section "Make Osmo4 the default MPEG-4 Player"
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)'
592
Section "Associate 3GPP files (3GP) with Osmo4"
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)'
601
Section "Associate 3GPP2 files (3G2) with Osmo4"
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)'
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"
655
!insertmacro MUI_FUNCTION_DESCRIPTION_END
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
670
UninstallText "This will uninstall OSMO4/GPAC from your computer. Hit next to continue."
672
; special uninstall section.
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
692
UnRegDLL "$INSTDIR\GPAX.dll"
695
Call un.RemoveFromPath
696
#has current user admin privileges?
697
userInfo::getAccountType
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"
708
;path modif functions
710
!include "WinMessages.NSH"
713
!ifndef WriteEnvStr_RegKey
715
!define WriteEnvStr_RegKey \
716
'HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"'
718
!define WriteEnvStr_RegKey 'HKCU "Environment"'
722
; AddToPath - Adds the given dir to the search path.
723
; Input - head of the stack
724
; Note - Win9x systems requires reboot
732
# don't add if the path doesn't exist
733
IfFileExists "$0\*.*" "" AddToPath_done
740
StrCmp $2 "" "" AddToPath_done
745
StrCmp $2 "" "" AddToPath_done
746
GetFullPathName /SHORT $3 $0
751
StrCmp $2 "" "" AddToPath_done
756
StrCmp $2 "" "" AddToPath_done
760
StrCmp $1 1 AddToPath_NT
763
FileOpen $1 "$1\autoexec.bat" a
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"
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
781
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $0
782
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
791
; RemoveFromPath - Remove a given dir from the path
792
; Input: head of the stack
794
Function un.RemoveFromPath
803
IntFmt $6 "%c" 26 # DOS EOF
807
StrCmp $1 1 unRemoveFromPath_NT
810
FileOpen $1 "$1\autoexec.bat" r
813
GetFullPathName /SHORT $0 $0
814
StrCpy $0 "SET PATH=%PATH%;$0"
815
Goto unRemoveFromPath_dosLoop
817
unRemoveFromPath_dosLoop:
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
827
Goto unRemoveFromPath_dosLoop
828
unRemoveFromPath_dosLoopRemoveLine:
830
Goto unRemoveFromPath_dosLoop
832
unRemoveFromPath_dosLoopEnd:
836
Delete "$1\autoexec.bat"
837
CopyFiles /SILENT $4 "$1\autoexec.bat"
839
Goto unRemoveFromPath_done
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 ;
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
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
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
864
WriteRegExpandStr ${WriteEnvStr_RegKey} "PATH" $3
865
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
867
unRemoveFromPath_done:
877
###########################################
878
# Utility Functions #
879
###########################################
883
; output, top of the stack = 1 if NT or 0 if not
888
; ($R0 at this point is 1 or 0)
893
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
894
StrCmp $0 "" 0 IsNT_yes
907
!insertmacro IsNT "un."
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.
916
; Push "this is a long ass string"
920
; ($R0 at this point is "ass string")
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
938
StrCpy $R5 $R2 $R3 $R4
944
StrCpy $R1 $R2 "" $R4
952
!insertmacro StrStr ""
953
!insertmacro StrStr "un."