Diff of /CPGenerators/Autopano-sift-c-lemur.nsh [000000] .. [662a9a] Maximize Restore

  Switch to unified view

a b/CPGenerators/Autopano-sift-c-lemur.nsh
1
; Autopano-sift-c
2
!define AUTOPANO_SIFTC_LEMUR_VERSION "2.5.2 (Lemur)"
3
!define AUTOPANO_SIFTC_LEMUR_SIZE 5000
4
; !define AUTOPANO_SIFTC_LEMUR_DL_URL "ftp://tksftp:TKSpwd1@tksharpless.net/autopano-sift-c.exe"
5
!define AUTOPANO_SIFTC_LEMUR_DL_URL "http://dl.dropbox.com/u/2070182/hugin/autopano-sift-c-lemur_2.5.2.7z"
6
7
Section /o "Autopano-SIFT-C Multirow/Stacked ${AUTOPANO_SIFTC_LEMUR_VERSION}" SecAutopano_SIFTC_Lemur
8
  ; SectionIn RO
9
  AddSize ${AUTOPANO_SIFTC_LEMUR_SIZE}
10
  SetOutPath "$INSTDIR\CPG\Autopano_SiftC_lemur"
11
  
12
  DetailPrint "$(TEXT_CPDownloading) Autopano-sift-C (Multirow/Stacked) ${AUTOPANO_SIFTC_LEMUR_VERSION}"
13
  
14
  Dialer::AttemptConnect
15
  NSISdl::download /TIMEOUT=30000 ${AUTOPANO_SIFTC_LEMUR_DL_URL} "$TEMP\autopano-sift-c-lemur.7z"
16
  
17
  Pop $0
18
  StrCmp $0 success success
19
    SetDetailsView show
20
    DetailPrint $(TEXT_ERROR_DownloadFailed)
21
    MessageBox MB_OK "$(TEXT_ERROR_DownloadFailed): Autopano-SIFT-C ${AUTOPANO_SIFTC_LEMUR_VERSION}" 
22
    Goto end
23
24
  success:
25
      DetailPrint "Autopanp-SIFT-C ${AUTOPANO_SIFTC_LEMUR_VERSION} Downloaded!"
26
      DetailPrint "$(TEXT_CPExtracting) Autopano-SIFT-C ${AUTOPANO_SIFTC_LEMUR_VERSION}"
27
      ; File /nonfatal "autopano.zip"
28
      Nsis7z::Extract "$TEMP\autopano-sift-c-lemur.7z"
29
      
30
      Delete "$TEMP\autopano-sift-c.7z"
31
      
32
      ; Add the multirow/Stacked settings
33
      Call AddCPAutoPanoSiftCStacked
34
35
  end:
36
SectionEnd
37
38
; Add Autopano-Sift-C STACKED settings
39
; @todo: check if Autopano-sift-c is installed (with generatekeys.exe and align_image_stack.exe)
40
Function AddCPAutoPanoSiftCStacked
41
  StrCpy $R0 4 ; R0 = Type
42
  StrCpy $R1 1 ; R1 = Option
43
  StrCpy $R2 "$INSTDIR\CPG\Autopano_SiftC_lemur\generatekeys.exe" ; R2 = Program
44
  StrCpy $R3 "%i %k 800" ; R3 = Arguments
45
  StrCpy $R4 "Autopano-SIFT-C (multirow/stacked)";  R4 = Description
46
  Call ControlPointRegistryAdd
47
  
48
  StrCpy $R0 "Matcher" ; R0 = Type [Matcher|Stack]
49
  StrCpy $R1 "-1"; R1 = Autopano_ID (-1 for last setting present)
50
  StrCpy $R2 "$INSTDIR\CPG\Autopano_SiftC_lemur\autopano.exe" ; R2 = Program
51
  StrCpy $R3 "--maxmatches %p %o %k"; R3 = Arguments
52
  Call ControlPointRegistryAddMulti
53
  
54
  StrCpy $R0 "Stack" ; R0 = Type [Matcher|Stack]
55
  StrCpy $R1 "-1"; R1 = Autopano_ID (-1 for last setting present)
56
  StrCpy $R2 "$INSTDIR\bin\align_image_stack.exe" ; R2 = Program
57
  StrCpy $R3 "-f %v -v -p %o %i"; R3 = Arguments
58
  Call ControlPointRegistryAddMulti  
59
  
60
FunctionEnd