ryxeo-webphotoalbum-git / macos / build.sh @ 3d5b9a0b
Historique | Voir | Annoter | Télécharger (1,53 ko)
1 |
#!/bin/bash |
---|---|
2 |
#script de creation de l'image pour OSX |
3 |
#Eric Seigne 2011 <eric.seigne@ryxeo.com> |
4 |
#documentation https://redmine.ryxeo.com/projects/ryxeo/wiki/Cr%C3%A9er_un_paquet_avec_OSX |
5 |
APPNAME="ryxeo-webphotoalbum" |
6 |
APPVERSION="0.9.9" |
7 |
VOLNAME="RyXeo - Web Photo Album ${APPVERSION}" |
8 |
VOLICON="macos/icones/ryxeo-webphotoalbum.icns" |
9 |
|
10 |
#On stoppe dès qu'on rencontre un problème |
11 |
set -e |
12 |
|
13 |
if [ -d /tmp/build-dmg ]; then |
14 |
echo "Erreur: répertoire temporaire de build existant, merci de supprimer /tmp/build-dmg" |
15 |
echo "et relancez ce script ensuite ..." |
16 |
fi |
17 |
#on fabrique une arborescence "dmg" temporaire |
18 |
mkdir /tmp/build-dmg |
19 |
|
20 |
#on cherche ou on se trouve et on change de repertoire le cas echeant |
21 |
if [ -f ../${APPNAME}.pro ]; then |
22 |
cd .. |
23 |
fi |
24 |
|
25 |
#qmake |
26 |
qmake ${APPNAME}.pro -r -spec macx-g++ CONFIG+=release |
27 |
|
28 |
#compilation |
29 |
make -w -j4 |
30 |
|
31 |
#on utilise les outils de Qt pour trimbaler le Qt framework et les dependances Qt |
32 |
macdeployqt ${APPNAME}.app |
33 |
|
34 |
#copie des petites choses indispensables ... |
35 |
#cp -a ${APPNAME}.app /tmp/build-dmg/ |
36 |
#cp -a MacOS/.DS_Store /tmp/build-dmg/ |
37 |
#cp -a MacOS/.background /tmp/build-dmg/ |
38 |
#cp -a MacOS/Applications /tmp/build-dmg/ |
39 |
|
40 |
#copie des donnees |
41 |
cp -a data ${APPNAME}.app/Contents/Resources/ |
42 |
|
43 |
#creation du fichier dmg |
44 |
#hdiutil create ${APPNAME}-${APPVERSION}.dmg -srcfolder /tmp/build-dmg -format UDZO -volname ${APPNAME} |
45 |
~/create-dmg/create-dmg --window-size 415 295 --volname "${VOLNAME}" --volicon ${VOLICON} --background "macos/.background/background.png" ~/Desktop/${APPNAME}-${APPVERSION}-osx.dmg ${APPNAME}.app |
46 |
|
47 |
#nettoyage |
48 |
rm -rf /tmp/build-dmg |