diff options
-rw-r--r-- | tools/windows_packaging/Fedora-16-mingw.txt | 41 | ||||
-rw-r--r-- | tools/windows_packaging/README | 112 | ||||
-rw-r--r-- | tools/windows_packaging/ardour.nsi | 123 | ||||
-rw-r--r-- | tools/windows_packaging/configure-debug.sh | 8 | ||||
-rw-r--r-- | tools/windows_packaging/configure-release.sh | 8 | ||||
-rw-r--r-- | tools/windows_packaging/cptovm.sh | 62 | ||||
-rw-r--r-- | tools/windows_packaging/gdbinit | 2 | ||||
-rw-r--r-- | tools/windows_packaging/loaders.cache | 144 | ||||
-rw-r--r-- | tools/windows_packaging/make-installer.sh | 15 | ||||
-rw-r--r-- | tools/windows_packaging/mingw-env.sh | 51 | ||||
-rw-r--r-- | tools/windows_packaging/package.sh | 186 | ||||
-rw-r--r-- | tools/windows_packaging/pango.modules | 35 | ||||
-rw-r--r-- | tools/windows_packaging/print-env.sh | 40 | ||||
-rw-r--r-- | tools/windows_packaging/run-wine.sh | 39 | ||||
-rw-r--r-- | tools/windows_packaging/startvm.sh | 3 | ||||
-rw-r--r-- | tools/windows_packaging/waf.sh | 6 |
16 files changed, 875 insertions, 0 deletions
diff --git a/tools/windows_packaging/Fedora-16-mingw.txt b/tools/windows_packaging/Fedora-16-mingw.txt new file mode 100644 index 0000000000..23c9a749ce --- /dev/null +++ b/tools/windows_packaging/Fedora-16-mingw.txt @@ -0,0 +1,41 @@ + +Fedora Packages are installed via $ yum install foobar + +wine, needed to run some tests during the configure process + +mingw32-gcc + +mingw32-libogg + +mingw32-flac not in repo <- requires libogg + +mingw32-libvorbis + +mingw32-libsndfile not in repo <- requires flac, vorbis +mingw32-libsamplerate not in repo <- requires sndfile for examples? + +mingw32-gtkmm24, this will pull in all the gtk+ deps etc + +mingw32-gtk2-engines not in repo <- provides clearlooks + +mingw32-libglade2, required for gnomecanvas + +mingw32-libart_lgpl not in repo +mingw32-libgnomecanvas not in repo <- requires libart, libglade2 +mingw32-libgnomecanvasmm not in repo <- requires + +mingw32-portaudio not in repo + +mingw32-jack-audio-connection-kit not in repo + +mingw32-fftw not in repo + +mingw32-curl + +Optional + +mingw32-cppunit, if tests enabled +mingw32-gdb, for debugging + +qemu-kvm to run virt images + diff --git a/tools/windows_packaging/README b/tools/windows_packaging/README new file mode 100644 index 0000000000..cb01c5675f --- /dev/null +++ b/tools/windows_packaging/README @@ -0,0 +1,112 @@ +Building Ardour for Windows + +The windows build is compiled and tested with the MinGW compiler that is +packaged in Fedora, Currently using Fedora 16. There are many cross compiled +"mingw" libraries that Ardour requires that are also available on Fedora but +not all are yet. + + +Prerequisites + +Follow instructions in Fedora-16.txt to build and/or install the required +packages. + + +Configuring + +After all the necessary packages are installed the next step is to call +one of the configure scripts configure-debug.sh or configure-release.sh. + +The configure-debug.sh script will enable debugging support and install +the tests to the package directory. It will also mean the GDB debugger +is packaged. + +The configure-release.sh is intended for releases only, none of the tests +will be built and all the binaries will be optimized and stripped. + +These scripts both source the mingw-env.sh script to setup the appropriate +environment variables and then call waf with a specific set of parameters +that are appropriate to configure for the windows build. + + +Building + +After the build is configured the waf.sh script is used to build the Ardour +application and all necessary libraries. The waf.sh script is not strictly +needed, it just saves having to change working directories. + + +Packaging + +When the build is successful the package.sh script will call waf install +and then move some of the installed files to appropriate locations for a +windows executable. This could probably be done in the waf scripts specifically +for the windows build but I felt it simpler to do it in the packaging script +for now. + +The packaging script then copies the JACK deamon and all the required mingw +shared libraries from the host system into the packaging directory. The +shared libraries or dll's are placed in the same directory as the Ardour +executable so they are found at runtime. + +Once the package.sh script has been run then the package directory located +in the Ardour source root directory will contain everything necessary to run +the Ardour executable. + +The make-installer.sh script is only really relevant when configure-release.sh +has been used to configure the build. The script creates a basic and little +tested windows installer for Ardour using the Nullsoft Scriptable Installer +System(NSIS). + + +Running + +The Ardour windows binary is intended to be run and tested on windows. Testing +is mainly performed using Windows XP, but should work on Vista/7. It is only +a 32bit binary at the moment but that may change with mingw64. + +The binary does not run successfully under WINE but that may change with updates +and or bug fixes. + +When running Ardour for debugging purposes it is best to start the jack server +in a separate terminal(Command Prompt) before starting Ardour so that they are +not both writing to the same terminal. This will probably be fixed at some point +so when jackd is started by Ardour the output is redirected etc. + +The cptovm.sh and startvm.sh scripts are intended for testing Ardour in a +Windows XP virt image and may need to be altered to be used successfully. + + +Testing + +When configured for debugging there are a number of test programs(prefixed with +test_) included in the package. + + +Debugging + +Ardour has some verbose logging/debugging output that can be useful that is used +with the -D option. + +When configured for debugging the package contains gdb along with a .gdbinit +file to automatically set the source directory so that the "list" gdb command +will show the source code corresponding to the current stack frame. + +Use break `Somenamespace::somepartialsymbolname + tab to list symbols, then remove +` to set break. If you press tab with when there are thousands of possible +matching symbols be prepared to wait a long time(this can also cause gdb to use a +lot of memory). + +For reasons I've yet to determine many symbols are not accessible so the best way +to set a breakpoint is by using filename and line number. + +e.g (gdb) break audiosource.cc:976 + +but this seems to only work after running Ardour at least once. + +They are a number of glib debugging options see + +http://developer.gnome.org/glib/2.30/glib-running.html + +use $ set G_DEBUG=fatal_warnings to get backtrace + diff --git a/tools/windows_packaging/ardour.nsi b/tools/windows_packaging/ardour.nsi new file mode 100644 index 0000000000..3bfcc050b3 --- /dev/null +++ b/tools/windows_packaging/ardour.nsi @@ -0,0 +1,123 @@ +#!Nsis Installer Command Script +# +# This is an NSIS Installer Command Script generated automatically +# by the Fedora nsiswrapper program. For more information see: +# +# http://fedoraproject.org/wiki/MinGW +# +# To build an installer from the script you would normally do: +# +# makensis this_script +# +# which will generate the output file 'installer.exe' which is a Windows +# installer containing your program. + +SetCompressor /SOLID lzma +SetCompressorDictSize 32 + +!include MUI.nsh + +!define MUI_ABORTWARNING +!define MUI_ICON ..\icons\icon\ardour.ico +!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" +;!define MUI_HEADERIMAGE +;!define MUI_HEADERIMAGE_BITMAP header.bmp +;!define MUI_WELCOMEFINISHPAGE_BITMAP welcomefinish.bmp +;!define MUI_COMPONENTSPAGE_SMALLDESC + +; Installer pages +!insertmacro MUI_PAGE_WELCOME + +LicenseForceSelection off + +!define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)" +!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(LICENSE_BOTTOM_TEXT)" +!insertmacro MUI_PAGE_LICENSE ..\COPYING + +!insertmacro MUI_PAGE_DIRECTORY + +!insertmacro MUI_PAGE_INSTFILES + +!define MUI_FINISHPAGE_RUN "$INSTDIR\Ardour-3.0.exe" +!insertmacro MUI_PAGE_FINISH + +; Uninstaller pages +!insertmacro MUI_UNPAGE_CONFIRM + +!insertmacro MUI_UNPAGE_INSTFILES +ShowUninstDetails hide +!insertmacro MUI_UNPAGE_FINISH + +!insertmacro MUI_LANGUAGE "English" + +; Product definitions +;!define DUMMYINSTALL ; Define this to make it build quickly, not including any of the files or code in the sections, for quick testing of features of the installer and development thereof. +!define INSTDIR_KEY "SOFTWARE\Ardour-3.0" + +; Product Information +Name "Ardour-3.0" +OutFile "Ardour-3.0-Setup.exe" +InstallDir "$PROGRAMFILES\Ardour" +InstallDirRegKey HKLM "${INSTDIR_KEY}" "Install_Dir" + + +ComponentText "Select which optional components you want to install." + +DirText "Please select the installation folder." + +Section "Ardour-3.0" +!ifndef DUMMYINSTALL + SectionIn RO + + SetOutPath $INSTDIR + File ardour-3.0.exe + File *.dll + File jack*.exe + File ardour.ico + File /r etc + File /r jack + File /r lib + File /r share + +!endif +SectionEnd + +Section "Start Menu Shortcuts" +!ifndef DUMMY_INSTALL + CreateDirectory "$SMPROGRAMS\Ardour-3.0" + CreateShortCut "$SMPROGRAMS\Ardour-3.0\Uninstall Ardour-3.0.lnk" "$INSTDIR\Uninstall Ardour-3.0.exe" "" "$INSTDIR\Uninstall Ardour-3.0.exe" 0 + CreateShortCut "$SMPROGRAMS\Ardour-3.0\ardour-3.0.exe.lnk" "$INSTDIR\.\ardour-3.0.exe" "" "$INSTDIR\ardour.ico" 0 +!endif +SectionEnd + +Section "Desktop Icons" +!ifndef DUMMY_INSTALL + CreateShortCut "$DESKTOP\Ardour-3.0.exe.lnk" "$INSTDIR\ardour-3.0.exe" "" "$INSTDIR\ardour.ico" +!endif +SectionEnd + +Section "Uninstall" +!ifndef DUMMY_INSTALL + Delete /rebootok "$DESKTOP\ardour-3.0.exe.lnk" + Delete /rebootok "$SMPROGRAMS\Ardour-3.0\ardour-3.0.exe.lnk" + Delete /rebootok "$SMPROGRAMS\Ardour-3.0\Uninstall Ardour-3.0.lnk" + RMDir "$SMPROGRAMS\Ardour-3.0" + + ;RMDir "$INSTDIR\." + Delete /rebootok "$INSTDIR\ardour-3.0.exe" + Delete /rebootok "$INSTDIR\jack*.exe" + Delete /rebootok "$INSTDIR\*.dll" + Delete /rebootok "$INSTDIR\ardour.ico" + RMDir /r "$INSTDIR\etc" + RMDir /r "$INSTDIR\jack" + RMDir /r "$INSTDIR\lib" + RMDir /r "$INSTDIR\share" + RMDir "$INSTDIR" +!endif +SectionEnd + +Section -post +!ifndef DUMMY_INSTALL + WriteUninstaller "$INSTDIR\Uninstall Ardour-3.0.exe" +!endif +SectionEnd diff --git a/tools/windows_packaging/configure-debug.sh b/tools/windows_packaging/configure-debug.sh new file mode 100644 index 0000000000..bcee29deba --- /dev/null +++ b/tools/windows_packaging/configure-debug.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +. ./mingw-env.sh + +. ./print-env.sh + +cd $BASE || exit 1 +./waf configure --prefix="/" --bindir="/" --configdir="/share" --noconfirm --no-lv2 --test --single-tests --dist-target=mingw "$@" diff --git a/tools/windows_packaging/configure-release.sh b/tools/windows_packaging/configure-release.sh new file mode 100644 index 0000000000..2e943e00fe --- /dev/null +++ b/tools/windows_packaging/configure-release.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +. ./mingw-env.sh + +. ./print-env.sh + +cd $BASE || exit 1 +./waf configure --prefix="/" --bindir="/" --configdir="/share" --optimize --noconfirm --no-lv2 --dist-target=mingw "$@" diff --git a/tools/windows_packaging/cptovm.sh b/tools/windows_packaging/cptovm.sh new file mode 100644 index 0000000000..62e6fd6a27 --- /dev/null +++ b/tools/windows_packaging/cptovm.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +. ./mingw-env.sh + +TMP_DIR=tmp +LOOP_DEV=/dev/loop4 + +cd $BASE || exit 1 + +if [ ! -d $TMP_DIR ]; then + echo "Creating temp directory to mount vm image ..." + mkdir $TMP_DIR || exit 1 +fi + +echo "mounting vm image as loopback device ..." + +sudo mount -o loop=$LOOP_DEV,offset=32256 $VIRT_IMAGE_PATH $TMP_DIR || exit 1 + +if [ -d $TMP_DIR/$PACKAGE_DIR ]; then + echo "Removing old copy of $PACKAGE_DIR from vm image ..." + rm -rf $TMP_DIR/$PACKAGE_DIR || exit 1 +fi + +echo "Copying $PACKAGE_DIR to vm image ..." +cp -r $PACKAGE_DIR $TMP_DIR || exit 1 + +if [ "$1" == "--data" ]; then + DATA_DIR=data + + if [ -d $TMP_DIR/$DATA_DIR ]; then + echo "Removing old copy of $DATA_DIR from vm image ..." + rm -rf $TMP_DIR/$DATA_DIR || exit 1 + fi + + echo "Copying $DATA_DIR to vm image ..." + cp -r $DATA_DIR $TMP_DIR || exit 1 +fi + + +# in case mount is busy +sleep 2 + +echo "Unmounting vm image ..." + +sudo umount -d tmp + +echo "Removing temp directory used to mount vm image ..." +rm -rf $TMP_DIR || exit 1 + +if sudo losetup $LOOP_DEV; then + echo "sleeping for 10 seconds and trying again ..." + sleep 10 + if sudo losetup -d $LOOP_DEV; then + echo "Unmounted loopback device successfully" + exit 0 + else: + echo "Unmounting loopback device unsuccessful, you will need to use losetup -d to unmount device" + exit 1 + fi +fi + +exit 0 diff --git a/tools/windows_packaging/gdbinit b/tools/windows_packaging/gdbinit new file mode 100644 index 0000000000..b170ccad1a --- /dev/null +++ b/tools/windows_packaging/gdbinit @@ -0,0 +1,2 @@ +echo dir src/gtk2_ardour \n + dir src/gtk2_ardour diff --git a/tools/windows_packaging/loaders.cache b/tools/windows_packaging/loaders.cache new file mode 100644 index 0000000000..8293cd8898 --- /dev/null +++ b/tools/windows_packaging/loaders.cache @@ -0,0 +1,144 @@ +# GdkPixbuf Image Loader Modules file +# Automatically generated file, do not edit +# Created by gdk-pixbuf-query-loaders.exe from gdk-pixbuf-2.21.7 +# +# LoaderDir = Z:\usr\i686-pc-mingw32\sys-root\mingw/lib/gdk-pixbuf-2.0/2.10.0/loaders +# +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.dll" +"png" 5 "gdk-pixbuf" "The PNG image format" "LGPL" +"image/png" "" +"png" "" +"\211PNG\r\n\032\n" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xpm.dll" +"xpm" 4 "gdk-pixbuf" "The XPM image format" "LGPL" +"image/x-xpixmap" "" +"xpm" "" +"/* XPM */" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-bmp.dll" +"bmp" 5 "gdk-pixbuf" "Het BMP-bestandsformaat" "LGPL" +"image/bmp" "image/x-bmp" "image/x-MS-bmp" "" +"bmp" "" +"BM" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-tiff.dll" +"tiff" 5 "gdk-pixbuf" "The TIFF image format" "LGPL" +"image/tiff" "" +"tiff" "tif" "" +"MM *" " z " 100 +"II* " " z" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pcx.dll" +"pcx" 4 "gdk-pixbuf" "The PCX image format" "LGPL" +"image/x-pcx" "" +"pcx" "" +"\n \001" "" 100 +"\n\002\001" "" 100 +"\n\003\001" "" 100 +"\n\004\001" "" 100 +"\n\005\001" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-wmf.dll" +"wmf" 4 "gdk-pixbuf" "Het WMF-bestandsformaat" "LGPL" +"image/x-wmf" "" +"wmf" "apm" "" +"\327\315\306\232" "" 100 +"\001" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ras.dll" +"ras" 4 "gdk-pixbuf" "The Sun raster image format" "LGPL" +"image/x-cmu-raster" "image/x-sun-raster" "" +"ras" "" +"Y\246j\225" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-ico.dll" +"ico" 4 "gdk-pixbuf" "Het ICO-bestandsformaat" "LGPL" +"image/x-icon" "image/x-ico" "" +"ico" "cur" "" +" \001 " "zz znz" 100 +" \002 " "zz znz" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-wbmp.dll" +"wbmp" 4 "gdk-pixbuf" "The WBMP image format" "LGPL" +"image/vnd.wap.wbmp" "" +"wbmp" "" +" " "zz" 1 +" `" "z " 1 +" @" "z " 1 +" " "z " 1 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-pnm.dll" +"pnm" 4 "gdk-pixbuf" "The PNM/PBM/PGM/PPM image format family" "LGPL" +"image/x-portable-anymap" "image/x-portable-bitmap" "image/x-portable-graymap" "image/x-portable-pixmap" "" +"pnm" "pbm" "pgm" "ppm" "" +"P1" "" 100 +"P2" "" 100 +"P3" "" 100 +"P4" "" 100 +"P5" "" 100 +"P6" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-ani.dll" +"ani" 4 "gdk-pixbuf" "The ANI image format" "LGPL" +"application/x-navi-animation" "" +"ani" "" +"RIFF ACON" " xxxx " 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-qtif.dll" +"qtif" 4 "gdk-pixbuf" "The QTIF image format" "LGPL" +"image/x-quicktime" "image/qtif" "" +"qtif" "qif" "" +"abcdidsc" "xxxx " 100 +"abcdidat" "xxxx " 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-xbm.dll" +"xbm" 4 "gdk-pixbuf" "The XBM image format" "LGPL" +"image/x-xbitmap" "" +"xbm" "" +"#define " "" 100 +"/*" "" 50 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-icns.dll" +"icns" 4 "gdk-pixbuf" "The ICNS image format" "GPL" +"image/x-icns" "" +"icns" "" +"icns" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jasper.dll" +"jpeg2000" 4 "gdk-pixbuf" "The JPEG 2000 image format" "LGPL" +"image/jp2" "image/jpeg2000" "image/jpx" "" +"jp2" "jpc" "jpx" "j2k" "jpf" "" +" jP" "!!!! " 100 +"\377O\377Q" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-jpeg.dll" +"jpeg" 5 "gdk-pixbuf" "Het JPEG-bestandsformaat" "LGPL" +"image/jpeg" "" +"jpeg" "jpe" "jpg" "" +"\377\330" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-gif.dll" +"gif" 5 "gdk-pixbuf" "Het GIF-bestandsformaat" "LGPL" +"image/gif" "" +"gif" "" +"GIF8" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-gdip-emf.dll" +"emf" 4 "gdk-pixbuf" "Het EMF-bestandsformaat" "LGPL" +"application/emf" "application/x-emf" "image/x-emf" "image/x-mgx-emf" "" +"emf" "" +"\001" "" 100 + +"lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-tga.dll" +"tga" 4 "gdk-pixbuf" "The Targa image format" "LGPL" +"image/x-tga" "" +"tga" "targa" "" +" \001\001" "x " 100 +" \001\t" "x " 100 +" \002" "xz " 99 +" \003" "xz " 100 +" \n" "xz " 100 +" \013" "xz " 100 + + diff --git a/tools/windows_packaging/make-installer.sh b/tools/windows_packaging/make-installer.sh new file mode 100644 index 0000000000..621f271a61 --- /dev/null +++ b/tools/windows_packaging/make-installer.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +. ./mingw-env.sh + +cd $BASE || exit 1 + +if test ! -d $PACKAGE_DIR; then + echo "Win32 package directory does not exist" + exit 1 +fi + +cp $TOOLS_DIR/ardour.nsi $PACKAGE_DIR || exit 1 +cp $BASE/icons/icon/ardour.ico $PACKAGE_DIR || exit 1 + +cd $PACKAGE_DIR && makensis ardour.nsi diff --git a/tools/windows_packaging/mingw-env.sh b/tools/windows_packaging/mingw-env.sh new file mode 100644 index 0000000000..c6747ae03b --- /dev/null +++ b/tools/windows_packaging/mingw-env.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +BASE=$(readlink -f $0) +BASE=$(dirname $BASE) # up one +BASE=$(dirname $BASE) # up one more +BASE=$(dirname $BASE) # up one more + +HOST=i686-pc-mingw32 +MINGW_ROOT=/usr/$HOST/sys-root/mingw + +export PKG_CONFIG_PREFIX=$MINGW_ROOT +export PKG_CONFIG_LIBDIR=$MINGW_ROOT/lib/pkgconfig +export PKGCONFIG=mingw32-pkg-config +export AR=$HOST-ar +export RANLIB=$HOST-ranlib +export CC=$HOST-gcc +export CPP=$HOST-g++ +export CXX=$HOST-g++ +export AS=$HOST-as +export LINK_CC=$HOST-gcc +export LINK_CXX=$HOST-g++ +export WINRC=$HOST-windres +export STRIP=$HOST-strip + +BUILD_DIR=$BASE/build +BUILD_CACHE_FILE=$BUILD_DIR/c4che/_cache.py +TOOLS_DIR=$BASE/tools/windows_packaging + +APPNAME=`grep -m 1 '^APPNAME' $BASE/wscript | awk '{print $3}' | sed "s/'//g"` +VERSION=`grep -m 1 '^VERSION' $BASE/wscript | awk '{print $3}' | sed "s/'//g"` + +# These are only relevant after a build +if test -f $BUILD_CACHE_FILE +then + # Figure out the Build Type + if grep -q "DEBUG = True" $BUILD_CACHE_FILE; then + DEBUG=1 + PACKAGE_DIR="$APPNAME-$VERSION-win32-dbg" + else + PACKAGE_DIR="$APPNAME-$VERSION-win32" + fi + + if grep -q "BUILD_TESTS = True" $BUILD_CACHE_FILE; then + WITH_TESTS=1 + fi + + ARDOUR_DATA_DIR=$PACKAGE_DIR/share/ardour3 +fi + +# put this somewhere better... +VIRT_IMAGE_PATH=$HOME/virt-images/winxp.raw diff --git a/tools/windows_packaging/package.sh b/tools/windows_packaging/package.sh new file mode 100644 index 0000000000..2d7cb7d097 --- /dev/null +++ b/tools/windows_packaging/package.sh @@ -0,0 +1,186 @@ +#!/bin/bash + +. ./mingw-env.sh + +. ./print-env.sh + +cd $BASE || exit 1 + +if ! test -f $BUILD_CACHE_FILE; then + echo "ERROR: $APPNAME is not configured and built yet..." + exit 1 +fi + +if [ -d $PACKAGE_DIR ]; then + echo "Removing old package directory structure ..." + rm -rf $PACKAGE_DIR || exit 1 +fi + +./waf --destdir=$PACKAGE_DIR install || exit 1 + +echo "Moving Ardour dll's and executable to $PACKAGE_DIR ..." + +mv $PACKAGE_DIR/lib/ardour3/*.dll $PACKAGE_DIR || exit 1 +mv $PACKAGE_DIR/lib/ardour3/*.exe $PACKAGE_DIR || exit 1 + +echo "Deleting import libs ..." + +rm $PACKAGE_DIR/lib/*dll.a + +# delete sh script +rm $PACKAGE_DIR/ardour3 + +if test x$WITH_TESTS != x ; then + echo "Copying tests and test data to $PACKAGE_DIR ..." + cp $BUILD_DIR/libs/pbd/run-tests.exe $PACKAGE_DIR/pbd-run-tests.exe + cp -r $BASE/libs/pbd/test $PACKAGE_DIR/pbd_testdata + + cp $BUILD_DIR/libs/evoral/run-tests.exe $PACKAGE_DIR/evoral-run-tests.exe + mkdir -p $PACKAGE_DIR/test/testdata + cp -r $BASE/libs/evoral/test/testdata/TakeFive.mid $PACKAGE_DIR/test/testdata + + cp -r $BASE/libs/ardour/test/data $PACKAGE_DIR/ardour_testdata +fi + +echo "Copying mingw config files to $PACKAGE_DIR ..." +# just copy it all for now +cp -r $MINGW_ROOT/etc $PACKAGE_DIR + +cp -r $MINGW_ROOT/lib/gtk-2.0 $PACKAGE_DIR/lib +cp -r $MINGW_ROOT/lib/gdk-pixbuf-2.0 $PACKAGE_DIR/lib +cp $TOOLS_DIR/loaders.cache $PACKAGE_DIR/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + +mkdir -p $PACKAGE_DIR/lib/pango/1.6.0/modules +cp -r $MINGW_ROOT/lib/pango/1.6.0/modules/*.dll $PACKAGE_DIR/lib/pango/1.6.0/modules +cp $TOOLS_DIR/pango.modules $PACKAGE_DIR/etc/pango + +DLLS=' +jack-0.dll +jackserver-0.dll +libart_lgpl_2-2.dll +libatk-1.0-0.dll +libatkmm-1.6-1.dll +libcairo-2.dll +libcairo-gobject-2.dll +libcairomm-1.0-1.dll +libcairo-script-interpreter-2.dll +libcppunit-1-12-1.dll +libcrypto-10.dll +libcurl-4.dll +libexpat-1.dll +libfftw3-3.dll +libfftw3f-3.dll +libfontconfig-1.dll +libfreetype-6.dll +libgailutil-18.dll +libgcc_s_sjlj-1.dll +libgdkmm-2.4-1.dll +libgdk_pixbuf-2.0-0.dll +libgdk-win32-2.0-0.dll +libgio-2.0-0.dll +libgiomm-2.4-1.dll +libglib-2.0-0.dll +libglibmm-2.4-1.dll +libglibmm_generate_extra_defs-2.4-1.dll +libgmodule-2.0-0.dll +libgnomecanvas-2-0.dll +libgnomecanvasmm-2.6-1.dll +libgnurx-0.dll +libgobject-2.0-0.dll +libgthread-2.0-0.dll +libgtkmm-2.4-1.dll +libgtk-win32-2.0-0.dll +libiconv-2.dll +iconv.dll +libFLAC-8.dll +libogg-0.dll +libvorbis-0.dll +libvorbisenc-2.dll +libffi-5.dll +libidn-11.dll +libintl-8.dll +libpango-1.0-0.dll +libpangocairo-1.0-0.dll +libpangoft2-1.0-0.dll +libpangomm-1.4-1.dll +libpangowin32-1.0-0.dll +libpixman-1-0.dll +libpng14-14.dll +libsamplerate-0.dll +libsigc-2.0-0.dll +libsndfile-1.dll +libssh2-1.dll +libssl-10.dll +libstdc++-6.dll +libxml2-2.dll +pthreadGC2.dll +zlib1.dll +' + +echo "Copying mingw shared libraries to $PACKAGE_DIR ..." + +for i in $DLLS; +do +cp $MINGW_ROOT/bin/$i $PACKAGE_DIR +done + +echo "Copying JACK server and drivers to $PACKAGE_DIR ..." + +cp $MINGW_ROOT/bin/jackd.exe $PACKAGE_DIR +cp -r $MINGW_ROOT/bin/jack $PACKAGE_DIR +cp $MINGW_ROOT/bin/libportaudio-2.dll $PACKAGE_DIR + +SRC_DIRS=' +libs/ardour +libs/pbd +libs/gtkmm2ext +libs/midi++2 +libs/evoral +libs/panners +libs/timecode +libs/audiographer +' + +if test x$DEBUG != x ; then + + PACKAGE_SRC_DIR=$PACKAGE_DIR/src + echo "Copying source files to $PACKAGE_SRC_DIR ..." + mkdir -p $PACKAGE_SRC_DIR/libs + cp -r $BASE/gtk2_ardour $PACKAGE_SRC_DIR + for i in $SRC_DIRS; + do + cp -r -p $BASE/$i $PACKAGE_SRC_DIR/libs + done + + echo "Copying JACK utility programs to $PACKAGE_DIR ..." + cp $MINGW_ROOT/bin/jack_*.exe $PACKAGE_DIR + + echo "Copying any debug files to $PACKAGE_DIR ..." + cp $MINGW_ROOT/bin/*.debug $PACKAGE_DIR + + echo "Copying gdb to $PACKAGE_DIR ..." + cp $MINGW_ROOT/bin/gdb.exe $PACKAGE_DIR + + echo "Copying .gdbinit to $PACKAGE_DIR ..." + cp $TOOLS_DIR/gdbinit $PACKAGE_DIR/.gdbinit + + echo "Copying Gtk demo to $PACKAGE_DIR ..." + cp $MINGW_ROOT/bin/gtk-demo.exe $PACKAGE_DIR +else + echo "Optimized build Stripping executable ..." + $STRIP $PACKAGE_DIR/ardour-3.0.exe + echo "Stripping libraries ..." + find $PACKAGE_DIR -type f -name "*.dll*" | xargs $STRIP +fi + +if [ "$1" == "--tarball" ]; then + echo "Creating tarball from $PACKAGE_DIR ..." + cd $BASE || exit 1 + tar -cvJf $PACKAGE_DIR.tar.xz $PACKAGE_DIR +fi + +if [ "$1" == "--zip" ]; then + echo "Creating zip file from $PACKAGE_DIR ..." + cd $BASE || exit 1 + zip -r $PACKAGE_DIR.zip $PACKAGE_DIR +fi diff --git a/tools/windows_packaging/pango.modules b/tools/windows_packaging/pango.modules new file mode 100644 index 0000000000..70d300bc10 --- /dev/null +++ b/tools/windows_packaging/pango.modules @@ -0,0 +1,35 @@ +# Pango Modules file +# Automatically generated file, do not edit +# +# ModulesPath = Z:\usr\i686-pc-mingw32\sys-root\mingw\lib\pango\1.6.0\modules +# +"lib\\pango\\1.6.0\\modules\\pango-thai-fc.dll" ThaiScriptEngineFc PangoEngineShape PangoRenderFc thai:* lao:* +"lib\\pango\\1.6.0\\modules\\pango-basic-win32.dll" BasicScriptEngineWin32 PangoEngineShape PangoRenderWin32 common: +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" devaScriptEngineFc PangoEngineShape PangoRenderFc devanagari:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" bengScriptEngineFc PangoEngineShape PangoRenderFc bengali:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" guruScriptEngineFc PangoEngineShape PangoRenderFc gurmukhi:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" gujrScriptEngineFc PangoEngineShape PangoRenderFc gujarati:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" oryaScriptEngineFc PangoEngineShape PangoRenderFc oriya:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" tamlScriptEngineFc PangoEngineShape PangoRenderFc tamil:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" teluScriptEngineFc PangoEngineShape PangoRenderFc telugu:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" kndaScriptEngineFc PangoEngineShape PangoRenderFc kannada:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" mlymScriptEngineFc PangoEngineShape PangoRenderFc malayalam:* +"lib\\pango\\1.6.0\\modules\\pango-indic-fc.dll" sinhScriptEngineFc PangoEngineShape PangoRenderFc sinhala:* +"lib\\pango\\1.6.0\\modules\\pango-syriac-fc.dll" SyriacScriptEngineFc PangoEngineShape PangoRenderFc syriac:* +"lib\\pango\\1.6.0\\modules\\pango-khmer-fc.dll" KhmerScriptEngineFc PangoEngineShape PangoRenderFc khmer:* +"lib\\pango\\1.6.0\\modules\\pango-arabic-lang.dll" ArabicScriptEngineLang PangoEngineLang PangoRenderNone arabic:* +"lib\\pango\\1.6.0\\modules\\pango-basic-fc.dll" BasicScriptEngineFc PangoEngineShape PangoRenderFc latin:* cyrillic:* greek:* armenian:* georgian:* runic:* ogham:* bopomofo:* cherokee:* coptic:* deseret:* ethiopic:* gothic:* han:* hiragana:* katakana:* old-italic:* canadian-aboriginal:* yi:* braille:* cypriot:* limbu:* osmanya:* shavian:* linear-b:* ugaritic:* glagolitic:* cuneiform:* phoenician:* common: +"lib\\pango\\1.6.0\\modules\\pango-arabic-fc.dll" ArabicScriptEngineFc PangoEngineShape PangoRenderFc arabic:* nko:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" devaIndicScriptEngineLang PangoEngineLang PangoRenderNone devanagari:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" bengIndicScriptEngineLang PangoEngineLang PangoRenderNone bengali:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" guruIndicScriptEngineLang PangoEngineLang PangoRenderNone gurmukhi:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" gujrIndicScriptEngineLang PangoEngineLang PangoRenderNone gujarati:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" oryaIndicScriptEngineLang PangoEngineLang PangoRenderNone oriya:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" tamlIndicScriptEngineLang PangoEngineLang PangoRenderNone tamil:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" teluIndicScriptEngineLang PangoEngineLang PangoRenderNone telugu:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" kndaIndicScriptEngineLang PangoEngineLang PangoRenderNone kannada:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" mlymIndicScriptEngineLang PangoEngineLang PangoRenderNone malayalam:* +"lib\\pango\\1.6.0\\modules\\pango-indic-lang.dll" sinhIndicScriptEngineLang PangoEngineLang PangoRenderNone sinhala:* +"lib\\pango\\1.6.0\\modules\\pango-hebrew-fc.dll" HebrewScriptEngineFc PangoEngineShape PangoRenderFc hebrew:* +"lib\\pango\\1.6.0\\modules\\pango-tibetan-fc.dll" TibetanScriptEngineFc PangoEngineShape PangoRenderFc tibetan:* +"lib\\pango\\1.6.0\\modules\\pango-hangul-fc.dll" HangulScriptEngineFc PangoEngineShape PangoRenderFc hangul:* diff --git a/tools/windows_packaging/print-env.sh b/tools/windows_packaging/print-env.sh new file mode 100644 index 0000000000..d6f63a2e5b --- /dev/null +++ b/tools/windows_packaging/print-env.sh @@ -0,0 +1,40 @@ +echo "Build Environment Settings...." +echo " " +echo " " +echo "HOST : $HOST" +echo "MINGW_ROOT : $MINGW_ROOT" +echo "PKG_CONFIG_PREFIX : $PKG_CONFIG_PREFIX" +echo "PKG_CONFIG_LIBDIR : $PKG_CONFIG_LIBDIR" +echo "PKGCONFIG : $PKGCONFIG" +echo "AR : $AR" +echo "RANLIB : $RANLIB" +echo "CC : $CC" +echo "CPP : $CPP" +echo "CXX : $CXX" +echo "AS : $AS" +echo "LINK_CC : $LINK_CC" +echo "LINK_CXX : $LINK_CXX" +echo "WINRC : $WINRC" +echo "STRIP : $STRIP" +echo " " +echo " " +echo "Path Environment Settings...." +echo " " +echo " " +echo "BASE : $BASE" +echo "BUILD_DIR : $BUILD_DIR" +echo "BUILD_CACHE_FILE : $BUILD_CACHE_FILE" +echo "TOOLS_DIR : $TOOLS_DIR" +echo "PACKAGE_DIR : $PACKAGE_DIR" +echo " " +echo " " +echo "Config Environment Settings...." +echo " " +echo " " +echo "APPNAME : $APPNAME" +echo "VERSION : $VERSION" +echo "DEBUG : $DEBUG" +echo "WITH_TESTS : $WITH_TESTS" +echo "ARDOUR_DATA_DIR : $ARDOUR_DATA_DIR" +echo " " +echo " " diff --git a/tools/windows_packaging/run-wine.sh b/tools/windows_packaging/run-wine.sh new file mode 100644 index 0000000000..86415206cc --- /dev/null +++ b/tools/windows_packaging/run-wine.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +. ./mingw-env.sh + +cd $BASE + +LIBS=$BUILD_DIR/libs + +export ARDOUR_PATH=$BASE/gtk2_ardour/icons:$BASE/gtk2_ardour/pixmaps:$BASE/build/default/gtk2_ardour:$BASE/gtk2_ardour:. +export ARDOUR_SURFACES_PATH=$LIBS/surfaces/osc:$LIBS/surfaces/generic_midi:$LIBS/surfaces/tranzport:$LIBS/surfaces/powermate:$LIBS/surfaces/mackie +export ARDOUR_PANNER_PATH=$LIBS/panners/2in2out:$LIBS/panners/1in2out:$LIBS/panners/vbap +export ARDOUR_DATA_PATH=$BASE/gtk2_ardour:build/default/gtk2_ardour:. + +export VAMP_PATH=$LIBS/vamp-plugins${VAMP_PATH:+:$VAMP_PATH} + +export PBD_TEST_PATH=$BASE/libs/pbd/test/ + +if test ! -d $PACKAGE_DIR; then + echo "Win32 package directory does not exist" + exit 1 +fi + +cd $PACKAGE_DIR + + +if [ "$1" == "--run-tests" ]; then + if test x$WITH_TESTS != x ; then + echo "<<<<<<<<<<<<<<<<<< RUNNING LIBPBD TESTS >>>>>>>>>>>>>>>>>>>" + wine pbd-run-tests.exe + echo "<<<<<<<<<<<<<<<<<< RUNNING EVORAL TESTS >>>>>>>>>>>>>>>>>>>" + wine evoral-run-tests.exe + echo "<<<<<<<<<<<<<<<<<< RUNNING ARDOUR TESTS >>>>>>>>>>>>>>>>>>>" + wine ardour-run-tests.exe + else + echo "No tests to run ..." + fi +else + wine ardour-3.0.exe +fi diff --git a/tools/windows_packaging/startvm.sh b/tools/windows_packaging/startvm.sh new file mode 100644 index 0000000000..6d36bd8cb7 --- /dev/null +++ b/tools/windows_packaging/startvm.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +qemu-kvm -smp 2 -m 1536 -hda $HOME/virt-images/winxp.raw -net nic -net user -vga std -soundhw all diff --git a/tools/windows_packaging/waf.sh b/tools/windows_packaging/waf.sh new file mode 100644 index 0000000000..5b581ba85e --- /dev/null +++ b/tools/windows_packaging/waf.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +. ./mingw-env.sh + +cd $BASE || exit 1 +./waf "$@" |