Subversion Repositories gelsvn

Rev

Rev 242 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 242 Rev 244
Line 10... Line 10...
10
; The default installation directory
10
; The default installation directory
11
InstallDir $DESKTOP\test
11
InstallDir $DESKTOP\test
12
 
12
 
13
;--------------------------------
13
;--------------------------------
14
 
14
 
-
 
15
!macro GELModule mvar mstring
-
 
16
  ${If} ${mvar} = 1
-
 
17
    SetOutPath $INSTDIR\lib
-
 
18
    File current\lib\${mstring}.lib 
-
 
19
 
-
 
20
    SetOutPath $INSTDIR\include
-
 
21
    File /r current\include\${mstring}
-
 
22
  ${EndIf}
-
 
23
!macroend
-
 
24
 
15
; Pages
25
; Pages
16
 
26
 
17
Page directory
27
Page directory
18
Page components
28
Page components
19
 
29
 
20
InstType "Externals only"
30
InstType "Externals only"
21
InstType "Full"
31
InstType "Full"
22
 
32
 
23
Section "Externals" Externals
33
Section "Externals" Externals_flag
24
SectionIn 1 2
34
SectionIn 1 2
25
SectionEnd
35
SectionEnd
26
 
36
 
27
Section "GEL binary (ver. 0.1)" GEL
37
SectionGroup "GEL binary (ver. 0.1)"
-
 
38
 
-
 
39
Section "CGLA" CGLA_flag
-
 
40
SectionIn 2
-
 
41
SectionEnd
-
 
42
 
-
 
43
 
-
 
44
Section "Geometry" Geometry_flag
-
 
45
SectionIn 2
-
 
46
SectionEnd
-
 
47
 
-
 
48
Section "GLGraphics" GLGraphics_flag
-
 
49
SectionIn 2
-
 
50
SectionEnd
-
 
51
 
-
 
52
Section "HMesh" HMesh_flag
-
 
53
SectionIn 2
-
 
54
SectionEnd
-
 
55
 
-
 
56
Section "LinAlg" LinAlg_flag
-
 
57
SectionIn 2
-
 
58
SectionEnd
-
 
59
 
-
 
60
Section "Util" Util_flag
28
SectionIn 2
61
SectionIn 2
29
SectionEnd
62
SectionEnd
30
 
63
 
-
 
64
SectionGroupEnd
-
 
65
 
31
 
66
 
32
 
67
 
33
Page instfiles
68
Page instfiles
34
 
69
 
35
;--------------------------------
70
;--------------------------------
36
 
71
 
37
Section ""
72
Section ""
-
 
73
 
-
 
74
  Var /GLOBAL Externals
-
 
75
  Var /GLOBAL CGLA
-
 
76
  Var /GLOBAL Geometry 
-
 
77
  Var /GLOBAL GLGraphics 
-
 
78
  Var /GLOBAL HMesh 
-
 
79
  Var /GLOBAL LinAlg
-
 
80
  Var /GLOBAL Util 
38
 
81
 
39
  # Get flags of first section (which is index #0) into register $0
82
  # Get flags of each section into appropriate variables
40
  SectionGetFlags ${Externals} $0
83
  SectionGetFlags ${Externals_flag} $Externals
41
  
-
 
-
 
84
  SectionGetFlags ${CGLA_flag} $CGLA 
42
  # Get flags of second section (which is index #1) into register $1
85
  SectionGetFlags ${Geometry_flag} $Geometry
-
 
86
  SectionGetFlags ${GLGraphics_flag} $GLGraphics
-
 
87
  SectionGetFlags ${HMesh_flag} $HMesh
-
 
88
  SectionGetFlags ${LinAlg_flag} $LinAlg
43
  SectionGetFlags ${GEL} $1
89
  SectionGetFlags ${Util_flag} $Util
44
  
90
  
45
  ;MessageBox MB_OK "Externals: $0 $\r$\n GEL: $1 $\r$\n "
91
  ;MessageBox MB_OK "Externals: $0 $\r$\n GEL: $1 $\r$\n "
46
 
92
 
47
  ${If} $0 = 1
93
  ${If} $Externals = 1
48
    SetOutPath $INSTDIR\bin
94
    SetOutPath $INSTDIR\bin
49
    File externals\bin\*.dll 
95
    File externals\bin\*.dll 
50
   
96
   
51
    SetOutPath $INSTDIR\lib
97
    SetOutPath $INSTDIR\lib
52
    File externals\lib\*.lib 
98
    File externals\lib\*.lib 
53
 
99
 
54
    SetOutPath $INSTDIR
100
    SetOutPath $INSTDIR
55
    File /r externals\include
101
    File /r externals\include
56
  ${EndIf}
102
  ${EndIf}
57
 
103
 
58
  ${If} $1 = 1
104
  !insertmacro GELModule $CGLA "CGLA"
59
    SetOutPath $INSTDIR\lib
105
  !insertmacro GELModule $Geometry "Geometry"
60
    File current\lib\*.lib 
106
  !insertmacro GELModule $GLGraphics "GLGraphics"
61
 
-
 
62
    SetOutPath $INSTDIR
107
  !insertmacro GELModule $HMesh "HMesh"
63
    File /r current\include
108
  !insertmacro GELModule $LinAlg "LinAlg"
64
  ${EndIf}
109
  !insertmacro GELModule $Util "Util"
65
 
110
 
66
  # Create Environment variables
111
  # Create Environment variables
67
  WriteRegExpandStr HKCU "Environment" "GEL_INCLUDE" "$INSTDIR\include"
112
  WriteRegExpandStr HKCU "Environment" "GEL_INCLUDE" "$INSTDIR\include"
68
  WriteRegExpandStr HKCU "Environment" "GEL_LIB" "$INSTDIR\lib"
113
  WriteRegExpandStr HKCU "Environment" "GEL_LIB" "$INSTDIR\lib"
69
  WriteRegExpandStr HKCU "Environment" "GEL_BIN" "$INSTDIR\bin"
114
  WriteRegExpandStr HKCU "Environment" "GEL_BIN" "$INSTDIR\bin"
Line 74... Line 119...
74
  StrCmp $2 ";" 0 +2 # if last char == ;
119
  StrCmp $2 ";" 0 +2 # if last char == ;
75
    StrCpy $1 $1 -1 # remove last char
120
    StrCpy $1 $1 -1 # remove last char
76
  StrCmp $1 "" AddToPath_NTdoIt
121
  StrCmp $1 "" AddToPath_NTdoIt
77
    StrCpy $0 "$1;%GEL_BIN%"
122
    StrCpy $0 "$1;%GEL_BIN%"
78
  AddToPath_NTdoIt:
123
  AddToPath_NTdoIt:
79
    WriteRegExpandStr HKCU "Environment" "PATH" $0
124
;    WriteRegExpandStr HKCU "Environment" "PATH" $0
80
    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
125
    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
81
 
126
 
82
 
127
 
83
SectionEnd ; end the section
128
SectionEnd ; end the section