/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/nsis/SharedRedtape.nsh
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/nsis/SharedRedtape.nsh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 9 months ago) by william
File size: 3507 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1
2
3 ; =======================================================================
4 ; Plugin Includes
5 ; =======================================================================
6 ; Note that zzOgl is disabled for now because it requires CG dependencies to be installed.
7
8 !if ${INC_PLUGINS} > 0
9 !system 'SubWCRev.exe ..\plugins\gsdx templates\svnrev_gsdx.nsh svnrev_gsdx.nsh'
10 !system 'SubWCRev.exe ..\plugins\spu2-x templates\svnrev_spu2x.nsh svnrev_spu2x.nsh'
11 !system 'SubWCRev.exe ..\plugins\cdvdiso templates\svnrev_cdvdiso.nsh svnrev_cdvdiso.nsh'
12 !system 'SubWCRev.exe ..\plugins\lilypad templates\svnrev_lilypad.nsh svnrev_lilypad.nsh'
13 !system 'SubWCRev.exe ..\plugins\zerogs\dx templates\svnrev_zerogs.nsh svnrev_zerogs.nsh'
14 ;!system 'SubWCRev.exe ..\plugins\zzogl-pg templates\svnrev_zzogl.nsh svnrev_zzogl.nsh'
15 !system 'SubWCRev.exe ..\plugins\zerospu2 templates\svnrev_zerospu2.nsh svnrev_zerospu2.nsh'
16
17 !include "svnrev_gsdx.nsh"
18 !include "svnrev_spu2x.nsh"
19 !include "svnrev_cdvdiso.nsh"
20 !include "svnrev_lilypad.nsh"
21 !include "svnrev_zerogs.nsh"
22 ;!include "svnrev_zzogl.nsh"
23 !include "svnrev_zerospu2.nsh"
24 !endif
25
26 ; =======================================================================
27 ; Shared Install Functions
28 ; =======================================================================
29
30 ; ==================================================================================
31
32 Function .onInit
33
34 ;prepare Advanced Uninstall log always within .onInit function
35 !insertmacro UNINSTALL.LOG_PREPARE_INSTALL
36
37 ; MORE UAC HELL ---------- >
38 call IsUserAdmin
39
40 FunctionEnd
41
42
43 Function .onInstSuccess
44
45 ;create/update log always within .onInstSuccess function
46 !insertmacro UNINSTALL.LOG_UPDATE_INSTALL
47
48 FunctionEnd
49
50
51 ; =======================================================================
52 ; Shared Uninstall Functions
53 ; =======================================================================
54
55 ; Safe directory deletion code. :)
56 ;
57 Function un.DeleteDirIfEmpty
58
59 ; Use $TEMP as the out dir when removing directories, since NSIS won't let us remove the
60 ; "current" directory.
61 SetOutPath "$TEMP"
62
63 FindFirst $R0 $R1 "$0\*.*"
64 strcmp $R1 "." 0 NoDelete
65 FindNext $R0 $R1
66 strcmp $R1 ".." 0 NoDelete
67 ClearErrors
68 FindNext $R0 $R1
69 IfErrors 0 NoDelete
70 FindClose $R0
71 Sleep 1000
72 RMDir "$0"
73 NoDelete:
74 FindClose $R0
75 FunctionEnd
76
77
78 ; ==================================================================================
79 Function un.removeShorties
80
81 ; Remove shortcuts, if any
82
83 Delete "$DESKTOP\${APP_NAME}.lnk"
84
85 Delete "$SMPROGRAMS\PCSX2\Uninstall ${APP_NAME}.lnk"
86 Delete "$SMPROGRAMS\PCSX2\${APP_NAME}.lnk"
87 ;Delete "$SMPROGRAMS\PCSX2\pcsx2-dev-r${SVNREV}.lnk"
88
89 StrCpy $0 "$SMPROGRAMS\PCSX2"
90 Call un.DeleteDirIfEmpty
91
92 FunctionEnd
93
94 ; begin uninstall, could be added on top of uninstall section instead
95 Function un.onInit
96 !insertmacro UNINSTALL.LOG_BEGIN_UNINSTALL
97 FunctionEnd
98
99
100 Function un.onUninstSuccess
101 !insertmacro UNINSTALL.LOG_END_UNINSTALL
102
103 ; And remove the various install dir(s) but only if they're clean of user content:
104
105 StrCpy $0 "$INSTDIR\langs"
106 Call un.DeleteDirIfEmpty
107
108 StrCpy $0 "$INSTDIR\plugins"
109 Call un.DeleteDirIfEmpty
110
111 StrCpy $0 "$INSTDIR"
112 Call un.DeleteDirIfEmpty
113 FunctionEnd
114

  ViewVC Help
Powered by ViewVC 1.1.22