config modificado de uestudio para MSVC

Post Reply
hgarcia
Posts: 33
Joined: Thu Aug 10, 2006 12:23 pm
Location: México D.F
Contact:

config modificado de uestudio para MSVC

Post by hgarcia »

Finalmente después de varios intentos logré crear la configuración apropiada para compilar y enlazar con Harbour y MSVC (la versión más reciente) tanto para crear libs como exes aquí incluyo ambos obviamente hay que adecuar las rutas del compilador para cada caso

Code: Select all

# --------- Harbour y FWH configuration para libs --------
# --- general --------------------------------------
# $P  - project name
# $Pp - path to project directory
# $Pn - project name
# --- compile --------------------------------------
# $I  - input full name
# $Ip - input path
# $In - input name
# $Ie - input extension
# $O  - output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R  - release/debug setting for compiler
# --- build ----------------------------------------
# $T  - target full name
# $Tp - target path
# $Tn - target name
# $O  - output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R  - release/debug setting for linker

[Settings]
Target = 
Category&01 = DEFAULT RUN CONFIGURATION
Working Directory =.
Command Line Arguments =

Category&02 = Harbour Options
Automatic Memvar Declaration = no|yes
Variables Are Assumed = no|yes
Generate Preprocessed Output = no|yes
Warning Level = 1|2|3|4|0
User Include Path =
User Defines =

Compiler Options =

Excluded Files = Excludes

[SettingsInfo]
Target = Provides a space for you to specify an output file and location of the program that the linker creates.
Working Directory = Provides a space for you to specify the directory in which executing occurs. If you do not specify a directory, executing occurs in the directory where the executable is located.
Command Line Arguments = Provides a space for you to specify command-line arguments you want to pass to the program at startup.
Compiler Options = Provides a space for you to specify an additional compiler options.
User Defines = Shows the switches the tool will use to build. Use ';' as delimiter.
Excluded Files = This will exclude the file(s) included in this UE project group from the build.

[SettingsReps]
User Defines = @[;|-D%s]
Automatic Memvar Declaration = no=|yes=/a
Variables Are Assumed = no=|yes=/v
Generate Preprocessed Output = no=|yes=/p
User Include Path = ^^@[;|;%s]
User Include Path&1 = ^^@[;| /i%s]
Use Multi Thread Library = no|yes
Warning Level = @/w%s

[Variables]
FWH = c:\Fwh
HPATH = c:\hb20
CPATH = c:\visual9.0\vc


HOPT = /n /gc0 /q $(Compiler Options) /i$(HPATH)\INCLUDE $(User Include Path&1) $(User Defines) $(Automatic Memvar Declaration) $(Variables Are Assumed) $(Generate Preprocessed Output) $(Warning Level)
COPT = /nologo /TC /W3 /GA  /Ot2yb1 /Gs  /D__HARBOUR__ /D__FLAT__ /DADS_LIB_VERSION=910 /DWIN32   /D__WIN32__  /I$(HPATH)\INCLUDE 

[Environment]
PATH = $(HPATH)\BIN;$(CPATH)\BIN;%PATH%
INCLUDE = $(HPATH)\INCLUDE;$(CPATH)\INCLUDE;$(FWH)\INCLUDE
LIB = $(HPATH)\LIB;$(CPATH)\LIB
BuildMode = %UESMode%

[General]
TargetExt = .LIB
ReleaseOut = Release
DebugOut = Debug
UseFullPaths = 1
UseDosNames = 0
Excludes = $(Excluded Files)
GenerateEDGroup=$(External Dependencies)
.CPP = .C

[MakeCommands]
run = Show Makefile
makef = Show Makefile

[Show Makefile]
Title=Show makefile
Cmd0=uestudio makefile
ShowWindow=1
DisplayConsole=0

[InsertFiles]

[FileGroups]
FGO = .obj;

[GroupFormats]
FGO = %s

[Build]
Out = $T
Depends = $FGO
DebugFlag = 
ReleaseFlag =
file@0=[milib.lst]$FGO 
Cmd0 = lib /out:$T @milib.lst
[.PRG]
Out = $In.c
DebugFlag = /b
ReleaseFlag = /l
Cmd0 = harbour $I $(HOPT) $R /o$O 

CaseSensitive = 0
IncDirs = .;$(INCLUDE);
IncKeyWords = #include;
Comments = /*.*/.//.eol.

[.C]
Out = $In.obj
Cmd0 = cl $(COPT) $R /c $I


CaseSensitive = 0
IncDirs = .;$(INCLUDE);
IncKeyWords = #include;
Comments = /*.*/.//.eol.
 
la configuración incluye parámetros para incluir libs propias y objetos adicionales como se hace en ajmake por ejemplo

Code: Select all

# --------- Harbour y FWH configuration  para aplicación--------
# --- general --------------------------------------
# $P  - project name
# $Pp - path to project directory
# $Pn - project name
# --- compile --------------------------------------
# $I  - input full name
# $Ip - input path
# $In - input name
# $Ie - input extension
# $O  - output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R  - release/debug setting for compiler
# --- build ----------------------------------------
# $T  - target full name
# $Tp - target path
# $Tn - target name
# $O  - output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R  - release/debug setting for linker

[Settings]
Target = 
Category&01 = Configuración predeterminada RUN
Working Directory =.
Command Line Arguments =

Category&02 = Opciones Harbour 
Automatic Memvar Declaration = no|yes
Variables Are Assumed = no|yes
Generate Preprocessed Output = no|yes
Warning Level = 1|2|3|4|0
User Include Path =
User Defines =

Compiler Options =
Linker Options =

Excluded Files = Excludes

