Updated msvc build files

This commit is contained in:
Hans Breuer
2009-05-30 15:29:23 +02:00
parent 780185449f
commit 75ef018248
7 changed files with 172 additions and 119 deletions

View File

@@ -161,14 +161,14 @@ reference manual) for more information.
Building with MSVC Building with MSVC
================== ==================
If you are building from a SVN snapshot, you will not have any If you are building from a GIT snapshot, you will not have all
makefile.msc files. You should copy the corresponding makefile.msc.in makefile.msc files. You should copy the corresponding makefile.msc.in
file to that name, and replace any @...@ strings with the correct file to that name, and replace any @...@ strings with the correct
value. value (or use the python script de-in.py from http://hans.breuer.org/gtk/de-in.py).
This is done automatically when an official GLib source distribution This is done automatically when an official GLib source distribution
package is built, so if you get GLib from a source distribution package is built, so if you get GLib from a source distribution
package, there should be makefile.msc files ready to use (after some package, there should be makefile.msc files ready to use (possibly after some
editing). editing).
The hand-written makefile.msc files, and the stuff in the "build" The hand-written makefile.msc files, and the stuff in the "build"
@@ -180,7 +180,12 @@ you want to use the VC-UI you can simply create wrapper .dsp makefiles
(read the VC docs how to do so). (read the VC docs how to do so).
Some modules may require Perl to auto-generate files. The goal (at Some modules may require Perl to auto-generate files. The goal (at
least Hans's) is to not require any more tools. least Hans's) is to not require any more tools. Of course you need
the Microsoft Platform SDK in a recent enough - but not too recent - version.
The last PSDK for Visual Studio 6 is:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
At least install the Core SDK, maybe also the "Tablet PC SDK".
Build with: Build with:

View File

@@ -598,6 +598,9 @@
/* Define to 1 if you have the `wcslen' function. */ /* Define to 1 if you have the `wcslen' function. */
#define HAVE_WCSLEN 1 #define HAVE_WCSLEN 1
/* We are not checking for windows.h, why this? */
#define HAVE_WINSOCK2_H 1
/* Define if you have the 'wint_t' type. */ /* Define if you have the 'wint_t' type. */
#define HAVE_WINT_T 1 #define HAVE_WINT_T 1

View File

@@ -5,7 +5,7 @@ PACKAGE = gio
PKG_VER = 2.0 PKG_VER = 2.0
!INCLUDE $(TOP)\glib\build\win32\make.msc !INCLUDE $(TOP)\glib\build\win32\make.msc
# SUBDIRS = fam SUBDIRS = win32
sub-all: sub-all:
for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d
@@ -38,6 +38,7 @@ gio_headers = \
gdatainputstream.h \ gdatainputstream.h \
gdataoutputstream.h \ gdataoutputstream.h \
gdrive.h \ gdrive.h \
gemblem.h \
gemblemedicon.h \ gemblemedicon.h \
gfile.h \ gfile.h \
gfileattribute.h \ gfileattribute.h \
@@ -76,6 +77,7 @@ gio_headers = \
OBJECTS = \ OBJECTS = \
gappinfo.obj \ gappinfo.obj \
gasynchelper.obj \ gasynchelper.obj \
gasyncinitable.obj \
gasyncresult.obj \ gasyncresult.obj \
gbufferedinputstream.obj \ gbufferedinputstream.obj \
gbufferedoutputstream.obj \ gbufferedoutputstream.obj \
@@ -86,6 +88,7 @@ OBJECTS = \
# gdesktopappinfo.obj \ # gdesktopappinfo.obj \
gdrive.obj \ gdrive.obj \
gdummyfile.obj \ gdummyfile.obj \
gemblem.obj \
gemblemedicon.obj \ gemblemedicon.obj \
gfile.obj \ gfile.obj \
gfileattribute.obj \ gfileattribute.obj \
@@ -93,29 +96,51 @@ OBJECTS = \
gfileicon.obj \ gfileicon.obj \
gfileinfo.obj \ gfileinfo.obj \
gfileinputstream.obj \ gfileinputstream.obj \
gfileiostream.obj \
gfilemonitor.obj \ gfilemonitor.obj \
gfilenamecompleter.obj \ gfilenamecompleter.obj \
gfileoutputstream.obj \ gfileoutputstream.obj \
gfilterinputstream.obj \ gfilterinputstream.obj \
gfilteroutputstream.obj \ gfilteroutputstream.obj \
gicon.obj \ gicon.obj \
ginetaddress.obj \
ginetsocketaddress.obj \
ginitable.obj \
ginputstream.obj \ ginputstream.obj \
gioenumtypes.obj \ gioenumtypes.obj \
gioerror.obj \ gioerror.obj \
giomodule.obj \ giomodule.obj \
gioscheduler.obj \ gioscheduler.obj \
giostream.obj \
gloadableicon.obj \ gloadableicon.obj \
glocalfileiostream.obj \
gmemoryinputstream.obj \ gmemoryinputstream.obj \
gmemoryoutputstream.obj \ gmemoryoutputstream.obj \
gmount.obj \ gmount.obj \
gmountoperation.obj \ gmountoperation.obj \
gnativevolumemonitor.obj \ gnativevolumemonitor.obj \
gnetworkaddress.obj \
gnetworkservice.obj \
goutputstream.obj \ goutputstream.obj \
gpollfilemonitor.obj \ gpollfilemonitor.obj \
gresolver.obj \
gseekable.obj \ gseekable.obj \
gsimpleasyncresult.obj \ gsimpleasyncresult.obj \
# gsocketinputstream.obj \ gsocket.obj \
# gsocketoutputstream.obj \ gsocketaddress.obj \
gsocketaddressenumerator.obj \
gsocketclient.obj \
gsocketconnectable.obj \
gsocketconnection.obj \
gsocketcontrolmessage.obj \
gsocketlistener.obj \
gsocketservice.obj \
gsocketinputstream.obj \
gsocketoutputstream.obj \
gsrvtarget.obj \
gtcpconnection.obj \
gthreadedresolver.obj \
gthreadedsocketservice.obj \
gthemedicon.obj \ gthemedicon.obj \
gunionvolumemonitor.obj \ gunionvolumemonitor.obj \
gvfs.obj \ gvfs.obj \
@@ -133,10 +158,9 @@ OBJECTS = \
gwin32appinfo.obj \ gwin32appinfo.obj \
\ \
gio-marshal.obj \ gio-marshal.obj \
gwin32directorymonitor.obj \
gwin32mount.obj \ gwin32mount.obj \
# gwin32volume.obj \ gwin32volumemonitor.obj \
gwin32volumemonitor.obj gwin32resolver.obj
libgio_2_0_la_LIBADD = \ libgio_2_0_la_LIBADD = \
$(top_builddir)/glib/libglib-2.0.la \ $(top_builddir)/glib/libglib-2.0.la \
@@ -159,39 +183,9 @@ unix_sources = \
gunixvolumemonitor.h \ gunixvolumemonitor.h \
$(NULL) $(NULL)
NULL = \
libgio_2_0_la_LDFLAG = \
-export-dynamic \
$(no_undefined) \
-export-symbols-regex \
'^g_.*'
giounixincludedi = \
$(includedir)/gio-unix-2.0/gio
platform_libadd = \
-lshlwapi
marshal_sources = \ marshal_sources = \
gio-marshal.h gio-marshal.c $(NULL) gio-marshal.h gio-marshal.c $(NULL)
gioincludedi = \
$(includedir)/glib-2.0/gio/
EXTRA_DIST = \
gio-marshal.list $(NULL)
CLEANFILES = \
$(marshal_sources) $(NULL)
no_undefined = \
-no-undefined
giounixinclude_HEADERS = \
gunixmounts.h $(NULL)
GLIB_GEN_MARSHAL = ..\gobject\glib-genmarshal.exe GLIB_GEN_MARSHAL = ..\gobject\glib-genmarshal.exe
gio-marshal.h: gio-marshal.list gio-marshal.h: gio-marshal.list
@@ -226,12 +220,13 @@ local_sources = \
all : \ all : \
$(PRJ_TOP)\config.h \ $(PRJ_TOP)\config.h \
sub-all \
gioalias.h \ gioalias.h \
gioaliasdef.c \ gioaliasdef.c \
gio-marshal.c \ gio-marshal.c \
gioenumtypes.h \ gioenumtypes.h \
gioenumtypes.c \ gioenumtypes.c \
libgio-$(PKG_VER).dll libgio-$(PKG_VER)-0.dll
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
@@ -255,16 +250,17 @@ gio.def: gio.symbols
-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \ -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
-DG_GNUC_PRINTF=;G_GNUC_PRINTF gio.symbols >> gio.def -DG_GNUC_PRINTF=;G_GNUC_PRINTF gio.symbols >> gio.def
gwin32directorymonitor.obj : win32\gwin32directorymonitor.c
$(CC) $(CFLAGS) -I win32 -c win32\gwin32directorymonitor.c
RESOURCE = $(PACKAGE).res RESOURCE = $(PACKAGE).res
libgio-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def $(PACKAGE).res : $(PACKAGE).rc
$(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER).dll $(OBJECTS) \ rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
libgio-$(PKG_VER)-0.dll : $(OBJECTS) win32\giowin32.lib $(PACKAGE).def $(RESOURCE)
$(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER)-0.dll $(OBJECTS) $(RESOURCE) \
..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \ ..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \
win32\giowin32.lib \
$(INTL_LIBS) \ $(INTL_LIBS) \
kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib mpr.lib $(LDFLAGS) \ kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ws2_32.lib dnsapi.lib mpr.lib $(LDFLAGS) \
/implib:gio-2.0.lib /def:$(PACKAGE).def /implib:gio-2.0.lib /def:$(PACKAGE).def
.c.obj : .c.obj :

35
gio/win32/makefile.msc Normal file
View File

@@ -0,0 +1,35 @@
TOP = ..\..\..
PRJ_TOP = ..\..
PACKAGE = giowin32
PKG_VER = 2.0
!INCLUDE $(TOP)\glib\build\win32\make.msc
INCLUDES = \
-FImsvc_recommended_pragmas.h \
-I .. -I ..\.. -I ..\..\glib -I ..\..\gmodule -I . \
$(INTL_CFLAGS)
DEFINES = \
-DG_LOG_DOMAIN=\"GLib-GIO\" \
-DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \
-DGIO_COMPILATION
OBJECTS = \
gwin32directorymonitor.obj \
gwinhttpfile.obj \
gwinhttpfileinputstream.obj \
gwinhttpfileoutputstream.obj \
gwinhttpvfs.obj \
all : \
$(PRJ_TOP)\config.h \
$(PACKAGE).lib
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
$(PACKAGE).lib : $(OBJECTS)
lib /out:$(PACKAGE).lib $(OBJECTS)
.c.obj :
$(CC) $(CFLAGS) -c $(PKG_CFLAGS) $<

View File

@@ -8,7 +8,11 @@ TOP = ..\..
################################################################ ################################################################
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I .. INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ..
DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" -DG_ENABLE_DEBUG -DPCRE_STATIC DEFINES = \
-DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" \
-DG_ENABLE_DEBUG -DPCRE_STATIC -DG_DISABLE_DEPRECATED \
-DDLL_EXPORT=1
DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS) DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS)
all : \ all : \
@@ -21,6 +25,7 @@ all : \
libglib-2.0-0.dll \ libglib-2.0-0.dll \
glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \ glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \
gspawn-win32-helper.exe \ gspawn-win32-helper.exe \
gspawn-win32-helper-console.exe \
gnulib\gnulib.lib : gnulib\gnulib.lib :
@@ -39,56 +44,58 @@ glib_OBJECTS = \
gatomic.obj \ gatomic.obj \
gbacktrace.obj \ gbacktrace.obj \
gbase64.obj \ gbase64.obj \
gbookmarkfile.obj \ gbookmarkfile.obj \
gcache.obj \ gcache.obj \
gchecksum.obj \ gchecksum.obj \
gcompletion.obj \ gcompletion.obj \
gconvert.obj \ gconvert.obj \
gdataset.obj \ gdataset.obj \
gdate.obj \ gdate.obj \
gdir.obj \ gdir.obj \
gerror.obj \ gerror.obj \
gfileutils.obj \ gfileutils.obj \
ghash.obj \ ghash.obj \
ghook.obj \ ghostutils.obj \
giochannel.obj \ ghook.obj \
giowin32.obj \ giochannel.obj \
gkeyfile.obj \ giowin32.obj \
glist.obj \ gpoll.obj \
gmain.obj \ gkeyfile.obj \
glist.obj \
gmain.obj \
gmappedfile.obj \ gmappedfile.obj \
gmarkup.obj \ gmarkup.obj \
gmem.obj \ gmem.obj \
gmessages.obj \ gmessages.obj \
gnode.obj \ gnode.obj \
goption.obj \ goption.obj \
gpattern.obj \ gpattern.obj \
gprimes.obj \ gprimes.obj \
gprintf.obj \ gprintf.obj \
gqsort.obj \ gqsort.obj \
gqueue.obj \ gqueue.obj \
grand.obj \ grand.obj \
gregex.obj \ gregex.obj \
grel.obj \ grel.obj \
gscanner.obj \ gscanner.obj \
gsequence.obj \ gsequence.obj \
gshell.obj \ gshell.obj \
gslice.obj \ gslice.obj \
gslist.obj \ gslist.obj \
gspawn-win32.obj \ gspawn-win32.obj \
gstdio.obj \ gstdio.obj \
gstrfuncs.obj \ gstrfuncs.obj \
gstring.obj \ gstring.obj \
gtestutils.obj \ gtestutils.obj \
gthread.obj \ gthread.obj \
gthreadpool.obj \ gthreadpool.obj \
gtimer.obj \ gtimer.obj \
gtree.obj \ gtree.obj \
gunibreak.obj \ gunibreak.obj \
gunicollate.obj \ gunicollate.obj \
gunidecomp.obj \ gunidecomp.obj \
guniprop.obj \ guniprop.obj \
gurifuncs.obj \ gurifuncs.obj \
gutf8.obj \ gutf8.obj \
gutils.obj \ gutils.obj \
gwin32.obj \ gwin32.obj \
@@ -106,14 +113,14 @@ galias.h: glib.symbols
galiasdef.c: glib.symbols galiasdef.c: glib.symbols
perl makegalias.pl -def < glib.symbols > galiasdef.c perl makegalias.pl -def < glib.symbols > galiasdef.c
localcharset.c : libcharset/localcharset.c localcharset.obj : libcharset\localcharset.c
copy libcharset\localcharset.c localcharset.c $(CC) $(CFLAGS) -DLIBDIR=\".\" -c libcharset\localcharset.c
glib.def: glib.symbols glib.def: glib.symbols
echo EXPORTS > glib.def echo EXPORTS > glib.def
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES \ cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES \
-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \ -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
-DG_GNUC_PRINTF=;G_GNUC_PRINTF glib.symbols >> glib.def -DG_GNUC_PRINTF=;G_GNUC_PRINTF -DG_GNUC_FORMAT=;G_GNUC_FORMAT glib.symbols >> glib.def
glib.res : glib.rc glib.res : glib.rc
rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc
@@ -133,6 +140,9 @@ libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib glib.def gli
gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll
$(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib $(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib
gspawn-win32-helper-console.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll
$(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:console user32.lib
################ other stuff ################ other stuff
clean:: clean::

View File

@@ -255,9 +255,14 @@ union _GSystemThread
*/ */
typedef void * GPid; typedef void * GPid;
#define GLIB_SYSDEF_AF_UNIX 1
#define GLIB_SYSDEF_AF_INET 2 #define GLIB_SYSDEF_AF_INET 2
#define GLIB_SYSDEF_AF_INET6 23 #define GLIB_SYSDEF_AF_INET6 23
#define GLIB_SYSDEF_MSG_OOB 1
#define GLIB_SYSDEF_MSG_PEEK 2
#define GLIB_SYSDEF_MSG_DONTROUTE 4
G_END_DECLS G_END_DECLS
#endif /* GLIBCONFIG_H */ #endif /* GLIBCONFIG_H */

View File

@@ -19,7 +19,6 @@ NONAUTOMATIC_TESTS = \
TESTS = \ TESTS = \
atomic-test.exe \ atomic-test.exe \
array-test.exe \
asyncqueue-test.exe \ asyncqueue-test.exe \
base64-test.exe \ base64-test.exe \
bit-test.exe \ bit-test.exe \
@@ -36,36 +35,36 @@ TESTS = \
gio-test.exe \ gio-test.exe \
iochannel-test.exe \ iochannel-test.exe \
hash-test.exe \ hash-test.exe \
keyfile-test.exe \
list-test.exe \ list-test.exe \
mainloop-test.exe \ mainloop-test.exe \
mapping-test.exe \ mapping-test.exe \
#c99 markup-collect.exe \
markup-escape-test.exe \ markup-escape-test.exe \
markup-test.exe \ markup-test.exe \
#main? memchunks.exe \ #main? memchunks.exe \
module-test.exe \ module-test.exe \
node-test.exe \ node-test.exe \
option-test.exe \ #c99 onceinit.exe \
patterntest.exe \ patterntest.exe \
printf-test.exe \
queue-test.exe \ queue-test.exe \
qsort-test.exe \ qsort-test.exe \
rand-test.exe \
regex-test.exe \ regex-test.exe \
relation-test.exe \ relation-test.exe \
#_? sequence-test.exe \ scannerapi.exe \
sequence-test.exe \
shell-test.exe \ shell-test.exe \
slice-color.exe \ slice-color.exe \
#unistd slice-concurrent.exe\
slice-threadinit.exe \
slice-test.exe \ slice-test.exe \
slist-test.exe \ slist-test.exe \
spawn-test.exe \ spawn-test.exe \
# strfunc-test doesn't compile with MSVC testingbase64.exe \
# strfunc-test.exe\
string-test.exe \
# strtod-test doesn't either
# strtod-test.exe \
thread-test.exe \ thread-test.exe \
threadpool-test.exe\ threadpool-test.exe \
#unistd timeloop-basic.exe \
#unistd timeloop-closure.exe \
#unistd timeloop.exe \
tree-test.exe \ tree-test.exe \
type-test.exe \ type-test.exe \
unicode-caseconv.exe \ unicode-caseconv.exe \
@@ -73,8 +72,8 @@ TESTS = \
utf8-validate.exe \ utf8-validate.exe \
utf8-pointer.exe \ utf8-pointer.exe \
uri-test.exe \ uri-test.exe \
\ \
gio-ls.exe gio-ls.exe
DLLS = \ DLLS = \
libmoduletestplugin_a.dll \ libmoduletestplugin_a.dll \
@@ -86,12 +85,12 @@ all : $(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS)
$(CC) $(CFLAGS) -c $< $(CC) $(CFLAGS) -c $<
$(CC) $(CFLAGS) -Fe$@ $< ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console $(CC) $(CFLAGS) -Fe$@ $< ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console
gio-ls.exe : gio-ls.obj gio-ls.exe : gio-ls.obj
$(CC) $(CFLAGS) -Fe$@ gio-ls.obj \ $(CC) $(CFLAGS) -Fe$@ gio-ls.obj \
..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib \ ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib \
..\gobject\gobject-2.0.lib ..\gio\gio-2.0.lib \ ..\gobject\gobject-2.0.lib ..\gio\gio-2.0.lib \
$(LDFLAGS) user32.lib /subsystem:console $(LDFLAGS) user32.lib /subsystem:console
slice-test.exe : memchunks.obj slice-test.obj slice-test.exe : memchunks.obj slice-test.obj
$(CC) $(CFLAGS) -Fe$@ memchunks.obj slice-test.obj \ $(CC) $(CFLAGS) -Fe$@ memchunks.obj slice-test.obj \
..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console