[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[adonthell-commits] master 0ab1553: UPDATED README.Win32 and improved wi
From: |
Kai Sterker |
Subject: |
[adonthell-commits] master 0ab1553: UPDATED README.Win32 and improved windows build |
Date: |
Sat, 20 Aug 2016 22:37:33 +0000 (UTC) |
branch: master
commit 0ab15537fd78a923c64f8300320764f76b10f2b6
Author: Kai Sterker <address@hidden>
Commit: Kai Sterker <address@hidden>
UPDATED README.Win32 and improved windows build
---
.gitignore | 4 +
README.Win32 | 216 ++++++++++++++++++++---------------------------
configure.ac | 15 +++-
make_windows_pkg.sh | 29 +++++--
src/modules/Makefile.am | 2 +-
5 files changed, 129 insertions(+), 137 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0b92ce4..756e8fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
.cproject
.project
+.settings
+adonthell-*.tar.gz
remove-potcdate.sed
*~
*.o
@@ -12,6 +14,8 @@ adonthell-0.3
adonthell-0.3.exe
src/lex.prefs.cc
src/tools/dlgedit/adonthell-dlgedit
+src/tools/dlgedit/lex.loadcfg.cc
+src/tools/dlgedit/lex.loadlg.cc
html
latex
reference.tag
diff --git a/README.Win32 b/README.Win32
index 7292d7c..e157167 100644
--- a/README.Win32
+++ b/README.Win32
@@ -1,173 +1,141 @@
- Adonthell on Win32
+ Adonthell on Windows
-This file contains additional information for compiling Adonthell
-under Windows for x86. For general compilation instructions refer to
-the INSTALL file. Even more details are found within the NEWBIE file.
+This file contains additional information for compiling Adonthell under
+Windows for x86 and/or x64. For general compilation instructions refer
+to the INSTALL file. Even more details are found within the NEWBIE file.
-Preparations:
-=============
+Build Environment:
+==================
+
+The recommended way to compile Adonthell for Windows is to use the mingw64
+distribution of the GNU Compiler Collection. Since Adonthell uses a build
+system based on GNU Autotools, a unixish environment such as provided by
+MSys2 is also required. So start by downloading the latest version from:
-The instructions below assume that you want to use mingw on top of
-cygwin, which will produce binaries without additional dependencies
-on cygwin.dll. You might find it less painfull to use plain cygwin,
-in which case you should be able to substitute most of the libraries
-found below with their prebuild cygwin counterparts.
+ https://sourceforge.net/projects/msys2/files/Base/x86_64/
-Also note that many of the issues and their workarounds might be
-specific to the version used below. If you resort to using different
-versions, your mileage may vary.
+For detailed installation instructions please refer to:
-1) Install Cygwin (http://www.cygwin.com/)
- * Download and run Setup.exe. Apart from the cygwin core packages,
- the following tools and libraries will be required:
+ https://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
- From package 'Devel' install
- - autoconf2.5
- - automake1.9
- - gcc-mingw-g++
- - gdb
- - libtool1.5
- - make
- - pkg-config
- - swig
- From package 'Mingw' install
- - mingw-zlib
- From package 'Python' install
- - python
+As an alternative, https://msys2.github.io/ also links to the download and
+runs you through the installation with a number of screenshots.
- * Finally, add cygwin bin directory to the windows system PATH
- (only required if you plan to use an external IDE for compiling
- Adonthell later on)
+Using the 64 bit version of MSys2 is recommended as it can create both 32bit
+and 64bit binaries.
-2) Install Python for MingW
- (http://jove.prohosting.com/iwave/ipython/pyMinGW.html)
- * Download pyMinGW-bin-core-2.4.3.1.zip
- * Extract and replace corresponding files in your cygwin Python
- installation
+Dependencies:
+=============
+Once MSys2 has been installed, you will need to install a number of packages
+through the MSys2 package manager (pacman) which are required by Adonthell.
-3) Install SDL (http://www.libsdl.org/)
- * Get source code, extract and compile/install in cygwin. This is
- as easy as following these steps:
+The package names below are the 64bit variants and as such result in a 64bit
+version of Adonthell. To create 32bit binaries, replace x86_64 with i686 in
+the package names below. Install each package by typing
- $ ./configure
- $ make
- $ make install
- $ cp /usr/local/share/aclocal/sdl.m4 /usr/share/aclocal
- $ ln -s /usr/local/include/SDL /usr/local/include/SDL/SDL
+ pacman -S <package name>
+The following packages are required:
+
+ tar
+ make
+ mingw-w64-x86_64-gcc
+ mingw-w64-x86_64-gettext
+ mingw-w64-x86_64-pkg-config
+ mingw-w64-x86_64-python3
+ mingw-w64-x86_64-SDL2_mixer
+ mingw-w64-x86_64-SDL2_ttf
-4) Install Freetype2 (http://www.freetype.org/)
- * Download freetype 2.2.1 source code, extract and compile by
- following the steps lined out below:
- $ export CC="gcc -mno-cygwin"
- $ export LDFLAGS=-mno-cygwin
- $ ./configure
- $ make
+Compiling Adonthell:
+====================
+
+After installing all the libraries and tools above, we're finally
+ready to compile Adonthell. For this, make sure to exit the MSys2 shell
+and open the mingw64 (or mingw32) environment instead.
- Just before linking, you will run into an error. Execute
- the looooong line below, then run 'make' again.
+Extract both adonthell-0.3.x.tar.gz and wastesedge-0.3.x.tar.gz and
+in each directory, run the usual commands:
- $ ./objs/apinames -o ./objs/ftexport.sym
./include/freetype/freetype.h ./include/freetype/ftbbox.h
./include/freetype/ftbdf.h ./include/freetype/ftbitmap.h
./include/freetype/ftcache.h ./include/freetype/ftchapters.h
./include/freetype/fterrdef.h ./include/freetype/fterrors.h
./include/freetype/ftglyph.h ./include/freetype/ftgxval.h
./include/freetype/ftgzip.h ./include/freetype/ftimage.h
./include/freetype/ftincrem.h ./include/freetype/ftlist.h
./include/freetype/ftlzw.h ./include/fr [...]
- $ make install
+ ./configure
+ make
+ make install
- * Note: this does not create a freetype DLL, but we should be
- able to live with that.
+to compile and install Adonthell locally. You can now launch Adonthell
+by typing
+ adonthell-wastesedge
-5) Install Libxml2 (http://xmlsoft.org/)
- * Download libxml-sources-2.6.26, extract and compile in cygwin by
- following the steps below:
- $ export CC="gcc -mno-cygwin"
- $ export LDFLAGS=-mno-cygwin
- $ ./configure --without-ftp --without-http
- $ make
- $ make install
+Distributable Package:
+======================
- * Note: the resulting DLL will be named cyglibxml2-2.dll. It does
- not depend on cygwin however.
+To create a version of Adonthell that can be used outside the mingw
+environment, or on a different computer running Windows, a set of scripts
+are provided. Make sure that the dependencies listed above are installed
+and the compile step worked. Then, in the adonthell-0.3.x directory, run
+ ./make_windows_pkg.sh
-6) Install OggVorbis (http://www.xiph.org/downloads/)
+If all goes well, it will configure, build and install into a directory
+called Adonthell/, including all the required DLLs not present in the
+Windows System32 folder. Now only the actual game data is missing.
- * Download libogg 1.1.3, extract and compile within cygwin:
+Change into the wastesedge-0.3.x directory and run
- $ export CC="gcc -mno-cygwin"
- $ export LDFLAGS=-mno-cygwin
- $ ./configure
- $ make
- $ make install
+ make_windows_pkg.sh ../adonthell-0.3.x/Adonthell
- * Download libvorbis 1.1.2, extract and compile within cygwin:
+(adjusting the location to the Adonthell directory as needed). This will
+configure, build and install Waste's Edge and make the package ready to
+use. You can now zip it up and transfer to any other Windows system.
- $ ln -s /usr/local/lib/pkgconfig /usr/lib/pkgconfig
- $ export CC="gcc -mno-cygwin"
- $ export LDFLAGS=-mno-cygwin
- $ ./configure
+To start the game, use the adonthell-wastesedge.bat script.
- Edit lib/Makefile and replace line
- libvorbisfile_la_LIBADD = libvorbis.la
- with
- libvorbisfile_la_LIBADD = -logg libvorbis.la
- $ make
- $ make install
+Installer:
+==========
+To make distribution of the Windows package a little more professional,
+a .msi installer can be built once the steps above are complete.
-Compiling Adonthell:
-====================
+This requires the WIX Toolset, downloadable from
-After installing all the libraries and tools above, we're finally
-ready to compile Adonthell.
+ http://wixtoolset.org/
- $ ln -s /usr/bin/less /usr/bin/more
- $ export CFLAGS=-mno-cygwin
- $ export LDFLAGS=-mno-cygwin
- $ ./autogen.sh
- $ ./configure --disable-nls --prefix=/usr/local
--with-py-libs="/bin/python24.dll" --with-py-cflags="-I/usr/include/python2.4"
+Make sure it is in your PATH, i.e.
-This should result into output similar to the following:
+ export PATH=$PATH:/C/Program\ Files\ \(x86\)/WiX\ Toolset\ v3.10/bin
- Adonthell v0.3.4
+(adjusting the location to the WiX bin directory accordingly)
- SDL ....................... : 1.2.11
- Python .................... : Manually specified
- Python debugging .......... : yes
- Freetype .................. : 9.10.3
- SWIG ...................... : 1.3.29
- Ogg music ................. : enabled
- Building API doc .......... : no
- Data directory ............ :
+Change into the wastesedge-0.3.x/win32 directory and run
-Before you continue with 'make', you have to execute the following
-command:
+ ./make_msi.sh ../../adonthell-0.3.x/Adonthell
- $ cd src && /usr/bin/swig -python -modern -shadow
-I/usr/local/include/SDL -I/usr/include/mingw -Dmain=SDL_main -I. -I./.. -c++
-makedefault -o ./py_adonthell_wrap.cc ./py_adonthell.i
+(adjusting the location to the Adonthell directory as needed).
-From then on, you should be able to go to your Eclipse IDE and build
-Adonthell from there (see below), or just type 'make' to start the
-build from cygwin.
+If all goes well, the installer will be created in the current directory.
-Using Eclipse IDE for Adonthell development:
-============================================
-If you plan to do programming work on Adonthell and want to use a
-modern IDE, Eclipse is a good choice as it works transparently with
-the toolchain we set up in preparation to compile Adonthell.
+Additional Notes:
+=================
-To use Eclipse to develop C/C++, download and install the following:
+(1) In order to embed the correct icon in the Adonthell executable,
+ the rcedit program needs to be present in the PATH. It can be
+ dowloaded from
- * Eclipse SDK 3.2
- http://www.eclipse.org/downloads/
+ https://github.com/electron/node-rcedit/tree/master/bin
- * CTD Runtime 3.1
- http://download.eclipse.org/tools/cdt/releases/callisto/dist/3.1.0/
+(2) In order to keep the list of external DLLs included in the package
+ at a minimum, it pays to use custom compiled versions of SDL2_mixer,
+ Freetype and SDL2_tff. Configure those with the following flags
-Then follow the tutorial at [1] to import the Adonthell source code.
+ Freetype : ./configure --with-png=no --with-bzip2=no
+ SDL2_mixer : ./configure --disable-music-ogg-shared
-[1]
http://download.eclipse.org/tools/cdt/docs/tutorials/import_standard_tutorial/cdt_w_std_import.htm
\ No newline at end of file
+ In this case, make sure to install mingw-w64-x86_64-libvorbis
+ using pacman.
diff --git a/configure.ac b/configure.ac
index e791bd3..89dd1e1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure
script.
dnl **************************************************************
AC_PREREQ(2.59)
-AC_INIT([Adonthell], [0.3.6])
+AC_INIT([Adonthell], [0.3.6], address@hidden, [adonthell],
[http://adonthell.nongnu.org])
AC_CONFIG_SRCDIR([README])
AC_CONFIG_AUX_DIR(.)
@@ -218,6 +218,11 @@ if test $PY_HEX_VERSION -lt `printf %d 0x020201F0`; then
AC_MSG_ERROR([*** Python 2.2.1 or better required])
fi
+dnl Get the Path to the Python standard library
+
+PY_PREFIX=`$PYTHON -c 'import sys; print (sys.prefix)'`
+AC_SUBST(PY_PREFIX)
+
dnl Find the Python.h header file
if test "x$pycflags" = xnone; then
@@ -254,14 +259,13 @@ if test "x$pylibs" = xnone; then
AC_MSG_CHECKING(for Python library)
PYLIB=""
changequote(<<, >>)
- PYPREFIX=`$PYTHON -c 'import sys; print (sys.prefix)'`
PYLIBVER=`$PYTHON -c 'import sys; print (sys.version[:3])'`
changequote([, ])
dnl look for a framework build of python first
- fw=`echo "$PYPREFIX" | sed 's/.*\(Python\.framework\).*/\1/;'`
+ fw=`echo "$PY_PREFIX" | sed 's/.*\(Python\.framework\).*/\1/;'`
if test "x$fw" != x && test "x$osx" = "xyes"; then
- PY_LIBS="$PYPREFIX/Python"
+ PY_LIBS="$PY_PREFIX/Python"
AC_MSG_RESULT(found)
else
dnl Try for specific version first, then the generic version, then panic
@@ -381,6 +385,9 @@ if test "x$haveswig" = "xno" ; then
if test -d ".git"; then
echo "*** To compile Adonthell from GIT, you will need SWIG
${SWIG_MINVER} or higher."
echo "*** You can obtain the most recent version from
http://www.swig.org."
+ echo "***"
+ echo "*** As an alternative, you can try using an older version of
Python"
+ echo "*** by specifying the --with-python=<python-exe> configure
option"
exit 1;
else
echo "*** NOTE: If you plan to make changes to the code you will need"
diff --git a/make_windows_pkg.sh b/make_windows_pkg.sh
index f1204fb..aab8401 100755
--- a/make_windows_pkg.sh
+++ b/make_windows_pkg.sh
@@ -60,7 +60,7 @@ BEGIN
VALUE "FileDescription", "Adonthell RPG Engine"
VALUE "FileVersion", "0.3.6"
VALUE "InternalName", "adonthell"
- VALUE "LegalCopyright", "� 2016 The Adonthell Team"
+ VALUE "LegalCopyright", "© 2016 The Adonthell Team"
VALUE "OriginalFilename", "adonthell-0.3.exe"
VALUE "ProductName", "Adonthell"
VALUE "ProductVersion", "0.3.6"
@@ -78,8 +78,8 @@ windres adonthell.rc -O coff -o adonthell.res
# -- prepare application
prefix=${cwd}/${bundle}
-configure_args="--disable-unix-install --disable-pyc --prefix=$prefix
--datadir=$prefix"
-linker_args="$cwd/build/adonthell.res -static-libgcc -static-libstdc++"
+configure_args="--disable-unix-install --disable-pyc --prefix=$prefix
--datadir=$prefix --mandir=/tmp"
+linker_args="-L$MINGW_PREFIX/lib $cwd/build/adonthell.res -static-libgcc
-static-libstdc++"
echo "Configuring $appname. This may take a while ..."
CXXFLAGS="-I$MINGW_PREFIX/usr/local/include" LDFLAGS=$linker_args ../configure
$configure_args > /dev/null
@@ -106,7 +106,7 @@ cd ..
function copyLibs
{
# -- find all non-standard shared libraries used by app
- for i in `ldd $1 | awk '{ print $3 }' | grep -i -v system32` ; do
+ for i in `ldd $1 | awk '/=>/ { print $3 }' | grep -i -v -e system32 -e
'?'` ; do
# -- strip path from library name
libname=`echo "$i" | sed 's/.*\///'`
@@ -121,7 +121,7 @@ function copyLibs
}
# -- copy shared libraries used by application
-copyLibs $bindir/$APP
+copyLibs "$bindir/$APP"
function removeDbgSyms
{
@@ -140,9 +140,12 @@ done
# -- copy required python modules from the standard library
#
-# Note that this list is for Python 3.5.0 as provided by
+# Note that this list is for Python 3.5.2 as provided by
# mingw64 and will have to be adjusted for other versions
# of Python.
+#
+# Instead of hardcoding the required files, perhaps a similar
+# approach as with the make_linux_appimg.sh could be used.
py3_modules="
__future__.py
_bootlocale.py
@@ -154,6 +157,8 @@ abc.py
codecs.py
collections/__init__.py
collections/abc.py
+contextlib.py
+copyreg.py
encodings/__init__.py
encodings/aliases.py
encodings/cp*.py
@@ -165,6 +170,10 @@ genericpath.py
hashlib.py
heapq.py
importlib/__init__.py
+importlib/abc.py
+importlib/machinery.py
+importlib/util.py
+imp.py
io.py
keyword.py
lib-dynload/_codecs_*-cpython-35m.dll
@@ -180,7 +189,11 @@ operator.py
os.py
random.py
reprlib.py
+re.py
site.py
+sre_compile.py
+sre_constants.py
+sre_parse.py
stat.py
sysconfig.py
traceback.py
@@ -198,5 +211,5 @@ for i in $py3_modules ; do
if [ ! -d $pythondir/$target ] ; then
mkdir $pythondir/$target
fi
- cp /mingw64/lib/python3.5/$i $pythondir/$target
-done
\ No newline at end of file
+ cp $MINGW_PREFIX/lib/python3.5/$i $pythondir/$target
+done
diff --git a/src/modules/Makefile.am b/src/modules/Makefile.am
index 03eb279..c291772 100644
--- a/src/modules/Makefile.am
+++ b/src/modules/Makefile.am
@@ -12,7 +12,7 @@ all: $(py_files)
done \
fi ;
- $(top_builddir)/src/adonthell-0.3 -c
+ address@hidden@ $(top_builddir)/src/adonthell-0.3 -c
else
nodist_moddata_DATA = $(py_files)
endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [adonthell-commits] master 0ab1553: UPDATED README.Win32 and improved windows build,
Kai Sterker <=