-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathmakecfg.bat
53 lines (46 loc) · 946 Bytes
/
makecfg.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@ECHO OFF
SET BASEDIR=%~dp0
SET EUDIR=%BASEDIR:~0,-1%
SET CONFIG=%EUDIR%\bin\eu.cfg
:defarch
IF "%PROCESSOR_ARCHITECTURE%" == "x86" SET DEFARCH=X86
IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" SET DEFARCH=X86_64
:setarch32
IF "%1" == "X86" (
SET ARCH=%1
GOTO makecfg
)
:setarch64
IF "%1" == "X86_64" (
SET ARCH=%1
GOTO makecfg
)
:default
IF "%1" == "" (
SET ARCH=%DEFARCH%
GOTO makecfg
)
:badarch
ECHO Invalid arch "%1"
EXIT /B 1
:makedir
IF NOT EXIST %EUDIR%\bin (
MKDIR %EUDIR%\bin
)
:makecfg
ECHO Writing contents to: %CONFIG%
ECHO [all] > %CONFIG%
ECHO -eudir %EUDIR% >> %CONFIG%
ECHO -i %EUDIR%\include >> %CONFIG%
ECHO [translate] >> %CONFIG%
ECHO -arch %ARCH% >> %CONFIG%
ECHO -gcc >> %CONFIG%
ECHO -com %EUDIR% >> %CONFIG%
ECHO -con >> %CONFIG%
ECHO -lib-pic %EUDIR%\bin\euso.a >> %CONFIG%
ECHO -lib %EUDIR%\bin\eu.a >> %CONFIG%
ECHO [bind] >> %CONFIG%
ECHO -eub %EUDIR%\bin\eub.exe >> %CONFIG%
TYPE %CONFIG%
:done
PAUSE