~ubuntu-branches/ubuntu/oneiric/libclaw/oneiric

« back to all changes in this revision

Viewing changes to libclaw.nsi

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge
  • Date: 2009-09-08 14:18:13 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090908141813-3gog70gacxiuzqru
Tags: 1.5.4-2
Pass -V option to dh_makeshlib.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
; Windows installer for Claw, a C++ Library Absolutely Wonderful
4
4
 
5
5
;--------------------------------
 
6
; Find the position of a given string, starting from the end of an other string
 
7
;
 
8
; Usage:
 
9
;   Push "this is a string"
 
10
;   Push "str"
 
11
;   Call Strrstr
 
12
;   Pop $0
 
13
;  ($0 at this point is 10)
 
14
 
 
15
Function Strrstr
 
16
  Exch $1 ; st=haystack,old$1, $1=needle
 
17
  Exch    ; st=old$1,haystack
 
18
  Exch $2 ; st=old$1,old$2, $2=haystack
 
19
  Push $3 ; len(haystack), result
 
20
  Push $4 ; len(needle)
 
21
  Push $5 ; tmp
 
22
 
 
23
  StrLen $3 $2
 
24
  StrLen $4 $1
 
25
 
 
26
  loop:
 
27
    IntOp $3 $3 - 1
 
28
    IntCmp $3 -1 done
 
29
    StrCpy $5 $2 $4 $3
 
30
    StrCmp $5 $1 done
 
31
    Goto loop
 
32
  done:
 
33
  Pop $5
 
34
  Pop $4
 
35
  Pop $2
 
36
  Pop $1
 
37
  Exch $3
 
38
FunctionEnd
 
39
 
 
40
; same as above
 
41
Function un.Strrstr
 
42
  Exch $1 ; st=haystack,old$1, $1=needle
 
43
  Exch    ; st=old$1,haystack
 
44
  Exch $2 ; st=old$1,old$2, $2=haystack
 
45
  Push $3 ; len(haystack), result
 
46
  Push $4 ; len(needle)
 
47
  Push $5 ; tmp
 
48
 
 
49
  StrLen $3 $2
 
50
  StrLen $4 $1
 
51
 
 
52
  loop:
 
53
    IntOp $3 $3 - 1
 
54
    IntCmp $3 -1 done
 
55
    StrCpy $5 $2 $4 $3
 
56
    StrCmp $5 $1 done
 
57
    Goto loop
 
58
  done:
 
59
  Pop $5
 
60
  Pop $4
 
61
  Pop $2
 
62
  Pop $1
 
63
  Exch $3
 
64
FunctionEnd
 
65
 
 
66
;--------------------------------
6
67
 
7
68
; The name of the installer
8
69
Name "Claw Windows installer"
107
168
  EnumRegKey $0 HKLM "Software\Kitware" 0
108
169
  ReadRegStr $1 HKLM "Software\Kitware\$0" ""
109
170
 
 
171
  ; extract major and minor version numbers
 
172
  Push $1
 
173
  Push $0
 
174
  Push " "
 
175
  Call Strrstr
 
176
  Pop $3
 
177
  Pop $1
 
178
  IntCmp $3 -1 cmake_failed
 
179
  IntOp $3 $3 + 1
 
180
  StrCpy $3 $0 3 $3
 
181
 
110
182
  IfErrors cmake_failed
111
183
 
112
184
  ; Set output path to the installation directory.
113
 
  SetOutPath $1\share\cmake-2.4\Modules
 
185
  SetOutPath $1\share\cmake-$3\Modules
114
186
  
115
187
  File "cmake-module\FindCLAW*.cmake"
116
188
 
159
231
  EnumRegKey $0 HKLM "Software\Kitware" 0
160
232
  ReadRegStr $1 HKLM "Software\Kitware\$0" ""
161
233
 
 
234
  ; extract major and minor version numbers
 
235
  Push $1
 
236
  Push $0
 
237
  Push " "
 
238
  Call un.Strrstr
 
239
  Pop $3
 
240
  Pop $1
 
241
  IntCmp $3 -1 cmake_failed
 
242
  IntOp $3 $3 + 1
 
243
  StrCpy $3 $0 3 $3
 
244
 
162
245
  IfErrors cmake_failed
163
246
 
164
247
  ; Remove modules for Claw
165
 
  Delete "$1\share\cmake-2.4\Modules\FindCLAW*.cmake"
 
248
  Delete "$1\share\cmake-$3\Modules\FindCLAW*.cmake"
166
249
 
167
250
  cmake_failed:
168
251
    ClearErrors
169
 
SectionEnd
 
 
b'\\ No newline at end of file'
 
252
SectionEnd