Rev 237 | Go to most recent revision | Blame | Last modification | View Log | RSS feed
; ----------------------------------------------------------------------------
;
; AutoIt Version: 3.1.0
; Author: A.N.Other <myemail@nowhere.com>
;
; Script Function:
; Template AutoIt script.
;
; ----------------------------------------------------------------------------
#include-once
#include <GUIConstants.au3>
Func EnvLocal($scope)
Local $envloc = "HKCU\Environment"
If $scope = "System" Then
$envloc = "HKLM\System\ControlSet001\Control\Session Manager\Environment"
EndIf
return $envloc
Endfunc
Func updatePath(ByRef $inpubox)
Local $text = FileSelectFolder ( "Select folder", "" , 1 )
If $text <> "" Then
GUICtrlSetData($inpubox, $text)
EndIf
EndFunc
Func useExisting(ByRef $inpubox, $scope)
$envloc = EnvLocal($scope)
$prevPath = RegRead($envloc,"GEL_LIB")
If $prevPath <> "" Then
GUICtrlSetData($inpubox, StringTrimRight($prevPath, 4 ))
EndIf
EndFunc
Func installLibs($GELpath, $scope)
$envloc = EnvLocal($scope)
RegWrite($envloc,"GEL_INCLUDE","REG_EXPAND_SZ",$GELpath & "\include")
RegWrite($envloc,"GEL_LIB","REG_EXPAND_SZ",$GELpath & "\lib")
RegWrite($envloc,"GEL_BIN","REG_EXPAND_SZ",$GELpath & "\bin")
$Path = RegREad($envloc,"Path")
RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
DirCreate($GELpath)
FileInstall("externals.exe", $GELpath, 1)
FileChangeDir ( $GELpath )
RunWait("externals.exe")
FileDelete("externals.exe")
$res = "Copied files to : " & $GELpath & @LF
$res = $res & "Changed env var GEL_LIB to : " & $GELpath & "\lib" & @LF
$res = $res & "Changed env var GEL_INCLUDE to : " & $GELpath & "\include" & @LF
$res = $res & "Changed env var GEL_BIN to : " & $GELpath & "\bin" & @LF
$res = $res & "Added %GEL_BIN% to Path"
MsgBox(4096, "Result", $res , 20)
EndFunc
Func installAll($GELpath, $scope)
$envloc = EnvLocal($scope)
RegWrite($envloc,"GEL_INCLUDE","REG_EXPAND_SZ",$GELpath & "\include")
RegWrite($envloc,"GEL_LIB","REG_EXPAND_SZ",$GELpath & "\lib")
RegWrite($envloc,"GEL_BIN","REG_EXPAND_SZ",$GELpath & "\bin")
$Path = RegREad($envloc,"Path")
RegWrite($envloc,"Path","REG_EXPAND_SZ",$Path & ";" & "%GEL_BIN%")
DirCreate($GELpath)
FileInstall("externals.exe", $GELpath, 1)
FileInstall("gel.exe", $GELpath, 1)
FileChangeDir ( $GELpath )
RunWait("externals.exe")
RunWait("gel.exe")
FileDelete("externals.exe")
FileDelete("gel.exe")
$res = "Copied files to : " & $GELpath & @LF
$res = $res & "Changed env var GEL_LIB to : " & $GELpath & "\lib" & @LF
$res = $res & "Changed env var GEL_INCLUDE to : " & $GELpath & "\include" & @LF
$res = $res & "Changed env var GEL_BIN to : " & $GELpath & "\bin" & @LF
$res = $res & "Added %GEL_BIN% to Path"
MsgBox(4096, "Result", $res , 20)
EndFunc
Func makeSolution($GELpath, $msvcVer, $libType, $scope)
$envloc = EnvLocal($scope)
$vcver = "vc71"
$tlib = "msvc"
$texe = "msvcexe"
If $msvcVer = "2005" Then
$vcver = "vc8"
$tlib = "msvc8lib"
$texe = "msvc8exe"
EndIf
$mwcfile="GEL.mwc"
If $libType = "Single Library" Then
$mwcfile="GEL_single.mwc"
EndIf
Run("perl MPC\mwc.pl -type " & $vcver & " -include makefiles -relative GEL_ROOT= -ti lib:" & $tlib & " -ti dll_exe:" & $texe & " " & $mwcfile)
EndFunc