Subversion Repositories gelsvn

Rev

Rev 228 | 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")
231 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")
60
  ;RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
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
  ;FileChangeDir ( $GELpath )
70
  FileDelete("externals.exe")
71
  FileDelete("gel.exe")
72
 
73
EndFunc
74
 
228 bj 75
Func makeSolution($GELpath, $msvcVer, $libType, $scope)
76
 
77
  $envloc = EnvLocal($scope)
78
 
231 bj 79
  $vcver = "vc71"
80
  $tlib = "msvc"
81
  $texe = "msvcexe"
82
  If $msvcVer = "2005" Then
83
    $vcver = "vc8"
84
    $tlib = "msvc8lib"
85
    $texe = "msvc8exe"
86
  EndIf
228 bj 87
 
231 bj 88
  $mwcfile="GEL.mwc"
89
  If $libType = "Single Library" Then
90
    $mwcfile="GEL_single.mwc"
91
  EndIf
92
 
93
  Run("perl MPC\mwc.pl -type " & $vcver & " -include makefiles -relative GEL_ROOT= -ti lib:" & $tlib & " -ti dll_exe:" & $texe & " " & $mwcfile)
94
 
228 bj 95
 
231 bj 96
 
228 bj 97
 
98
EndFunc
99
 
100
 
101
 
102