Browse Source

updated packageing

tags/1.3
Sven Oliver Moll 1 year ago
parent
commit
f6d1950ffb

+ 24
- 0
README.md View File

@@ -11,3 +11,27 @@ Originally developed for creating Atari 2600 VCS demos, it was extended be
usable for other systems as well. Templates include also the VIC-20 and the
C64.

Packaging
---------
Packaging is rather forward

1) Debian, Ubuntu, etc.

Packages for Debian, Ubuntu and alike can be build using the
`dpkg-buildpackage` tool.

2) OpenSuSE, Red-Hat, etc.

Not supported yet. If someone provides mit with a proper build spec file,
I'm including it.

3) Windows

Windows is cross-build usine the [mxe](http://mxe.cc) toolchain installed at
`/opt/mxe`. Parameters are at the top of the build shell script.

4) Mac OS X

This used to be build on an old 10.6 machine, the only Mac OS X system I've
got access to.


+ 3
- 6
packaging/macosx/build-app.sh View File

@@ -7,7 +7,7 @@ QTDIR=/usr/local/Trolltech/Qt-4.7.0
export PATH=${PATH}:${QTDIR}/bin

PACKAGINGDIR=../../build/package
BUILDAPP=../../build/release/bin/fridgegrid.app
BUILDAPP=../../build-release/bin/fridgegrid.app
DEPLOYAPP=${PACKAGINGDIR}/fridgegrid.app
PLUGINDIR=Contents/PlugIns

@@ -15,16 +15,13 @@ if [ -d "${DEPLOYAPP}" ]; then
rm -rf "${DEPLOYAPP}"
fi

(cd ../..
# rm -rf build
# qmake -r CONFIG+=release
make release)
make -C ../.. release

mkdir -p "$(dirname ${DEPLOYAPP})"
cp -a "${BUILDAPP}" "${DEPLOYAPP}"

mkdir -p "${DEPLOYAPP}/${PLUGINDIR}"
for plugin in ../../build/release/lib/*.dylib; do
for plugin in ../../build-release/lib/*.dylib; do
if [ -f ${plugin} ]; then
echo "${plugin}"
cp "${plugin}" "${DEPLOYAPP}/${PLUGINDIR}"

+ 2
- 2
packaging/source/build.sh View File

@@ -6,6 +6,6 @@ cd "$(dirname $0)"
cd ../../..

find fridgegrid/LICENSE.GPL fridgegrid/Makefile fridgegrid/packaging fridgegrid/src -type f |
grep -v -e 'src/.*Makefile' -e '\.pro\.user$' -e '\.gitignore' |
xargs tar zcvf fridgegrid.tar.gz
grep -v -e 'src/.*Makefile' -e '\.pro\.user$' -e '\.gitignore' |
xargs tar zcvf fridgegrid.tar.gz
advdef -z4 fridgegrid.tar.gz || true

+ 26
- 5
packaging/windows/build-cross.sh View File

@@ -1,20 +1,37 @@
#!/bin/sh

MINGW=/opt/mxe
PLATFORM=i686-w64-mingw32.static
MINGW="/opt/mxe"
PLATFORM="i686-w64-mingw32.static"

PACKAGINGDIR=../../build/packaging
BUILDDIR="../../build-release"
PACKAGINGDIR="${BUILDDIR}/packaging"

if [ ! -x "${MINGW}/usr/bin/${PLATFORM}-qmake-qt5" ]; then
cat <<EOF
For building, an mxe is needed with qt5 enabled, but I could not find
${MINGW}/usr/bin/${PLATFORM}-qmake-qt5

Either you don't have mxe at all, this script is not configured to use it.
Take a look at the top of
$(readlink -f "${0}")
EOF
exit 1
fi

set -ex

export PATH=${PATH}:${MINGW}/usr/bin

cd "$(dirname $0)"
cd "$(dirname "${0}")"

# obtain version from debian changelog
version="$(head -1 ../debian/changelog | sed 's/.*(\([^)]*\)).*/\1/')"

MAKEFLAGS=-j4 make -C ../.. release QMAKE=${PLATFORM}-qmake-qt5

mkdir -p ${PACKAGINGDIR}

for i in ../../build-release/bin/* ../../build-release/lib/*.dll; do
for i in ${BUILDDIR}/bin/* ${BUILDDIR}/lib/*.dll; do
if [ -f "${i}" ]; then
INSTALLFILES="${INSTALLFILES} ${i}"
fi
@@ -31,4 +48,8 @@ for i in ${INSTALLFILES} ${QTLIBS};do
done

${PLATFORM}-makensis fridgegrid-cross.nsi
outfile="$(grep OutFile fridgegrid-cross.nsi|cut -f2 -d\"|tr '\\' '/')"
relfile="$(echo ${outfile}|sed "s/-installer/-${version}-installer/")"

mv -v "${outfile}" "${relfile}"


+ 2
- 2
packaging/windows/fridgegrid-cross.nsi View File

@@ -52,7 +52,7 @@ Section "fridgegrid (required)"
SetOutPath $INSTDIR
; Put file there
!include ..\..\build\packaging\files-install.nsh
!include ..\..\build-release\packaging\files-install.nsh
; Write the installation path into the registry
WriteRegStr HKLM SOFTWARE\fridgegrid "Install_Dir" "$INSTDIR"
@@ -86,7 +86,7 @@ Section "Uninstall"
DeleteRegKey HKLM SOFTWARE\fridgegrid
; Remove files and uninstaller
!include ..\..\build\packaging\files-delete.nsh
!include ..\..\build-release\packaging\files-delete.nsh
Delete $INSTDIR\uninstall.exe
; Remove shortcuts, if any

+ 28
- 0
src/qmake/buildconfig.pri View File

@@ -0,0 +1,28 @@
#############################################################################
# src/buildconfig.pri
# hand hacked by SvOlli
# released as public domain
#############################################################################

contains( TEMPLATE, app ) {
is_test = $$find( OUT_PWD, "/tests/" )
count( is_test, 1 ) {
DESTDIR = $${TESTDIR}
} else {
DESTDIR = $${BINDIR}
}
} else {
contains( CONFIG, plugin ) {
DESTDIR = $${DLLDIR}
} else {
DESTDIR = $${LIBDIR}
}
}

contains( QMAKE_CXX, g++ ) {
QMAKE_CXXFLAGS_DEBUG += -pedantic -Wall -Wno-long-long
QMAKE_CXXFLAGS_RELEASE += -ffunction-sections -fdata-sections
!macx {
QMAKE_LFLAGS_RELEASE += -Wl,--gc-sections -rdynamic
}
}

Loading…
Cancel
Save