/[pcsx2_0.9.7]/trunk/nsis/SharedRedtape.nsh
ViewVC logotype

Contents of /trunk/nsis/SharedRedtape.nsh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 273 - (show annotations) (download)
Fri Nov 12 01:10:22 2010 UTC (9 years ago) by william
File size: 3555 byte(s)
Auto Commited Import of: pcsx2-0.9.7-DEBUG (upstream: v0.9.7.4013 local: v0.9.7.197-latest) in ./trunk
1
2 ; =======================================================================
3 ; Plugin Includes
4 ; =======================================================================
5 ; Note that zzOgl is disabled for now because it requires CG dependencies to be installed.
6
7 !if ${INC_PLUGINS} > 0
8 !system 'SubWCRev.exe ..\plugins\gsdx templates\svnrev_gsdx.nsh svnrev_gsdx.nsh'
9 !system 'SubWCRev.exe ..\plugins\spu2-x templates\svnrev_spu2x.nsh svnrev_spu2x.nsh'
10 !system 'SubWCRev.exe ..\plugins\cdvdiso templates\svnrev_cdvdiso.nsh svnrev_cdvdiso.nsh'
11 !system 'SubWCRev.exe ..\plugins\lilypad templates\svnrev_lilypad.nsh svnrev_lilypad.nsh'
12 !system 'SubWCRev.exe ..\plugins\zerogs\dx templates\svnrev_zerogs.nsh svnrev_zerogs.nsh'
13 ;!system 'SubWCRev.exe ..\plugins\zzogl-pg templates\svnrev_zzogl.nsh svnrev_zzogl.nsh'
14 !system 'SubWCRev.exe ..\plugins\zerospu2 templates\svnrev_zerospu2.nsh svnrev_zerospu2.nsh'
15
16 !include "svnrev_gsdx.nsh"
17 !include "svnrev_spu2x.nsh"
18 !include "svnrev_cdvdiso.nsh"
19 !include "svnrev_lilypad.nsh"
20 !include "svnrev_zerogs.nsh"
21 ;!include "svnrev_zzogl.nsh"
22 !include "svnrev_zerospu2.nsh"
23 !endif
24
25 ; =======================================================================
26 ; Shared Install Functions
27 ; =======================================================================
28
29 Function .onInit
30
31 ;prepare Advanced Uninstall log always within .onInit function
32 !insertmacro UNINSTALL.LOG_PREPARE_INSTALL
33
34 ; MORE UAC HELL ---------- >
35 ;call IsUserAdmin
36
37 FunctionEnd
38
39
40 Function .onInstSuccess
41
42 ;create/update log always within .onInstSuccess function
43 !insertmacro UNINSTALL.LOG_UPDATE_INSTALL
44
45 FunctionEnd
46
47
48 ; =======================================================================
49 ; Shared Uninstall Functions
50 ; =======================================================================
51
52 ; Safe directory deletion code. :)
53 ;
54 Function un.DeleteDirIfEmpty
55
56 ; Use $TEMP as the out dir when removing directories, since NSIS won't let us remove the
57 ; "current" directory.
58 SetOutPath "$TEMP"
59
60 FindFirst $R0 $R1 "$0\*.*"
61 strcmp $R1 "." 0 NoDelete
62 FindNext $R0 $R1
63 strcmp $R1 ".." 0 NoDelete
64 ClearErrors
65 FindNext $R0 $R1
66 IfErrors 0 NoDelete
67 FindClose $R0
68 Sleep 1000
69 RMDir "$0"
70 NoDelete:
71 FindClose $R0
72 FunctionEnd
73
74
75 ; ==================================================================================
76 Function un.removeShorties
77
78 ; Remove shortcuts, if any
79
80 Delete "$DESKTOP\${APP_NAME}.lnk"
81
82 Delete "$SMPROGRAMS\PCSX2\Uninstall ${APP_NAME}.lnk"
83 Delete "$SMPROGRAMS\PCSX2\${APP_NAME}.lnk"
84 ;Delete "$SMPROGRAMS\PCSX2\pcsx2-dev-r${SVNREV}.lnk"
85
86 Delete "$SMPROGRAMS\PCSX2\Readme ${APP_VERSION}.lnk"
87 Delete "$SMPROGRAMS\PCSX2\Frequently Asked Questions ${APP_VERSION}.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\docs"
112 Call un.DeleteDirIfEmpty
113
114 StrCpy $0 "$INSTDIR\Cheats"
115 Call un.DeleteDirIfEmpty
116
117 StrCpy $0 "$INSTDIR"
118 Call un.DeleteDirIfEmpty
119 FunctionEnd
120

  ViewVC Help
Powered by ViewVC 1.1.22