~ubuntu-branches/ubuntu/natty/pidgin-otr/natty-updates

« back to all changes in this revision

Viewing changes to packaging/windows/pidgin-otr.nsi

  • Committer: Bazaar Package Importer
  • Author(s): Thibaut VARENE
  • Date: 2008-07-10 17:34:32 UTC
  • mfrom: (2.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080710173432-aqx359odj7cp182a
Tags: 3.2.0-2
Make key generation use /dev/urandom (Closes: #489523)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
; Script based on generated HM NIS Edit Script Wizard.
2
 
; Forgive me, i am new at this. -- {paul,iang}@cypherpunks.ca
 
2
; Forgive me, i am new at this. -- {paul,ian}@cypherpunks.ca
3
3
;
4
 
; known issue. installer induced uninstaller abortion causes overwrite by installer without
5
 
; uninstall.
6
 
; v3.0.0    - Version for pidgin-2.0.0
 
4
; known issue. installer induced uninstaller abortion causes overwrite
 
5
; by installer without uninstall.
 
6
; v3.2.0   - New source version.
 
7
; v3.1.0   - New source version.  Install and uninstall i18n files.
 
8
; v3.0.0   - Version for pidgin-2.0.0
7
9
; v3.0.0   - Bump version number.
8
10
; v2.0.2   - Bump version number.
9
11
; v2.0.1   - Bump version number.
23
25
; todo: SetBrandingImage
24
26
; HM NIS Edit Wizard helper defines
25
27
!define PRODUCT_NAME "pidgin-otr"
26
 
!define PRODUCT_VERSION "3.0.0"
 
28
!define PRODUCT_VERSION "3.2.0-1"
27
29
!define PRODUCT_PUBLISHER "Cypherpunks CA"
28
30
!define PRODUCT_WEB_SITE "http://otr.cypherpunks.ca/"
29
31
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
69
71
ShowUnInstDetails show
70
72
 
71
73
Section "MainSection" SEC01
72
 
;InstallDir "$PROGRAMFILES\Pidgin\plugins"
73
 
 
74
 
; uninstall previous pidgin-otr install if found.
75
 
Call UnInstOld
76
 
 ;Check for pidgin installation
77
 
Call GetPidginInstPath
78
 
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr" "pidgindir" "$PidginDir"
79
 
 
80
 
        SetOutPath "$INSTDIR"
81
 
  SetOverwrite on
82
 
  File "c:\otr\pidgin-otr.dll"
83
 
  ; move to pidgin plugin directory, check if not busy (pidgin is running)
84
 
        call CopyDLL
85
 
  ; hard part is done, do the rest now.
86
 
  SetOverwrite on         
87
 
  File "c:\otr\README.Toolkit.txt"
88
 
        File "c:\otr\README.txt"
89
 
        File "c:\otr\Protocol-v2.html"
90
 
        File "c:\otr\COPYING.txt"
91
 
        File "c:\otr\COPYING.LIB.txt"
92
 
        File "c:\otr\otr_mackey.exe"
93
 
        File "c:\otr\otr_modify.exe"
94
 
        File "c:\otr\otr_parse.exe"
95
 
        File "c:\otr\otr_readforge.exe"
96
 
        File "c:\otr\otr_remac.exe"
97
 
        File "c:\otr\otr_sesskeys.exe"
98
 
        File "c:\otr\pidgin-otr.nsi"
 
74
    ;InstallDir "$PROGRAMFILES\Pidgin\plugins"
 
75
 
 
76
    ; uninstall previous pidgin-otr install if found.
 
77
    Call UnInstOld
 
78
    ;Check for pidgin installation
 
79
    Call GetPidginInstPath
 
80
    WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr" "pidgindir" "$PidginDir"
 
81
 
 
82
    SetOutPath "$PidginDir\locale"
 
83
    SetOverwrite on
 
84
    ; What the next line means is to recursively search c:\otr\locale
 
85
    ; and install all files under there named pidgin-otr.mo
 
86
    File /r "c:\otr\locale\pidgin-otr.mo"
 
87
 
 
88
    SetOutPath "$INSTDIR"
 
89
    SetOverwrite on
 
90
    File "c:\otr\pidgin-otr.dll"
 
91
    ; move to pidgin plugin directory, check if not busy (pidgin is running)
 
92
    call CopyDLL
 
93
    ; hard part is done, do the rest now.
 
94
    SetOverwrite on       
 
95
    File "c:\otr\README.Toolkit.txt"
 
96
    File "c:\otr\README.txt"
 
97
    File "c:\otr\Protocol-v2.html"
 
98
    File "c:\otr\COPYING.txt"
 
99
    File "c:\otr\COPYING.LIB.txt"
 
100
    File "c:\otr\otr_mackey.exe"
 
101
    File "c:\otr\otr_modify.exe"
 
102
    File "c:\otr\otr_parse.exe"
 
103
    File "c:\otr\otr_readforge.exe"
 
104
    File "c:\otr\otr_remac.exe"
 
105
    File "c:\otr\otr_sesskeys.exe"
 
106
    File "c:\otr\pidgin-otr.nsi"
99
107
SectionEnd
100
108
 
101
109
Section -AdditionalIcons
125
133
 
126
134
Section Uninstall
127
135
  Delete "$INSTDIR\pidgin-otr-uninst.exe"
128
 
        Delete "$INSTDIR\README.Toolkit.txt"
129
 
        Delete "$INSTDIR\README.txt"
130
 
        Delete "$INSTDIR\Protocol-v2.txt"
131
 
        Delete "$INSTDIR\COPYING.txt"
132
 
        Delete "$INSTDIR\COPYING.LIB.txt"
133
 
        Delete "$INSTDIR\otr_mackey.exe"
134
 
        Delete "$INSTDIR\otr_modify.exe"
135
 
        Delete "$INSTDIR\otr_parse.exe"
136
 
        Delete "$INSTDIR\otr_readforge.exe"
137
 
        Delete "$INSTDIR\otr_remac.exe"
138
 
        Delete "$INSTDIR\otr_sesskeys.exe"
139
 
        Delete "$INSTDIR\pidgin-otr.nsi"
 
136
  Delete "$INSTDIR\README.Toolkit.txt"
 
137
  Delete "$INSTDIR\README.txt"
 
138
  Delete "$INSTDIR\Protocol-v2.txt"
 
139
  Delete "$INSTDIR\COPYING.txt"
 
140
  Delete "$INSTDIR\COPYING.LIB.txt"
 
141
  Delete "$INSTDIR\otr_mackey.exe"
 
142
  Delete "$INSTDIR\otr_modify.exe"
 
143
  Delete "$INSTDIR\otr_parse.exe"
 
144
  Delete "$INSTDIR\otr_readforge.exe"
 
145
  Delete "$INSTDIR\otr_remac.exe"
 
146
  Delete "$INSTDIR\otr_sesskeys.exe"
 
147
  Delete "$INSTDIR\pidgin-otr.nsi"
140
148
  Delete "$SMPROGRAMS\pidgin-otr\Uninstall.lnk"
141
149
  RMDir "$SMPROGRAMS\pidgin-otr"
142
150
  RMDir "$INSTDIR"
153
161
  MessageBox MB_OK|MB_ICONINFORMATION "Could not find pidgin plugin directory, pidgin-otr.dll not uninstalled!" IDOK ok
154
162
dodelete:
155
163
        Delete "$PidginDir\plugins\pidgin-otr.dll"
 
164
 
 
165
        ; Find all the language dirs and delete pidgin-otr.mo in all of them
 
166
        Push $0
 
167
        Push $1
 
168
        FindFirst $0 $1 $PidginDir\locale\*
 
169
        loop:
 
170
                StrCmp $1 "" loopdone
 
171
                Delete $PidginDir\locale\$1\LC_MESSAGES\pidgin-otr.mo
 
172
                FindNext $0 $1
 
173
                Goto loop
 
174
        loopdone:
 
175
        Pop $1
 
176
        Pop $0
156
177
        
157
178
        IfFileExists "$PidginDir\plugins\pidgin-otr.dll" 0 +2
158
179
                MessageBox MB_OK|MB_ICONINFORMATION "pidgin-otr.dll is busy. Probably Pidgin is still running. Please delete $PidginDir\plugins\pidgin-otr.dll manually."
 
180
 
159
181
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
160
182
  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "SOFTWARE\pidgin-otr\pidgindir"
161
183
ok:
162
184
SetAutoClose true
163
185
SectionEnd
 
186
 
164
187
Function GetPidginInstPath
165
188
  Push $0
166
189
  ReadRegStr $0 HKLM "Software\pidgin" ""