fixed OpenBoard importer launcher

preferencesAboutTextFull
Claudio Valerio 11 years ago
parent ff493f807b
commit ea04796e94
  1. 19
      release.macx.sh
  2. 9
      src/core/UBOpenSankoreImporter.cpp

@ -80,6 +80,22 @@ done
}
function addImporter {
importerDir="`pwd`/../OpenSankoreToOpenBoard"
importerName="OpenBoardImporter"
if [ ! -e ${importerDir} ]; then
abort "${importerDir} not found"
fi
cd ${importerDir}
$QMAKE ${importerName}.pro
make -j4
$MACDEPLOYQT ${importerName}.app
cd -
}
trap "defaults write org.oe-f.OpenBoard.release Running -bool NO" EXIT
notify "Running OpenBoard release script (`date`)"
@ -101,6 +117,8 @@ checkExecutable "$PLISTBUDDY"
checkExecutable "$ICEBERG"
checkExecutable "$LRELEASE"
addImporter
# delete the build directory
notify "Cleaning ..."
rm -rf "$BUILD_DIR"
@ -125,6 +143,7 @@ $LRELEASE $BASE_QT_TRANSLATIONS_DIRECTORY/translations.pro
addQtTranslations
cp -R resources/customizations $PRODUCT_DIR/$APPLICATION_NAME.app/Contents/Resources
cp -R $importerDir/$importerName.app $PRODUCT_DIR/$APPLICATION_NAME.app/Contents/Resources
VERSION=`cat "$BUILD_DIR/version"`
if [ ! -f "$BUILD_DIR/version" ]; then

@ -33,12 +33,19 @@ UBOpenSankoreImporter::UBOpenSankoreImporter(QObject *parent) :
QObject(parent)
{
if(UBSettings::settings()->appLookForOpenSankoreInstall->get().toBool() &&
QDir(UBSettings::userDataDirectory().replace(qApp->applicationName(),"Sankore")).exists())
QDir(UBSettings::userDataDirectory().replace(qApp->applicationName(),"Sankore")).exists()){
if(UBApplication::mainWindow->yesNoQuestion(tr("Open-Sankoré data detected"),tr("Open-Sankoré directory is present on the disk. It's possible to import the Open-Sankoré documents into OpenBoard as the preferences. Pushing Ok will close OpenBoard and run the importer application."))){
QProcess newProcess;
#ifdef Q_WS_X11
newProcess.startDetached(qApp->applicationDirPath()+"/Importer/OpenBoardImporter");
#elif defined Q_WS_MACX
newProcess.startDetached(qApp->applicationDirPath()+"/../Resources/OpenBoardImporter.app/Contents/MacOS/OpenBoardImporter");
#else
newProcess.startDetached(qApp->applicationDirPath()+"/Importer/OpenBoardImporter.exe");
#endif
qApp->exit(0);
}
}
}

Loading…
Cancel
Save