Category&03 = Otras libs y objetos
bibliotecas =
objetos =

[SettingsInfo]
Target = Provides a space for you to specify an output file and location of the program that the linker creates.
Working Directory = Provides a space for you to specify the directory in which executing occurs. If you do not specify a directory, executing occurs in the directory where the executable is located.
Command Line Arguments = Provides a space for you to specify command-line arguments you want to pass to the program at startup.
Compiler Options = Provides a space for you to specify an additional compiler options.
User Defines = Shows the switches the tool will use to build. Use ';' as delimiter.
Linker Options = Provides a space for you to specify an additional linker options.
Excluded Files = This will exclude the file(s) included in this UE project group from the build.

[SettingsReps]
User Defines = @[;|-D%s]
Automatic Memvar Declaration = no=|yes=/a
Variables Are Assumed = no=|yes=/v
Generate Preprocessed Output = no=|yes=/p
User Include Path = ^^@[;|;%s]
User Include Path&1 = ^^@[;| /i%s]
Use Multi Thread Library = no|yes
Warning Level = @/w%s

[Variables]
FWH = c:\FWH
HPATH = c:\Hb20
CPATH = c:\visual9.0\vc

HPATHL = $(HPATH)\LIB\win\msvc
CPATHL = $(CPATH)\LIB

HOPT = /n /gc0 /q $(Compiler Options) /i$(HPATH)\INCLUDE $(User Include Path&1) $(User Defines) $(Automatic Memvar Declaration) $(Variables Are Assumed) $(Generate Preprocessed Output) $(Warning Level)
COPT = /nologo /TC /W3 /GA  /Ot2yb1 /Gs  /D__HARBOUR__ /D__FLAT__ /DADS_LIB_VERSION=910 /DWIN32   /D__WIN32__  /I$(HPATH)\INCLUDE 

LOPT = /defaultlib:libcmt.lib /nodefaultlib:libc.lib /nologo /machine:IX86 /subsystem:windows /force
LIBS1 = $(FWH)\LIB\FiveHm.lib $(FWH)\LIB\FiveHCm.lib 
LIBS2 = $(HPATHL)\rddfpt.lib $(HPATHL)\gtgui.lib $(HPATHL)\hblang.lib $(HPATHL)\hbmacro.lib $(HPATHL)\hbrdd.lib $(HPATHL)\hbrtl.lib $(HPATHL)\hbvm.lib $(HPATHL)\ace32.lib $(HPATHL)\rddads.lib $(HPATHL)\rddcdx.lib $(HPATHL)\hbcommon.lib $(HPATHL)\hbcpage.lib  $(HPATHL)\hbdebug.lib  $(HPATHL)\hbpp.lib $(HPATHL)\hbsix.lib $(HPATHL)\hbwin.lib $(HPATHL)\rddntx.lib $(HPATHL)\gtstd.lib
LIBS3 = $(CPATHL)\kernel32.lib $(CPATHL)\user32.lib $(CPATHL)\gdi32.lib $(CPATHL)\winspool.lib $(CPATHL)\comdlg32.lib $(CPATHL)\advapi32.lib  $(CPATHL)\shell32.lib  $(CPATHL)\ole32.lib $(CPATHL)\oleaut32.lib $(CPATHL)\uuid.lib $(CPATHL)\odbc32.lib $(CPATHL)\odbccp32.lib $(CPATHL)\wsock32.lib $(CPATHL)\comctl32.lib $(CPATHL)\MSImg32.Lib
LIBS = $(LIBS1) $(LIBS2) $(LIBS3) $(bibliotecas) $(objetos)

[Environment]
PATH = $(HPATH)\BIN;$(CPATH)\BIN;%PATH%
INCLUDE = $(HPATH)\INCLUDE;$(CPATH)\INCLUDE;$(FWH)\INCLUDE
LIB = $(HPATH)\LIB;$(CPATH)\LIB
BuildMode = %UESMode%

[General]
TargetExt = .EXE
ReleaseOut = Release
DebugOut = Debug
UseFullPaths = 0
UseDosNames = 0
Excludes = $(Excluded Files)
GenerateEDGroup=$(External Dependencies)
.CPP = .C

[MakeCommands]
run = Execute Application
makef = Show Makefile

[Execute Application]
Title = Execute $T
Cmd0 = $(Command Line Arguments)
Depends = $T
ShowWindow = 1
DisplayConsole = $(DCon)

[Show ]
Title=Show maMakefilekefile
Cmd0=uestudio makefile
ShowWindow=1
DisplayConsole=0

[InsertFiles]

[FileGroups]
FGO = .obj;
FGR = .res;
FGL = .lib;

[GroupFormats]
FGO = %s
FGR = %s
FGL = %s

[Build]
Out = $T
Depends = $FGO $FGR
DebugFlag = 
ReleaseFlag =
Cmd0 = link $FGO $FGR $(LIBS) $(LOPT)  /out:$T 

[.PRG]
Out = $In.c
DebugFlag = /b
ReleaseFlag = /l
Cmd0 = harbour $I $(HOPT) $R /o$O 

IncFiles = 1
CaseSensitive = 0
IncDirs = .;$(INCLUDE);
IncKeyWords = #include;
Comments = /*.*/.//.eol.

[.C]
Out = $In.obj
Cmd0 = cl $(COPT) $R /c $I

[.RC]
Out = $In.res
Cmd0 = RC /fo$O $I

IncFiles = 1
CaseSensitive = 0
IncDirs = .;$(INCLUDE);
IncKeyWords = #include;
Comments = /*.*/.//.eol.
 
espero que les sea de utilidad

Saludos
HGJ
Héctor García
México, D.F.
Post Reply