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; currentComicDB.id = comicId;
YACReaderLocalClient client; YACReaderLocalClient client;
/*int tries = 0; int tries = 1;
bool success = false; bool success = false;
while(!(success = client.requestComicInfo(libraryId,currentComicDB,siblingComics)) && tries < 3) while(!(success = client.requestComicInfo(libraryId,currentComicDB,siblingComics)) && tries != 0)
{ tries--;
tries++;
}*/ if(success)
if(client.requestComicInfo(libraryId,currentComicDB,siblingComics))
{ {
isClient = true; isClient = true;
open(pathFile+currentComicDB.path,currentComicDB,siblingComics); open(pathFile+currentComicDB.path,currentComicDB,siblingComics);
@ -1114,7 +1113,9 @@ void MainWindowViewer::sendComic()
YACReaderLocalClient * client = new YACReaderLocalClient; YACReaderLocalClient * client = new YACReaderLocalClient;
currentComicDB.info.hasBeenOpened = true; currentComicDB.info.hasBeenOpened = true;
viewer->updateComic(currentComicDB); 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())); connect(client,SIGNAL(finished()),client,SLOT(deleteLater()));
//delete client; //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 *.app
rm -R YACReader-* rm -R YACReader-*
rm -R *.dmg
cd YACReader cd YACReader
make clean make clean
rm -R YACReader.app rm -R YACReader.app

View File

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

View File

@ -5,13 +5,13 @@ fi
echo "Compiling YACReader" echo "Compiling YACReader"
cd ./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 make
cd .. cd ..
echo "Compiling YACReaderLibrary" echo "Compiling YACReaderLibrary"
cd ./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 make
cd .. cd ..
@ -22,8 +22,8 @@ cp -R ./YACReaderLibrary/YACReaderLibrary.app ./YACReaderLibrary.app
./releaseOSX.sh ./releaseOSX.sh
cp -R ./PlugInsYACReader ./YACReader.app/Contents/PlugIns #cp -R ./PlugInsYACReader ./YACReader.app/Contents/PlugIns
cp -R ./PlugInsLibrary ./YACReaderLibrary.app/Contents/PlugIns #cp -R ./PlugInsLibrary ./YACReaderLibrary.app/Contents/PlugIns
echo "Copying to destination folder" echo "Copying to destination folder"
dest='YACReader-'$1' MacOSX-Intel' dest='YACReader-'$1' MacOSX-Intel'
@ -33,11 +33,13 @@ cp -R ./YACReaderLibrary.app "./${dest}/YACReaderLibrary.app"
cp ./COPYING.txt "./${dest}/" cp ./COPYING.txt "./${dest}/"
cp ./README.txt "./${dest}/" cp ./README.txt "./${dest}/"
cp ./images/db.png "./${dest}/" mkdir "./${dest}/icons/"
cp ./images/coversPackage.png "./${dest}/" cp ./images/db.png "./${dest}/icons/"
cp ./images/coversPackage.png "./${dest}/icons/"
echo "Creating dmg package" echo "Creating dmg package"
#tar -czf "${dest}".tar.gz "${dest}" #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!" echo "Done!"

BIN
icon.icns Executable file

Binary file not shown.

View File

@ -1,12 +1,14 @@
#!/bin/bash #!/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 ./YACReader.app/Contents/MacOS/
cp -R ./utils ./YACReaderLibrary.app/Contents/MacOS/ cp -R ./utils ./YACReaderLibrary.app/Contents/MacOS/
cp -R ./release/server ./YACReaderLibrary.app/Contents/MacOS/ cp -R ./release/server ./YACReaderLibrary.app/Contents/MacOS/
cp -R ./release/languages ./YACReader.app/Contents/MacOS/ cp -R ./release/languages ./YACReader.app/Contents/MacOS/
cp -R ./release/languages ./YACReaderLibrary.app/Contents/MacOS/ cp -R ./release/languages ./YACReaderLibrary.app/Contents/MacOS/
cd ./YACReaderLibrary.app/Contents/MacOS/ #cd ./YACReaderLibrary.app/Contents/MacOS/
touch YACReaderLibrary.ini #touch YACReaderLibrary.ini
ln -s ../../../YACReader.app/Contents/MacOS/YACReader #ln -s ../../../YACReader.app/Contents/MacOS/YACReader