Subversion Repositories gelsvn

Rev

Rev 231 | Go to most recent revision | Details | Compare with Previous | 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
 
32
Func installLibs($GELpath, $scope)
33
 
34
  $envloc = EnvLocal($scope)
35
 
231 bj 36
  RegWrite($envloc,"GEL_INCLUDE","REG_EXPAND_SZ",$GELpath & "\include")
37
  RegWrite($envloc,"GEL_LIB","REG_EXPAND_SZ",$GELpath & "\lib")
38
  RegWrite($envloc,"GEL_BIN","REG_EXPAND_SZ",$GELpath & "\bin")
228 bj 39
 
40
  $Path = RegREad($envloc,"Path")
232 bj 41
  RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
228 bj 42
 
231 bj 43
  DirCreate($GELpath)
44
  FileInstall("externals.exe", $GELpath, 1)
45
 
46
  FileChangeDir ( $GELpath )
47
  RunWait("externals.exe")
48
  FileDelete("externals.exe")
228 bj 49
EndFunc
50
 
231 bj 51
Func installAll($GELpath, $scope)
52
 
53
  $envloc = EnvLocal($scope)
54
 
55
  RegWrite($envloc,"GEL_INCLUDE","REG_EXPAND_SZ",$GELpath & "\include")
56
  RegWrite($envloc,"GEL_LIB","REG_EXPAND_SZ",$GELpath & "\lib")
57
  RegWrite($envloc,"GEL_BIN","REG_EXPAND_SZ",$GELpath & "\bin")
58
 
59
  $Path = RegREad($envloc,"Path")
232 bj 60
  RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
231 bj 61
 
62
  DirCreate($GELpath)
63
  FileInstall("externals.exe", $GELpath, 1)
64
  FileInstall("gel.exe", $GELpath, 1)
65
 
66
  FileChangeDir ( $GELpath )
67
  RunWait("externals.exe")
68
  RunWait("gel.exe")
69
  FileDelete("externals.exe")
70
  FileDelete("gel.exe")
71
 
72
EndFunc
73
 
228 bj 74
Func makeSolution($GELpath, $msvcVer, $libType, $scope)
75
 
76
  $envloc = EnvLocal($scope)
77
 
231 bj 78
  $vcver = "vc71"
79
  $tlib = "msvc"
80
  $texe = "msvcexe"
81
  If $msvcVer = "2005" Then
82
    $vcver = "vc8"
83
    $tlib = "msvc8lib"
84
    $texe = "msvc8exe"
85
  EndIf
228 bj 86
 
231 bj 87
  $mwcfile="GEL.mwc"
88
  If $libType = "Single Library" Then
89
    $mwcfile="GEL_single.mwc"
90
  EndIf
91
 
92
  Run("perl MPC\mwc.pl -type " & $vcver & " -include makefiles -relative GEL_ROOT= -ti lib:" & $tlib & " -ti dll_exe:" & $texe & " " & $mwcfile)
93
 
228 bj 94
 
231 bj 95
 
228 bj 96
 
97
EndFunc
98
 
99
 
100
 
101