Windows updates

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@24745 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2007-03-02 03:15:32 +00:00
parent e238b0239a
commit 4df013f8f0
9 changed files with 136 additions and 213 deletions

View file

@ -1,6 +1,21 @@
2007-03-02 Nicola Pero <nicola.pero@meta-innovation.com>
* FilesystemLayouts/mingw: File removed.
* FilesystemLayouts/windows: File removed.
* FilesystemLayouts/README: Do not mention the removed layouts.
* configure.ac: Do not use 'windows' filesystem layout on mingw32;
the default filesystem layout is fine.
* configure: Regenerated.
* Documentation/README.MinGW: Updated.
* Instance/application.make (ALL_LDFLAGS): Add -mwindows when
building applications on MinGW, to get rid of the ugly terminal
window when you start the apps directly by double-clicking on the
.exe file in the Windows file manager.
* Documentation/filesystem.texi: Updated the section on Windows.
2007-02-29 Richard Frith-Macdonald <rfm@gnu.org>
* relative_path.sh: Fix for the case where the tweo arguments are
* relative_path.sh: Fix for the case where the two arguments are
identical paths.
2007-02-29 Richard Frith-Macdonald <rfm@gnu.org>

View file

@ -7,15 +7,35 @@ PURPOSE
-------
This document is intended to provide a step by step instruction on how
to get the GNUstep development environment in a usable state on a
recent Windows operating system (XP, 2000, and probably NT).
to use GNUstep on recent Windows operating systems (XP, 2000, and
probably NT).
It will get as far as explaining how to build a GNUstep application
and create a standalone version that can be shipped standalone to end
users.
and create a standalone version that can be shipped standalone to
Windows end users.
The recommended way to get GNUstep working on Windows is via MinGW
(this is what is described in this file).
The recommended way to get GNUstep working on Windows is to use MinGW
and MSYS to get a Unix-like environment where you can easily build
your GNUstep software (this is what is described in this file).
Software built in the MinGW/MSYS environment is native Windows
software that you can then run without having to rely on the environment
you used to build.
So, this document is divided in two parts.
In the first part ("STEP BY STEP INSTALLATION INSTRUCTIONS"), we will
describe how to get MSYS/MinGW up and running, and how to build
GNUstep software in this environment.
In the second part ("HOW TO SHIP YOUR GNUSTEP APPLICATION TO WINDOWS
USERS"), we'll show an example of how to package (and use) the .exes,
.dlls and resources (that you can build using the environment
described in the first part) as Windows standalone binaries.
INTRODUCTION TO MINGW
---------------------
MinGW is a collection of header files and import libraries that allow
one to use GCC and produce native Windows32 programs that do not rely
@ -43,12 +63,13 @@ GNUstep installer. Get it from
http://www.gnustep.org/resources/sources.html#windows
If you have already installed this, you can skip to the end and just
start compiling applications! Although you may want to read the rest of
the instructions for other helpful information.
start compiling and packaging applications! Although you may want to
read the rest of the instructions for other helpful information.
A. STEP BY STEP INSTALLATION INSTRUCTIONS
--------------------------------------
-----------------------------------------
1. Install MinGW
================
@ -103,7 +124,11 @@ network interface details for your machine.
It's a good idea to remove the libobjc.a and libobjc.la and
include/objc headers that come with gcc (gcc -v for location) so that
they are not accidentally found instead of the libobjc DLL that you
will compile below.
will compile below. This is what I did to remove them:
rm -Rf /mingw/lib/gcc/mingw32/3.4.2/include/objc
rm -Rf /mingw/lib/libobjc.a
rm -Rf /mingw/lib/libobjc.la
Now you can open a window containg a shell by choosing MSYS from the
start menu.
@ -142,18 +167,20 @@ svn co http://svn.gna.org/svn/gnustep/modules/core
go in core/make and do
./configure --with-layout=mingw
./configure --with-layout=fhs
make
make install
(TODO: Once this has been tested more extensively, we should
automatically select mingw layout on mingw)
The reason we recommend using the 'fhs' layout is that if do this, you
don't need to do anything to set up your environment. You can also
use the standard 'gnustep' layout, in which case you need to source
GNUstep.sh to run stuff.
8. setup your GNUstep environment
=================================
Nothing to do here since we're using the mingw native layout.
Nothing to do here since we're using the fhs native layout.
But if at some point something doesn't work for you, try using
export GNUSTEP_MAKEFILES=/usr/local/share/GNUstep/Makefiles
@ -178,7 +205,7 @@ Go in core/make and reconfigure/recompile again so that gnustep-objc
is detected:
make distclean
./configure --with-layout=mingw
./configure --with-layout=fhs
make
make install
@ -223,9 +250,11 @@ You need to get the source code for libxml2 and build it yourself ...
Now download the libxml2 source from http://www.xmlsoft.org I used
libxml2-2.6.27.tar.gz
Unpack the source, change into the directory and run the configure script
Then do 'make'
Then do 'make install'
Unpack the source, change into the directory and do the usual routine --
./configure
make
make install
You should now have libxml2 installed on your system.
@ -456,10 +485,23 @@ but generally, you want to make sure you remove anything that you
don't strictly need. So go in there and remove anything that you
don't need.
For example, I removed (at least):
First thing, you should remove the MSYS libraries, which we never use --
rm Gomoku.app/msys-1.0.dll
rm Gomoku.app/msysltdl-3.dll
rm Gomoku.app/libW11.dll
rm Gomoku.app/libperl.dll
rm Gomoku.app/librle3.dll
Then, remove any additional library that your application doesn't use;
for example, I removed --
rm Gomoku.app/Renaissance.dll
rm Gomoku.app/ProjectCenter.dll
Finally, remove Apps and other stuff that you might have copied from
the general GNUstep installation --
rm -Rf Gomoku.app/GNUstep/Apps
rm -Rf Gomoku.app/GNUstep/Frameworks/ProjectCenter.framework
@ -506,9 +548,6 @@ consequences, eg, if you are using your application from a USB flash
disk, Windows doesn't let you unplug the USB disk while gdnc/gpbs are
running, because they are running from the disk!
Gorm.app is 18 MB. Makes you wonder if it could be still reduced
somehow! Maybe we don't need to include all the DLLs ? ;-)
Also, it's not clear what happens if you have two or three such
GNUstep apps downloaded from the web and you try to run them at the
same time. What about gdomap etc ?

View file

@ -548,11 +548,11 @@ told to set up the default path to and values in the configuration file.
@node File Format, Windows (MINGW), Configuration, Configuration
@subsection File Format
By default, the configuration file is called GNUstep.conf and exists in
/etc/GNUstep on a Unix-like system or C:\GNUstep on an ms-windows system.
In either case this file is in a format suitable for being 'sourced' by
the standard unix (Bourne) shell, consisting of lines of the form key=value,
comments (everything on a line from the first hash (#) onwards), or blank lines.
By default, the configuration file is called GNUstep.conf and exists
in /etc/GNUstep on a Unix-like system. This file is in a format
suitable for being 'sourced' by the standard unix (Bourne) shell,
consisting of lines of the form key=value, comments (everything on a
line from the first hash (#) onwards), or blank lines.
This is very convenient on unix-like systems, but needs care for windows users.
If a value contains whitespace or backslash characters (or the hash which
@ -568,12 +568,15 @@ On ms-windows, for software development, you are likely to want to have an
extra configuration file. This is because of the limitations of the
make program (used to build and install software).
Basically the issue is that the make package doesn't really like
the colons and backslashes in windows paths (using them is error prone)
and can't tolerate whitespace in file names ... so you need to set up
a config file which uses unix-style paths as used by MSYS
(ie of the form '/c/...' rather than 'C:\...') for
building and installing software.
Basically the issue is that the make package doesn't really like the
colons and backslashes in windows paths (using them is error prone)
and can't tolerate whitespace in file names. So you want to do all
the building in a unix-style environment using only unix-style paths.
On MSYS/MinGW this is done naturally by using the standard unix-style
/etc/GNUstep/GNUstep.conf config file, where the location is inside
the MSYS unix-style emulation system. This is what is normally done
by gnustep-make, so there is nothing special you need to do here.
On the other hand, the base library (and all applications since they are
built using it) wants to work with native windows paths so that applications
@ -581,20 +584,25 @@ behave naturally as far as the end users are concerned, and therefore needs a
configuration file containing windows-style paths rather than unix-like
ones.
The simplest way to achieve this is to use different values for the
--with-config-file= option when configuring the make and base packages.
So, you need a different config file to be used by gnustep-base at
runtime. And this is enabled by default -- in fact gnustep-base will
use ./GNUstep.conf as config file on MinGW, where the location is
relative to the location of the gnustep-base.dll.
For example, configure the make package like this -
@example
./configure --with-config-file=/c/GNUstep/GNUstep.conf-dev
@end example
and the base library like this -
@example
./configure --with-config-file=C:\\GNUstep\\GNUstep.conf
@end example
In other words, gnustep-make will use C:/xxx/etc/GNUstep/GNUstep.conf
(where 'xxx' is the MSYS installation path), while gnustep-base will
use a GNUstep.conf file in the same directory as the gnustep-base.dll.
Then you need to edit the two config files to make sure they contain
values of the correct format.
This ./GNUstep.conf file normally does not even exist; gnustep-base's
./configure will hardcode into gnustep-base.dll relative paths to all
resources (relative from the installation location of
gnustep-base.dll). If you modify the filesystem layout or relocate
gnustep-base.dll, you should add a GNUstep.conf file with
gnustep-base.dll that contains the relative locations of the
directories (relative to the location of gnustep-base.dll).
It is recommended that this ./GNUstep.conf always contains relative
paths to make relocation easier.
@node File Values, , Windows (MINGW), Configuration
@subsection File Values

View file

@ -51,6 +51,4 @@ similar directory structure) as you're installing everything straight
into the standard system locations. Recommended if you're building
packages for a Unix system.
* windows: a GNUstep filesystem layout that installs by default into
C:/GNUstep. Recommend if you're compiling on Windows.

View file

@ -1,72 +0,0 @@
#
# MSYS/MinGW filesystem layout
#
# This filesystem layout installs the stuff in your local MSYS/MinGW
# filesystem. At the moment it is identical to the fhs layout, but
# this might change. Use this on Windows with MSYS/MinGW if you want
# GNUstep to blend in your MSYS/MinGW environment and you are
# compiling all of your GNUstep system from source.
# IMPORTANT: This configuration uses Unix paths. This is OK for
# gnustep-make (ie, the building system), but it is not OK for
# gnustep-base (ie, the runtime system). To work around this, when
# gnustep-base is configured, it will automatically use a
# ./GNUstep.conf file installed in the same directory as
# libgnustep-base.dll, and use paths relative to the location of
# libgnustep-base.dll.
# To use gnustep-make in this environment, use 'export
# GNUSTEP_MAKEFILES=/usr/local/share/GNUstep/Makefiles'
# By default, we install into /usr/local.
GNUSTEP_DEFAULT_PREFIX=/usr/local
# NB: $prefix will be added to all the MAKEFILES/SYSTEM/NETWORK/LOCAL
# paths.
GNUSTEP_MAKEFILES=/share/GNUstep/Makefiles
GNUSTEP_SYSTEM_APPS=/lib/GNUstep/Apps
GNUSTEP_SYSTEM_ADMIN_APPS=/lib/GNUstep/Apps
GNUSTEP_SYSTEM_TOOLS=/bin
GNUSTEP_SYSTEM_ADMIN_TOOLS=/sbin
GNUSTEP_SYSTEM_LIBRARY=/lib/GNUstep
GNUSTEP_SYSTEM_HEADERS=/include
GNUSTEP_SYSTEM_LIBRARIES=/lib
GNUSTEP_SYSTEM_DOC=/share/GNUstep/Documentation
GNUSTEP_SYSTEM_DOC_MAN=/man
GNUSTEP_SYSTEM_DOC_INFO=/info
GNUSTEP_NETWORK_APPS=/lib/GNUstep/Apps
GNUSTEP_NETWORK_ADMIN_APPS=/lib/GNUstep/Apps
GNUSTEP_NETWORK_TOOLS=/bin
GNUSTEP_NETWORK_ADMIN_TOOLS=/sbin
GNUSTEP_NETWORK_LIBRARY=/lib/GNUstep
GNUSTEP_NETWORK_HEADERS=/include
GNUSTEP_NETWORK_LIBRARIES=/lib
GNUSTEP_NETWORK_DOC=/share/GNUstep/Documentation
GNUSTEP_NETWORK_DOC_MAN=/man
GNUSTEP_NETWORK_DOC_INFO=/info
GNUSTEP_LOCAL_APPS=/lib/GNUstep/Apps
GNUSTEP_LOCAL_ADMIN_APPS=/lib/GNUstep/Apps
GNUSTEP_LOCAL_TOOLS=/bin
GNUSTEP_LOCAL_ADMIN_TOOLS=/sbin
GNUSTEP_LOCAL_LIBRARY=/lib/GNUstep
GNUSTEP_LOCAL_HEADERS=/include
GNUSTEP_LOCAL_LIBRARIES=/lib
GNUSTEP_LOCAL_DOC=/share/GNUstep/Documentation
GNUSTEP_LOCAL_DOC_MAN=/man
GNUSTEP_LOCAL_DOC_INFO=/info
GNUSTEP_USER_DIR_APPS=GNUstep/Applications
GNUSTEP_USER_DIR_ADMIN_APPS=GNUstep/Applications/Admin
GNUSTEP_USER_DIR_TOOLS=GNUstep/Tools
GNUSTEP_USER_DIR_ADMIN_TOOLS=GNUstep/Tools/Admin
GNUSTEP_USER_DIR_LIBRARY=GNUstep/Library
GNUSTEP_USER_DIR_HEADERS=GNUstep/Library/Headers
GNUSTEP_USER_DIR_LIBRARIES=GNUstep/Library/Libraries
GNUSTEP_USER_DIR_DOC=GNUstep/Documentation
GNUSTEP_USER_DIR_DOC_MAN=GNUstep/Documentation/man
GNUSTEP_USER_DIR_DOC_INFO=GNUstep/Documentation/info
GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf
GNUSTEP_USER_DEFAULTS_DIR=GNUstep/Defaults

View file

@ -1,60 +0,0 @@
#
# GNUstep filesystem layout for windows
#
# At the moment this is the same as the 'gnustep' layout, but it
# installs by default into C:/GNUstep. Contributions welcome though.
# By default, we install into C:/GNUstep, but this can be overridden
# by using ./configure --prefix=xxx when configuring.
GNUSTEP_DEFAULT_PREFIX=C:/GNUstep
# NB: $prefix will be added to all the MAKEFILES/SYSTEM/NETWORK/LOCAL
# paths.
GNUSTEP_MAKEFILES=/System/Library/Makefiles
GNUSTEP_SYSTEM_APPS=/System/Applications
GNUSTEP_SYSTEM_ADMIN_APPS=/System/Applications/Admin
GNUSTEP_SYSTEM_TOOLS=/System/Tools
GNUSTEP_SYSTEM_ADMIN_TOOLS=/System/Tools/Admin
GNUSTEP_SYSTEM_LIBRARY=/System/Library
GNUSTEP_SYSTEM_HEADERS=/System/Library/Headers
GNUSTEP_SYSTEM_LIBRARIES=/System/Library/Libraries
GNUSTEP_SYSTEM_DOC=/System/Library/Documentation
GNUSTEP_SYSTEM_DOC_MAN=/System/Library/Documentation/man
GNUSTEP_SYSTEM_DOC_INFO=/System/Library/Documentation/info
GNUSTEP_LOCAL_APPS=/Local/Applications
GNUSTEP_LOCAL_ADMIN_APPS=/Local/Applications/Admin
GNUSTEP_LOCAL_TOOLS=/Local/Tools
GNUSTEP_LOCAL_ADMIN_TOOLS=/Local/Tools/Admin
GNUSTEP_LOCAL_LIBRARY=/Local/Library
GNUSTEP_LOCAL_HEADERS=/Local/Library/Headers
GNUSTEP_LOCAL_LIBRARIES=/Local/Library/Libraries
GNUSTEP_LOCAL_DOC=/Local/Library/Documentation
GNUSTEP_LOCAL_DOC_MAN=/Local/Library/Documentation/man
GNUSTEP_LOCAL_DOC_INFO=/Local/Library/Documentation/info
GNUSTEP_NETWORK_APPS=/Local/Applications
GNUSTEP_NETWORK_ADMIN_APPS=/Local/Applications/Admin
GNUSTEP_NETWORK_TOOLS=/Local/Tools
GNUSTEP_NETWORK_ADMIN_TOOLS=/Local/Tools/Admin
GNUSTEP_NETWORK_LIBRARY=/Local/Library
GNUSTEP_NETWORK_HEADERS=/Local/Library/Headers
GNUSTEP_NETWORK_LIBRARIES=/Local/Library/Libraries
GNUSTEP_NETWORK_DOC=/Local/Library/Documentation
GNUSTEP_NETWORK_DOC_MAN=/Local/Library/Documentation/man
GNUSTEP_NETWORK_DOC_INFO=/Local/Library/Documentation/info
GNUSTEP_USER_DIR_APPS=GNUstep/Applications
GNUSTEP_USER_DIR_ADMIN_APPS=GNUstep/Applications/Admin
GNUSTEP_USER_DIR_TOOLS=GNUstep/Tools
GNUSTEP_USER_DIR_ADMIN_TOOLS=GNUstep/Tools/Admin
GNUSTEP_USER_DIR_LIBRARY=GNUstep/Library
GNUSTEP_USER_DIR_HEADERS=GNUstep/Library/Headers
GNUSTEP_USER_DIR_LIBRARIES=GNUstep/Library/Libraries
GNUSTEP_USER_DIR_DOC=GNUstep/Documentation
GNUSTEP_USER_DIR_DOC_MAN=GNUstep/Documentation/man
GNUSTEP_USER_DIR_DOC_INFO=GNUstep/Documentation/info
GNUSTEP_USER_CONFIG_FILE=.GNUstep.conf
GNUSTEP_USER_DEFAULTS_DIR=GNUstep/Defaults

View file

@ -111,6 +111,16 @@ ifeq ($(BUILD_DLL), yes)
ALL_LDFLAGS += -Wl,--export-all-symbols -Wl,--out-implib,$(GNUSTEP_BUILD_DIR)/$(APP_DIR_NAME)/$(GNUSTEP_TARGET_LDIR)/$(GNUSTEP_INSTANCE).exe$(LIBEXT)
endif
# If building on MinGW, also mark the application as a 'GUI'
# application. This prevents an ugly terminal window from being
# automatically opened when you start your application directly by
# double-clicking on the .exe icon in the Windows file manager. TODO:
# Move this into target.make, but somehow make sure it is only used
# when linking applications.
ifeq ($(findstring mingw32, $(GNUSTEP_TARGET_OS)), mingw32)
ALL_LDFLAGS += -mwindows
endif
$(APP_FILE): $(OBJ_FILES_TO_LINK)
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
$(OBJ_FILES_TO_LINK) $(ALL_GUI_LIBS)$(END_ECHO)

26
configure vendored
View file

@ -3329,18 +3329,10 @@ echo "${ECHO_T}$GNUSTEP_FILESYSTEM_LAYOUT" >&6
GNUSTEP_FILESYSTEM_LAYOUT_FILE="$GNUSTEP_FILESYSTEM_LAYOUT"
else
# This is the default layout that is used when installing
# GNUstep with no other indication. We normally use 'gnustep',
# but we first test for the C: directory, which means we're on
# Windows; in that case we use 'windows'.
if test -d C: >&5 2>&5; then
echo "$as_me:$LINENO: result: none specified: we will use 'windows'" >&5
echo "${ECHO_T}none specified: we will use 'windows'" >&6
GNUSTEP_FILESYSTEM_LAYOUT_FILE=windows
else
echo "$as_me:$LINENO: result: none specified: we will use 'gnustep'" >&5
# GNUstep with no other indication. We normally use 'gnustep'.
echo "$as_me:$LINENO: result: none specified: we will use 'gnustep'" >&5
echo "${ECHO_T}none specified: we will use 'gnustep'" >&6
GNUSTEP_FILESYSTEM_LAYOUT_FILE=gnustep
fi
GNUSTEP_FILESYSTEM_LAYOUT_FILE=gnustep
fi
if test ! -f "$srcdir/FilesystemLayouts/$GNUSTEP_FILESYSTEM_LAYOUT_FILE" >&5 2>&5; then
@ -3382,12 +3374,12 @@ fi
# If it wasn't passed, then we want to know because in that case we
# want to use the specified default prefix for that filesystem. For
# example, the 'gnustep' filesystem will install by default in
# /usr/GNUstep, while the 'fhs' filesystem will install by default
# in /usr/local, and the 'windows' one in C:/GNUstep. Please note
# that AC_PREFIX_DEFAULT will actually be done at the very beginning
# of ./configure, not here. So we wouldn't have access to all the
# filesystem layout information yet, which is why we only use the
# macro to know if a --prefix=xxx was passed or not.
# /usr/GNUstep, while the 'fhs' filesystem will install by default in
# /usr/local. Please note that AC_PREFIX_DEFAULT will actually be
# done at the very beginning of ./configure, not here. So we wouldn't
# have access to all the filesystem layout information yet, which is
# why we only use the macro to know if a --prefix=xxx was passed or
# not.
echo "$as_me:$LINENO: checking for prefix" >&5

View file

@ -225,16 +225,9 @@ if test ! x"$GNUSTEP_FILESYSTEM_LAYOUT" = x""; then
GNUSTEP_FILESYSTEM_LAYOUT_FILE="$GNUSTEP_FILESYSTEM_LAYOUT"
else
# This is the default layout that is used when installing
# GNUstep with no other indication. We normally use 'gnustep',
# but we first test for the C: directory, which means we're on
# Windows; in that case we use 'windows'.
if test -d C: >&5 2>&5; then
AC_MSG_RESULT(none specified: we will use 'windows')
GNUSTEP_FILESYSTEM_LAYOUT_FILE=windows
else
AC_MSG_RESULT(none specified: we will use 'gnustep')
GNUSTEP_FILESYSTEM_LAYOUT_FILE=gnustep
fi
# GNUstep with no other indication. We normally use 'gnustep'.
AC_MSG_RESULT(none specified: we will use 'gnustep')
GNUSTEP_FILESYSTEM_LAYOUT_FILE=gnustep
fi
if test ! -f "$srcdir/FilesystemLayouts/$GNUSTEP_FILESYSTEM_LAYOUT_FILE" >&5 2>&5; then
@ -273,12 +266,12 @@ fi
# If it wasn't passed, then we want to know because in that case we
# want to use the specified default prefix for that filesystem. For
# example, the 'gnustep' filesystem will install by default in
# /usr/GNUstep, while the 'fhs' filesystem will install by default
# in /usr/local, and the 'windows' one in C:/GNUstep. Please note
# that AC_PREFIX_DEFAULT will actually be done at the very beginning
# of ./configure, not here. So we wouldn't have access to all the
# filesystem layout information yet, which is why we only use the
# macro to know if a --prefix=xxx was passed or not.
# /usr/GNUstep, while the 'fhs' filesystem will install by default in
# /usr/local. Please note that AC_PREFIX_DEFAULT will actually be
# done at the very beginning of ./configure, not here. So we wouldn't
# have access to all the filesystem layout information yet, which is
# why we only use the macro to know if a --prefix=xxx was passed or
# not.
AC_PREFIX_DEFAULT(NONE)
AC_MSG_CHECKING([for prefix])