new packaging process for MacOSX (create-dmg is needed https://github.com/andreyvit/yoursway-create-dmg)

fixed settings path in MacOSX
This commit is contained in:
Luis Ángel San Martín
2013-12-03 02:02:32 +01:00
parent fc933b3747
commit 2514f96942
7 changed files with 26 additions and 20 deletions

View File

@ -219,13 +219,12 @@ void MainWindowViewer::openFromArgv()
currentComicDB.id = comicId;
YACReaderLocalClient client;
/*int tries = 0;
int tries = 1;
bool success = false;
while(!(success = client.requestComicInfo(libraryId,currentComicDB,siblingComics)) && tries < 3)
{
tries++;
}*/
if(client.requestComicInfo(libraryId,currentComicDB,siblingComics))
while(!(success = client.requestComicInfo(libraryId,currentComicDB,siblingComics)) && tries != 0)
tries--;
if(success)
{
isClient = true;
open(pathFile+currentComicDB.path,currentComicDB,siblingComics);
@ -1114,7 +1113,9 @@ void MainWindowViewer::sendComic()
YACReaderLocalClient * client = new YACReaderLocalClient;
currentComicDB.info.hasBeenOpened = true;
viewer->updateComic(currentComicDB);
client->sendComicInfo(libraryId,currentComicDB);
int retries = 1;
while(!client->sendComicInfo(libraryId,currentComicDB) && retries!=0)
retries--;
connect(client,SIGNAL(finished()),client,SLOT(deleteLater()));
//delete client;
}

BIN
background.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

@ -2,6 +2,7 @@
rm -R *.app
rm -R YACReader-*
rm -R *.dmg
cd YACReader
make clean
rm -R YACReader.app

View File

@ -5,7 +5,7 @@ using namespace YACReader;
QString YACReader::getSettingsPath()
{
#if QT_VERSION >= 0x050000
return QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
return QStandardPaths::writableLocation(QStandardPaths::DataLocation);
#else
return QDesktopServices::storageLocation(QDesktopServices::DataLocation);
#endif

View File

@ -5,13 +5,13 @@ fi
echo "Compiling YACReader"
cd ./YACReader
qmake -spec macx-g++ "CONFIG+=release"
/Developer/Qt5.1.1/5.1.1/clang_64/bin/qmake -spec macx-clang "CONFIG+=release"
make
cd ..
echo "Compiling YACReaderLibrary"
cd ./YACReaderLibrary
qmake -spec macx-g++ "CONFIG+=release"
/Developer/Qt5.1.1/5.1.1/clang_64/bin/qmake -spec macx-clang "CONFIG+=release"
make
cd ..
@ -22,8 +22,8 @@ cp -R ./YACReaderLibrary/YACReaderLibrary.app ./YACReaderLibrary.app
./releaseOSX.sh
cp -R ./PlugInsYACReader ./YACReader.app/Contents/PlugIns
cp -R ./PlugInsLibrary ./YACReaderLibrary.app/Contents/PlugIns
#cp -R ./PlugInsYACReader ./YACReader.app/Contents/PlugIns
#cp -R ./PlugInsLibrary ./YACReaderLibrary.app/Contents/PlugIns
echo "Copying to destination folder"
dest='YACReader-'$1' MacOSX-Intel'
@ -33,11 +33,13 @@ cp -R ./YACReaderLibrary.app "./${dest}/YACReaderLibrary.app"
cp ./COPYING.txt "./${dest}/"
cp ./README.txt "./${dest}/"
cp ./images/db.png "./${dest}/"
cp ./images/coversPackage.png "./${dest}/"
mkdir "./${dest}/icons/"
cp ./images/db.png "./${dest}/icons/"
cp ./images/coversPackage.png "./${dest}/icons/"
echo "Creating dmg package"
#tar -czf "${dest}".tar.gz "${dest}"
hdiutil create "${dest}".dmg -srcfolder "./${dest}" -ov
#hdiutil create "${dest}".dmg -srcfolder "./${dest}" -ov
./create-dmg --volname 'YACReader '$1' Installer' --volicon icon.icns --window-size 600 403 --icon-size 128 --app-drop-link 485 90 --background background.png --icon YACReader 80 90 --icon YACReaderLibrary 235 90 --eula COPYING.txt --icon icons 470 295 --icon README.txt 120 295 --icon COPYING.txt 290 295 "./${dest}.dmg" "./${dest}"
echo "Done!"

BIN
icon.icns Executable file

Binary file not shown.

View File

@ -1,12 +1,14 @@
#!/bin/bash
macdeployqt YACReader.app
macdeployqt YACReaderLibrary.app
/Developer/Qt5.1.1/5.1.1/clang_64/bin/macdeployqt YACReader.app
/Developer/Qt5.1.1/5.1.1/clang_64/bin/macdeployqt YACReaderLibrary.app
cp -R ./utils ./YACReader.app/Contents/MacOS/
cp -R ./utils ./YACReaderLibrary.app/Contents/MacOS/
cp -R ./release/server ./YACReaderLibrary.app/Contents/MacOS/
cp -R ./release/languages ./YACReader.app/Contents/MacOS/
cp -R ./release/languages ./YACReaderLibrary.app/Contents/MacOS/
cd ./YACReaderLibrary.app/Contents/MacOS/
touch YACReaderLibrary.ini
ln -s ../../../YACReader.app/Contents/MacOS/YACReader
#cd ./YACReaderLibrary.app/Contents/MacOS/
#touch YACReaderLibrary.ini
#ln -s ../../../YACReader.app/Contents/MacOS/YACReader