Subversion Repositories gelsvn

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
228 bj 1
; ----------------------------------------------------------------------------
2
;
3
; AutoIt Version: 3.1.0
4
; Author:         A.N.Other <myemail@nowhere.com>
5
;
6
; Script Function:
7
;	Template AutoIt script.
8
;
9
; ----------------------------------------------------------------------------
10
 
11
#include-once
12
#include <GUIConstants.au3>
13
 
14
Func EnvLocal($scope)
15
 
16
  Local $envloc = "HKCU\Environment"
17
  If $scope = "System" Then
18
    $envloc = "HKLM\System\ControlSet001\Control\Session Manager\Environment"
19
  EndIf
20
  return $envloc
231 bj 21
 
228 bj 22
Endfunc
23
 
24
Func updatePath(ByRef $inpubox) 
25
    Local $text = FileSelectFolder ( "Select folder", "" , 1 )
26
 
27
    If $text <> "" Then
28
      GUICtrlSetData($inpubox, $text)
29
    EndIf
30
EndFunc
31
 
237 bj 32
Func useExisting(ByRef $inpubox, $scope)
33
  $envloc = EnvLocal($scope)
34
  $prevPath = RegRead($envloc,"GEL_LIB")
35
 
36
    If $prevPath <> "" Then
37
      GUICtrlSetData($inpubox, StringTrimRight($prevPath, 4 ))
38
    EndIf
39
 
40
EndFunc
41
 
228 bj 42
Func installLibs($GELpath, $scope)
43
 
44
  $envloc = EnvLocal($scope)
45
 
231 bj 46
  RegWrite($envloc,"GEL_INCLUDE","REG_EXPAND_SZ",$GELpath & "\include")
47
  RegWrite($envloc,"GEL_LIB","REG_EXPAND_SZ",$GELpath & "\lib")
48
  RegWrite($envloc,"GEL_BIN","REG_EXPAND_SZ",$GELpath & "\bin")
228 bj 49
 
50
  $Path = RegREad($envloc,"Path")
232 bj 51
  RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
228 bj 52
 
231 bj 53
  DirCreate($GELpath)
54
  FileInstall("externals.exe", $GELpath, 1)
55
 
56
  FileChangeDir ( $GELpath )
57
  RunWait("externals.exe")
58
  FileDelete("externals.exe")
228 bj 59
EndFunc
60
 
231 bj 61
Func installAll($GELpath, $scope)
62
 
63
  $envloc = EnvLocal($scope)
64
 
65
  RegWrite($envloc,"GEL_INCLUDE","REG_EXPAND_SZ",$GELpath & "\include")
66
  RegWrite($envloc,"GEL_LIB","REG_EXPAND_SZ",$GELpath & "\lib")
67
  RegWrite($envloc,"GEL_BIN","REG_EXPAND_SZ",$GELpath & "\bin")
68
 
69
  $Path = RegREad($envloc,"Path")
232 bj 70
  RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
231 bj 71
 
72
  DirCreate($GELpath)
73
  FileInstall("externals.exe", $GELpath, 1)
74
  FileInstall("gel.exe", $GELpath, 1)
75
 
76
  FileChangeDir ( $GELpath )
77
  RunWait("externals.exe")
78
  RunWait("gel.exe")
79
  FileDelete("externals.exe")
80
  FileDelete("gel.exe")
81
 
82
EndFunc
83
 
228 bj 84
Func makeSolution($GELpath, $msvcVer, $libType, $scope)
85
 
86
  $envloc = EnvLocal($scope)
87
 
231 bj 88
  $vcver = "vc71"
89
  $tlib = "msvc"
90
  $texe = "msvcexe"
91
  If $msvcVer = "2005" Then
92
    $vcver = "vc8"
93
    $tlib = "msvc8lib"
94
    $texe = "msvc8exe"
95
  EndIf
228 bj 96
 
231 bj 97
  $mwcfile="GEL.mwc"
98
  If $libType = "Single Library" Then
99
    $mwcfile="GEL_single.mwc"
100
  EndIf
101
 
102
  Run("perl MPC\mwc.pl -type " & $vcver & " -include makefiles -relative GEL_ROOT= -ti lib:" & $tlib & " -ti dll_exe:" & $texe & " " & $mwcfile)
103
 
228 bj 104
 
231 bj 105
 
228 bj 106
 
107
EndFunc
108
 
109
 
110
 
111