Commit 907c0848 authored by Claudio Valerio's avatar Claudio Valerio

first try on linux after changing name

parent f47733ee
......@@ -19,7 +19,7 @@ DefaultGroupName=Open-Sankor
OutputDir=.\install\win32\
OutputBaseFilename=Open-Sankore
SetupIconFile=.\resources\win\uniboard.ico
SetupIconFile=.\resources\win\OpenBoard.ico
Compression=lzma
SolidCompression=yes
......
This diff is collapsed.
......@@ -30,6 +30,7 @@ checkUser()
initializeVariables()
{
APPLICATION_NAME="OpenBoard"
MAKE_TAG=true
CREATE_DIENA_DISTRIBUTION_ZIP=false
STANDARD_QT_USED=false
......@@ -78,15 +79,15 @@ alertIfPreviousVersionInstalled(){
if [ ! -e "$APT_CACHE" ]; then
notifyError "apt-cache command not found"
else
SEARCH_RESULT=`$APT_CACHE search open-sankore`
if [ `echo $SEARCH_RESULT | grep -c open-sankore` -ge 1 ]; then
notifyError "Found a previous version of Open-Sankore. Remove it to avoid to put it as dependency"
SEARCH_RESULT=`$APT_CACHE search $APPLICATION_NAME`
if [ `echo $SEARCH_RESULT | grep -c $APPLICATION_NAME` -ge 1 ]; then
notifyError "Found a previous version of $APPLICATION_NAME. Remove it to avoid to put it as dependency"
fi
fi
}
checkDir(){
if [ ! -d "$1" ]; then
if [ ! -d "$1" ]; then
notifyError "Directory not found : $1"
fi
}
......@@ -160,23 +161,23 @@ rm -rf "build/linux/release"
rm -rf install
notifyProgress "QT" "Internalization"
$LRELEASES Sankore_3.1.pro
$LRELEASES $APPLICATION_NAME.pro
cd $GUI_TRANSLATIONS_DIRECTORY_PATH
$LRELEASES translations.pro
cd -
notifyProgress "Open-Sankore" "Building Open-Sankore"
notifyProgress "$APPLICATION_NAME" "Building $APPLICATION_NAME"
if [ "$ARCHITECTURE" == "amd64" ]; then
$QMAKE_PATH Sankore_3.1.pro -spec linux-g++-64
$QMAKE_PATH $APPLICATION_NAME.pro -spec linux-g++-64
else
$QMAKE_PATH Sankore_3.1.pro -spec linux-g++
$QMAKE_PATH $APPLICATION_NAME.pro -spec linux-g++
fi
make -j 4 release-install
if [ ! -e "$PRODUCT_PATH/Open-Sankore" ]; then
notifyError "Open-Sankore build failed"
if [ ! -e "$PRODUCT_PATH/$APPLICATION_NAME" ]; then
notifyError "$APPLICATION_NAME build failed"
fi
notifyProgress "Git Hub" "Make a tag of the delivered version"
......@@ -236,7 +237,7 @@ cd $PRODUCT_PATH
find . -name .svn -exec rm -rf {} \; 2> /dev/null
cd -
notifyProgress "Building Sankore" "Finished to build Sankore building the package"
notifyProgress "Building $APPLICATION_NAME" "Finished to build $APPLICATION_NAME building the package"
BASE_WORKING_DIR="packageBuildDir"
......@@ -264,7 +265,7 @@ cat > "$BASE_WORKING_DIR/DEBIAN/prerm" << EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
xdg-desktop-menu uninstall /usr/share/applications/Open-Sankore.desktop
xdg-desktop-menu uninstall /usr/share/applications/$APPLICATION_NAME.desktop
exit 0
#DEBHELPER#
EOF
......@@ -286,19 +287,19 @@ cat > "$BASE_WORKING_DIR/DEBIAN/postint" << EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
xdg-desktop-menu install --novendor /usr/share/applications/Open-Sankore.desktop
xdg-desktop-menu install --novendor /usr/share/applications/$APPLICATION_NAME.desktop
exit 0
#DEBHELPER#
EOF
SANKORE_DIRECTORY_NAME="Open-Sankore-$VERSION"
SANKORE_PACKAGE_DIRECTORY="$BASE_WORKING_DIR/usr/local/$SANKORE_DIRECTORY_NAME"
#move sankore build directory to packages directory
cp -R $PRODUCT_PATH $SANKORE_PACKAGE_DIRECTORY
APPLICATION_DIRECTORY_NAME="$APPLICATION_NAME-$VERSION"
PACKAGE_DIRECTORY="$BASE_WORKING_DIR/usr/local/$APPLICATION_DIRECTORY_NAME"
#move build directory to packages directory
cp -R $PRODUCT_PATH $PACKAGE_DIRECTORY
cat > $BASE_WORKING_DIR/usr/local/$SANKORE_DIRECTORY_NAME/run.sh << EOF
cat > $BASE_WORKING_DIR/usr/local/$APPLICATION_DIRECTORY_NAME/run.sh << EOF
#!/bin/bash
# --------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify
......@@ -315,34 +316,34 @@ cat > $BASE_WORKING_DIR/usr/local/$SANKORE_DIRECTORY_NAME/run.sh << EOF
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ---------------------------------------------------------------------
env LD_LIBRARY_PATH=/usr/local/$SANKORE_DIRECTORY_NAME/qtlib:$LD_LIBRARY_PATH /usr/local/$SANKORE_DIRECTORY_NAME/Open-Sankore
env LD_LIBRARY_PATH=/usr/local/$APPLICATION_DIRECTORY_NAME/qtlib:$LD_LIBRARY_PATH /usr/local/$APPLICATION_DIRECTORY_NAME/$APPLICATION_NAME
EOF
CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-sankore-$VERSION.txt"
CHANGE_LOG_FILE="$BASE_WORKING_DIR/DEBIAN/changelog-$APPLICATION_NAME-$VERSION.txt"
CONTROL_FILE="$BASE_WORKING_DIR/DEBIAN/control"
CHANGE_LOG_TEXT="changelog.txt"
echo "Open-Sankore ($VERSION) $ARCHITECTURE; urgency=low" > "$CHANGE_LOG_FILE"
echo "$APPLICATION_NAME ($VERSION) $ARCHITECTURE; urgency=low" > "$CHANGE_LOG_FILE"
echo >> "$CHANGE_LOG_FILE"
cat $CHANGE_LOG_TEXT >> "$CHANGE_LOG_FILE"
echo >> "$CHANGE_LOG_FILE"
echo "-- Claudio Valerio <claudio@open-sankore.org> `date`" >> "$CHANGE_LOG_FILE"
echo "-- Claudio Valerio <claudio.valerio@oe-f.org> `date`" >> "$CHANGE_LOG_FILE"
echo "Package: open-sankore" > "$CONTROL_FILE"
echo "Package: $APPLICATION_NAME" > "$CONTROL_FILE"
echo "Version: $VERSION" >> "$CONTROL_FILE"
echo "Section: education" >> "$CONTROL_FILE"
echo "Priority: optional" >> "$CONTROL_FILE"
echo "Architecture: $ARCHITECTURE" >> "$CONTROL_FILE"
echo "Essential: no" >> "$CONTROL_FILE"
echo "Installed-Size: `du -s $SANKORE_PACKAGE_DIRECTORY | awk '{ print $1 }'`" >> "$CONTROL_FILE"
echo "Maintainer: Open-Sankoré Developers team <dev@open-sankore.org>" >> "$CONTROL_FILE"
echo "Homepage: http://dev.open-sankore.org" >> "$CONTROL_FILE"
echo "Installed-Size: `du -s $PACKAGE_DIRECTORY | awk '{ print $1 }'`" >> "$CONTROL_FILE"
echo "Maintainer: $APPLICATION_NAME Developers team <dev@oe-f.org>" >> "$CONTROL_FILE"
echo "Homepage: http://oe-f.org" >> "$CONTROL_FILE"
echo -n "Depends: " >> "$CONTROL_FILE"
unset tab
declare -a tab
let count=0
for l in `objdump -p $SANKORE_PACKAGE_DIRECTORY/Open-Sankore | grep NEEDED | awk '{ print $2 }'`; do
for l in `objdump -p $PACKAGE_DIRECTORY/$APPLICATION_NAME | grep NEEDED | awk '{ print $2 }'`; do
for lib in `dpkg -S $l | awk -F":" '{ print $1 }'`; do
#echo $lib
presence=`echo ${tab[*]} | grep -c "$lib"`;
......@@ -363,27 +364,26 @@ echo "" >> "$CONTROL_FILE"
echo "Description: This a interactive white board that uses a free standard format." >> "$CONTROL_FILE"
find $BASE_WORKING_DIR/usr/ -exec md5sum {} > $BASE_WORKING_DIR/DEBIAN/md5sums 2>/dev/null \;
SANKORE_SHORTCUT="$BASE_WORKING_DIR/usr/share/applications/Open-Sankore.desktop"
echo "[Desktop Entry]" > $SANKORE_SHORTCUT
echo "Version=$VERSION" >> $SANKORE_SHORTCUT
echo "Encoding=UTF-8" >> $SANKORE_SHORTCUT
echo "Name=Open-Sankore ($VERSION)" >> $SANKORE_SHORTCUT
echo "GenericName=Open-Sankore" >> $SANKORE_SHORTCUT
echo "Comment=Logiciel de création de présentations pour tableau numérique interactif (TNI)" >> $SANKORE_SHORTCUT
echo "Exec=/usr/local/$SANKORE_DIRECTORY_NAME/run.sh" >> $SANKORE_SHORTCUT
echo "Icon=/usr/local/$SANKORE_DIRECTORY_NAME/sankore.png" >> $SANKORE_SHORTCUT
echo "StartupNotify=true" >> $SANKORE_SHORTCUT
echo "Terminal=false" >> $SANKORE_SHORTCUT
echo "Type=Application" >> $SANKORE_SHORTCUT
echo "Categories=Education" >> $SANKORE_SHORTCUT
echo "Name[fr_FR]=Open-Sankore ($VERSION)" >> $SANKORE_SHORTCUT
cp "resources/images/uniboard.png" "$SANKORE_PACKAGE_DIRECTORY/sankore.png"
APPLICATION_SHORTCUT="$BASE_WORKING_DIR/usr/share/applications/$APPLICATION_NAME.desktop"
echo "[Desktop Entry]" > $APPLICATION_SHORTCUT
echo "Version=$VERSION" >> $APPLICATION_SHORTCUT
echo "Encoding=UTF-8" >> $APPLICATION_SHORTCUT
echo "Name=$APPLICATION_NAME ($VERSION)" >> $APPLICATION_SHORTCUT
echo "GenericName=$APPLICATION_NAME" >> $APPLICATION_SHORTCUT
echo "Comment=Logiciel de création de présentations pour tableau numérique interactif (TNI)" >> $APPLICATION_SHORTCUT
echo "Exec=/usr/local/$APPLICATION_DIRECTORY_NAME/run.sh" >> $APPLICATION_SHORTCUT
echo "Icon=/usr/local/$APPLICATION_DIRECTORY_NAME/$APPLICATION_NAME.png" >> $APPLICATION_SHORTCUT
echo "StartupNotify=true" >> $APPLICATION_SHORTCUT
echo "Terminal=false" >> $APPLICATION_SHORTCUT
echo "Type=Application" >> $APPLICATION_SHORTCUT
echo "Categories=Education" >> $APPLICATION_SHORTCUT
cp "resources/images/OpenBoard.png" "$PACKAGE_DIRECTORY/$APPLICATION_NAME.png"
chmod 755 "$BASE_WORKING_DIR/DEBIAN"
chmod 755 "$BASE_WORKING_DIR/DEBIAN/prerm"
chmod 755 "$BASE_WORKING_DIR/DEBIAN/postint"
mkdir -p "install/linux"
DEBIAN_PACKAGE_NAME="Open-Sankore_${VERSION}_$ARCHITECTURE.deb"
DEBIAN_PACKAGE_NAME="$APPLICATION_NAME_${VERSION}_$ARCHITECTURE.deb"
chown -R root:root $BASE_WORKING_DIR
dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME"
......@@ -391,16 +391,16 @@ dpkg -b "$BASE_WORKING_DIR" "install/linux/$DEBIAN_PACKAGE_NAME"
#clean up mess
rm -rf $BASE_WORKING_DIR
notifyProgress "Open-Sankore" "Package built"
notifyProgress "$APPLICATION_NAME" "Package built"
if [ $CREATE_DIENA_DISTRIBUTION_ZIP == true ]; then
ZIP_NAME="Open-Sankoré_`lsb_release -is`_`lsb_release -rs`_${VERSION}_${ARCHITECTURE}.zip"
ZIP_NAME="$APPLICATION_NAME_`lsb_release -is`_`lsb_release -rs`_${VERSION}_${ARCHITECTURE}.zip"
cd install/linux
$ZIP_PATH -1 --junk-paths ${ZIP_NAME} ${DEBIAN_PACKAGE_NAME} ../../ReleaseNotes.pdf ../../JournalDesModifications.pdf
cd -
notifyProgress "Open-Sankore" "Build Diena zip file for distribution"
notifyProgress "$APPLICATION_NAME" "Build Diena zip file for distribution"
fi
exit 0
......@@ -15,6 +15,7 @@
# ---------------------------------------------------------------------
APPLICATION_NAME="OpenBoard"
BASE_TROLLTECH_DIRECTORY=/usr/local/Trolltech/Qt-4.8.0
# Executables
QMAKE=$BASE_TROLLTECH_DIRECTORY/bin/qmake
......@@ -59,14 +60,14 @@ for eachTranslation in `ls $BASE_QT_TRANSLATIONS_DIRECTORY/qt_??.qm`
do
# looking fo the language code for each qt translation file
languageCode=`echo $eachTranslation | sed 's/.*qt_\(.*\).qm/\1/'`
basicDir=$PRODUCT_DIR/Open-Sankore.app/Contents/Resources/
basicDir=$PRODUCT_DIR/$APPLICATION_NAME.app/Contents/Resources/
for eachDirectory in `ls $basicDir`
do
# looping through the Sankore availables languages
# looping through the OpenBoard availables languages
directoryLanguageCode=`echo $eachDirectory | sed 's/\(.*\)\.lproj/\1/'`
if [ ! -z $directoryLanguageCode ]; then
if [[ $eachDirectory == *".lproj"* && $eachDirectory != "empty.lproj" && $directoryLanguageCode == *$languageCode* ]]; then
# sankore translation found for qt translation file
# OpenBoard translation found for qt translation file
cp $eachTranslation $basicDir/$eachDirectory
if [ $directoryLanguageCode != $languageCode ]; then
# handling fr and fr_CH code.
......@@ -106,12 +107,12 @@ rm -rf "$BUILD_DIR"
# application translations
notify "Generating applications translatons"
$LRELEASE "Sankore_3.1.pro"
$LRELEASE "$APPLICATION_NAME.pro"
# generate Makefiles
notify "Generating Makefile ..."
QMAKE_CMD="$QMAKE Sankore_3.1.pro -spec macx-g++"
QMAKE_CMD="$QMAKE $APPLICATION_NAME.pro -spec macx-g++"
$QMAKE_CMD
......@@ -123,7 +124,7 @@ notify "Qt Translations ..."
$LRELEASE $BASE_QT_TRANSLATIONS_DIRECTORY/translations.pro
addQtTranslations
cp -R resources/customizations $PRODUCT_DIR/Open-Sankore.app/Contents/Resources
cp -R resources/customizations $PRODUCT_DIR/$APPLICATION_NAME.app/Contents/Resources
VERSION=`cat "$BUILD_DIR/version"`
if [ ! -f "$BUILD_DIR/version" ]; then
......@@ -144,14 +145,12 @@ if [ $? != 0 ]; then
fi
NAME="Open-Sankore"
DMG="$NAME.dmg"
VOLUME="/Volumes/$NAME"
APP="$PRODUCT_DIR/Open-Sankore.app"
DSYM_NAME="$NAME (r$SVN_REVISION).dSYM"
DMG="$APPLICATION_NAME.dmg"
VOLUME="/Volumes/$APPLICATION_NAME"
APP="$PRODUCT_DIR/$APPLICATION_NAME.app"
DSYM_NAME="$APPLICATION_NAME (r$SVN_REVISION).dSYM"
DSYM="$PRODUCT_DIR/$DSYM_NAME"
GSYM_i386="$PRODUCT_DIR/$NAME i386.sym"
GSYM_i386="$PRODUCT_DIR/$APPLICATION_NAME i386.sym"
INFO_PLIST="$APP/Contents/Info.plist"
rm -f "$APP/Contents/Resources/empty.lproj"
......@@ -159,22 +158,22 @@ rm -f "$APP/Contents/Resources/empty.lproj"
# set various version infomration in Info.plist
$PLISTBUDDY -c "Set :CFBundleVersion $VERSION" "$INFO_PLIST"
$PLISTBUDDY -c "Set :CFBundleShortVersionString $VERSION" "$INFO_PLIST"
$PLISTBUDDY -c "Set :CFBundleGetInfoString $NAME" "$INFO_PLIST"
$PLISTBUDDY -c "Set :CFBundleGetInfoString $APPLICATION_NAME" "$INFO_PLIST"
# bundle Qt Frameworks into the app bundle
notify "Bulding frameworks ..."
cd "`pwd`/build/macx/release/product/"
$MACDEPLOYQT "`pwd`/Open-Sankore.app"
$MACDEPLOYQT "`pwd`/$APPLICATION_NAME.app"
cd -
notify "Extracting debug information ..."
$DSYMUTIL "$APP/Contents/MacOS/Open-Sankore" -o "$DSYM"
$STRIP -S "$APP/Contents/MacOS/Open-Sankore"
$DSYMUTIL "$APP/Contents/MacOS/$APPLICATION_NAME" -o "$DSYM"
$STRIP -S "$APP/Contents/MacOS/$APPLICATION_NAME"
if [ "$1" == "pkg" ]; then
BASE_ICEBERG_CONFIG_FILE="Open-Sankore.packproj"
BASE_ICEBERG_CONFIG_FILE="$APPLICATION_NAME.packproj"
#copy the standard file for working with
ICEBERG_CONFIG_FILE="Open-Sankore-working.packproj"
ICEBERG_CONFIG_FILE="$APPLICATION_NAME-working.packproj"
cp -r $BASE_ICEBERG_CONFIG_FILE $ICEBERG_CONFIG_FILE
# set version information
$PLISTBUDDY -c "Set :Hierarchy:Attributes:Settings:Description:International:IFPkgDescriptionVersion $VERSION" "$ICEBERG_CONFIG_FILE"
......@@ -198,7 +197,7 @@ fi
notify "Creating dmg ..."
umount "$VOLUME" 2> /dev/null
$DMGUTIL --open --volume="$NAME" "$DMG"
$DMGUTIL --open --volume="$APPLICATION_NAME" "$DMG"
cp *.pdf "$VOLUME"
cp -R "$APP" "$VOLUME"
......@@ -211,9 +210,9 @@ $DMGUTIL --set --x=400 --y=120 "$VOLUME/Applications"
$DMGUTIL --set --x=180 --y=280 "$VOLUME/ReleaseNotes.pdf"
$DMGUTIL --set --x=400 --y=280 "$VOLUME/JournalDesModifications.pdf"
$DMGUTIL --close --volume="$NAME" "$DMG"
$DMGUTIL --close --volume="$APPLICATION_NAME" "$DMG"
notify "$NAME is built"
notify "$APPLICATION_NAME is built"
PRODUCT_DIR="install/mac/"
......
REM --------------------------------------------------------------------
REM This program is free software: you can redistribute it and/or modify
REM it under the terms of the GNU General Public License as published by
REM the Free Software Foundation, either version 3 of the License, or
REM (at your option) any later version.
REM
REM This program is distributed in the hope that it will be useful,
REM but WITHOUT ANY WARRANTY; without even the implied warranty of
REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
REM GNU General Public License for more details.
REM
REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
REM ---------------------------------------------------------------------
set QT_DIR=..\Qt-sankore3.1
set QT_BIN=%QT_DIR%\bin
set PROGRAMS_FILE_PATH=C:\Program Files (x86)
set GIT_BIN=%PROGRAMS_FILE_PATH%\Git\bin
set VS_BIN=%PROGRAMS_FILE_PATH%\Microsoft Visual Studio 9.0\VC\bin
set WIN_SDK_BIN=%PROGRAMS_FILE_PATH%\Microsoft SDKs\Windows\v6.0A\Bin
set INNO_EXE=%PROGRAMS_FILE_PATH%\Inno Setup 5\iscc.exe
set BUILD_DIR=build\win32\release
set LRELEASE=%QT_DIR%\bin\lrelease
set BASE_QT_TRANSLATIONS_DIRECTORY=%QT_DIR%\translations
set PATH=%QT_BIN%;%PATH%;%WIN_SDK_BIN%;%GIT_BIN%
call "%VS_BIN%\vcvars32.bat"
echo %PATH%
REM this checks if the custom qt directory path
REM is correct. This is important because installer
REM pick up dll from this directory
IF NOT EXIST "..\Qt-sankore3.1\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR
REM rmdir /S /Q %BUILD_DIR%
set EDITION=MNEMIS_EDITION
"%QT_BIN%\qmake.exe" "DEFINES+=%EDITION%"
%LRELEASE% Sankore_3.1.pro
set /p VERSION= < build\win32\release\version
git rev-list --tags --max-count=1 > tmp
set /p LAST_TAG= < tmp
erase tmp
git describe %LAST_TAG% > tmp
set /p LAST_TAG_VERSION=< tmp
erase tmp
echo %VERSION%
echo %LAST_TAG_VERSION%
REM if not v%VERSION%==%LAST_TAG_VERSION% GOTO EXIT_WITH_ERROR
nmake release-install
copy %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm build\win32\release\product\i18n\
del build\win32\release\product\i18n\qt_help*
del "build\win32\release\product\Sankore.pdb"
set INSTALLER_NAME=Open-Sankore
set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
:EXIT_WITH_ERROR
echo ERROR
......@@ -14,6 +14,8 @@ REM You should have received a copy of the GNU General Public License
REM along with this program. If not, see <http://www.gnu.org/licenses/>.
REM ---------------------------------------------------------------------
set APPLICATION_NAME=OpenBoard
set QT_DIR=..\Qt-4.8
set QT_BIN=%QT_DIR%\bin
......@@ -42,9 +44,9 @@ IF NOT EXIST "%QT_DIR%\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR
rmdir /S /Q %BUILD_DIR%
rmdir /S /Q install
"%QT_BIN%\qmake.exe" Sankore_3.1.pro
"%QT_BIN%\qmake.exe" %APPLICATION_NAME%.pro
%LRELEASE% Sankore_3.1.pro
%LRELEASE% %APPLICATION_NAME%.pro
%LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro
set /p VERSION= < build\win32\release\version
......@@ -61,9 +63,9 @@ REM echo %VERSION%
REM echo %LAST_TAG_VERSION%
nmake release-install
IF NOT EXIST build\win32\release\product\Open-Sankore.exe GOTO EXIT_WITH_ERROR
IF NOT EXIST build\win32\release\product\%APPLICATION_NAME%.exe GOTO EXIT_WITH_ERROR
xcopy C:\OpenSankore\lib\*.dll build\win32\release\product\
xcopy C:\%APPLICATION_NAME%\lib\*.dll build\win32\release\product\
xcopy %QT_DIR%\lib\QtOpenGL4.dll build\win32\release\product\
set CUSTOMIZATIONS=build\win32\release\product\customizations
......@@ -75,18 +77,16 @@ xcopy /s %BASE_QT_TRANSLATIONS_DIRECTORY%\qt_*.qm %I18n%\
del build\win32\release\product\i18n\qt_help*
del "build\win32\release\product\Sankore.pdb"
set INSTALLER_NAME=Open-Sankore
del "build\win32\release\product\%APPLICATION_NAME%.pdb"
set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe
set INSTALLER_PATH=.\install\win32\%APPLICATION_NAME%.exe
call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%"
call "%INNO_EXE%" "%APPLICATION_NAME%.iss" /F"%APPLICATION_NAME%"
set INSTALL_DIRECTORY=install\win32\
xcopy *.pdf %INSTALL_DIRECTORY%
cd %INSTALL_DIRECTORY%
call %SEVEN_ZIP_EXE% a Open-Sankor_Windows_%VERSION%.zip *.exe *.pdf
call %SEVEN_ZIP_EXE% a %APPLICATION_NAME%_Windows_%VERSION%.zip *.exe *.pdf
cd ..\..\
GOTO END
......@@ -95,6 +95,6 @@ echo "Error found"
GOTO :EOF
:END
echo "Open-Sankore's build finished"
echo "%APPLICATION_NAME% build finished"
:EOF
<RCC>
<qresource prefix="/">
<file>images/uniboard.png</file>
<file>images/OpenBoard.png</file>
<file>images/bigUniboard.png</file>
<file>images/close.svg</file>
<file>images/increase.svg</file>
......@@ -209,8 +209,8 @@
<file>webbrowser/object-wrapper.html</file>
<file alias="PowerPointImport.applescript">macx/PowerPointImport.applescript</file>
<file>macx/upgrade.sh</file>
<file>podcast/uniboard.prx</file>
<file>www/uniboard-web-player.html</file>
<file>podcast/OpenBoard.prx</file>
<file>www/OpenBoard-web-player.html</file>
<file>images/toolbar/tutorial.png</file>
<file>images/edit-mode.svg</file>
<file>images/save.svg</file>
......
......@@ -189,7 +189,7 @@
</layout>
</widget>
<resources>
<include location="../sankore.qrc"/>
<include location="../OpenBoard.qrc"/>
</resources>
<connections/>
</ui>
......@@ -244,7 +244,7 @@
</customwidget>
</customwidgets>
<resources>
<include location="../sankore.qrc"/>
<include location="../OpenBoard.qrc"/>
</resources>
<connections/>
</ui>
This diff is collapsed.
This diff is collapsed.
......@@ -2,8 +2,8 @@
/* Application Icon */
IDI_ICON1 ICON DISCARDABLE "uniboard.ico"
IDI_ICON2 ICON DISCARDABLE "uniboardDoc.ico"
IDI_ICON1 ICON DISCARDABLE "OpenBoard.ico"
IDI_ICON2 ICON DISCARDABLE "OpenBoardDoc.ico"
/* Version Info */
......
......@@ -118,5 +118,5 @@ QString UBExportDocument::exportExtention()
QString UBExportDocument::exportName()
{
return tr("Export to Sankore Format");
return tr("Export to OpenBoard Format");
}
......@@ -69,7 +69,7 @@ void UBExportWeb::persist(UBDocumentProxy* pDocumentProxy)
{
QString htmlPath = dirName + "/index.html";
QFile html(":www/uniboard-web-player.html");
QFile html(":www/OpenBoard-web-player.html");
html.copy(htmlPath);
UBApplication::showMessage(tr("Export successful."));
......
......@@ -60,7 +60,7 @@ QStringList UBImportDocument::supportedExtentions()
QString UBImportDocument::importFileFilter()
{
return tr("Open-Sankore (*.ubz)");
return tr("OpenBoard (*.ubz)");
}
......@@ -173,7 +173,7 @@ UBDocumentProxy* UBImportDocument::importFile(const QFile& pFile, const QString&
QString path = UBSettings::userDocumentDirectory();
QString documentRootFolder;
if(!extractFileToDir(pFile, path, documentRootFolder)){
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
return NULL;
......@@ -197,7 +197,7 @@ bool UBImportDocument::addFileToDocument(UBDocumentProxy* pDocument, const QFile
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
return false;
}
if (!UBPersistenceManager::persistenceManager()->addDirectoryContentToDocument(documentRootFolder, pDocument))
{
UBApplication::showMessage(tr("Import of file %1 failed.").arg(fi.baseName()));
......
......@@ -116,9 +116,9 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
staticMemoryCleaner = new QObject(0); // deleted in UBApplication destructor
setOrganizationName("Sankore");
setOrganizationDomain("sankore.org");
setApplicationName("Open-Sankore");
setOrganizationName("Open Education Foundation");
setOrganizationDomain("oe-f.org");
setApplicationName("OpenBoard");
setApplicationVersion(UBVERSION);
......@@ -154,7 +154,7 @@ UBApplication::UBApplication(const QString &id, int &argc, char **argv) : QtSing
updateProtoActionsState();
#ifndef Q_WS_MAC
setWindowIcon(QIcon(":/images/uniboard.png"));
setWindowIcon(QIcon(":/images/OpenBoard.png"));
#endif
setStyle(new UBStyle()); // Style is owned and deleted by the application
......@@ -250,7 +250,7 @@ void UBApplication::setupTranslators(QStringList args)
else{
mApplicationTranslator = new QTranslator(this);
mQtGuiTranslator = new QTranslator(this);
mApplicationTranslator->load(UBPlatformUtils::translationPath(QString("sankore_"),language));
mApplicationTranslator->load(UBPlatformUtils::translationPath(QString("OpenBoard_"),language));
installTranslator(mApplicationTranslator);
QString qtGuiTranslationPath = UBPlatformUtils::translationPath("qt_", language);
......
......@@ -473,12 +473,12 @@ void UBApplicationController::showDesktop(bool dontSwitchFrontProcess)
void UBApplicationController::checkUpdate()
{
// if(mHttp)
// delete mHttp;
// QUrl url("http://ftp.open-sankore.org/update.json");
// mHttp = new QHttp(url.host());
// connect(mHttp, SIGNAL(requestFinished(int,bool)), this, SLOT(updateRequestFinished(int,bool)));
// mHttp->get(url.path());
if(mHttp)
delete mHttp;
QUrl url("http://oe-f.org/update.json");
mHttp = new QHttp(url.host());
connect(mHttp, SIGNAL(requestFinished(int,bool)), this, SLOT(updateRequestFinished(int,bool)));
mHttp->get(url.path());
}
void UBApplicationController::updateRequestFinished(int id, bool error)
......
......@@ -682,7 +682,7 @@ QString UBPersistenceManager::generateUniqueDocumentPath(const QString& baseFold
QDateTime now = QDateTime::currentDateTime();
QString dirName = now.toString("yyyy-MM-dd hh-mm-ss.zzz");
return baseFolder + QString("/Sankore Document %1").arg(dirName);
return baseFolder + QString("/OpenBoard Document %1").arg(dirName);
}
QString UBPersistenceManager::generateUniqueDocumentPath()
......@@ -930,7 +930,7 @@ void UBPersistenceManager::checkIfDocumentRepositoryExists()
QString humanPath = QDir::cleanPath(mDocumentRepositoryPath);
humanPath = QDir::toNativeSeparators(humanPath);
UBApplication::mainWindow->warning(tr("Document Repository Loss"),tr("Sankore has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath));
UBApplication::mainWindow->warning(tr("Document Repository Loss"),qApp->applicationName() + tr("has lost access to the document repository '%1'. Unfortunately the application must shut down to avoid data corruption. Latest changes may be lost as well.").arg(humanPath));
UBApplication::quit();
}
......
......@@ -775,7 +775,7 @@ QString UBSettings::userDataDirectory()
}
dataDirPath = UBFileSystemUtils::normalizeFilePath(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
dataDirPath.replace("/Open-Sankore", "");
dataDirPath.replace(qApp->organizationName() + "/" + qApp->organizationDomain(), "");
}
return dataDirPath;
}
......@@ -795,7 +795,7 @@ QString UBSettings::userImageDirectory()
qCritical() << "failed to create image directory " << imageDirectory;
}
imageDirectory = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation) + "/Sankore";
imageDirectory = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation) + "/" + qApp->applicationName();
checkDirectory(imageDirectory);
}
return imageDirectory;
......@@ -821,7 +821,7 @@ QString UBSettings::userVideoDirectory()
if(videoDirectory.isEmpty())
videoDirectory = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) + "/" + tr("My Movies");
else
videoDirectory = videoDirectory + "/Sankore";
videoDirectory = videoDirectory + "/" + qApp->applicationName();
checkDirectory(videoDirectory);
}
......@@ -842,7 +842,7 @@ QString UBSettings::userAudioDirectory()
qCritical() << "failed to create image directory " << audioDirectory;
}
audioDirectory = QDesktopServices::storageLocation(QDesktopServices::MusicLocation) + "/Sankore";
audioDirectory = QDesktopServices::storageLocation(QDesktopServices::MusicLocation) + "/" + qApp->applicationName();
checkDirectory(audioDirectory);
}
return audioDirectory;
......
......@@ -76,7 +76,7 @@ void ub_message_output(QtMsgType type, const char *msg) {
qInstallMsgHandler(previousHandler);
}
int main(int argc, char *argv[])
int main(int argc, char *argv[])
{
// Uncomment next section to have memory leaks information
......@@ -87,7 +87,7 @@ int main(int argc, char *argv[])
#endif
*/
Q_INIT_RESOURCE(sankore);
Q_INIT_RESOURCE(OpenBoard);
qInstallMsgHandler(ub_message_output);
......@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
QApplication::setGraphicsSystem("raster");
#endif
UBApplication app("Sankore", argc, argv);
UBApplication app("OpenBoard", argc, argv);
//BUGFIX:
//when importing a sankore file that contains a non standard character
......
......@@ -46,7 +46,7 @@ UBDesktopPalette::UBDesktopPalette(QWidget *parent, UBRightPalette* _rightPalett
{
QList<QAction*> actions;
mActionUniboard = new QAction(QIcon(":/images/toolbar/board.png"), tr("Show Open-Sankore"), this);
mActionUniboard = new QAction(QIcon(":/images/toolbar/board.png"), tr("Show OpenBoard"), this);
connect(mActionUniboard, SIGNAL(triggered()), this, SIGNAL(uniboardClick()));
actions << mActionUniboard;
......
......@@ -1419,7 +1419,7 @@ bool UBDocumentController::isOKToOpenDocument(UBDocumentProxy* proxy)
else
{
if (UBApplication::mainWindow->yesNoQuestion(tr("Open Document"),
tr("The document '%1' has been generated with a newer version of Sankore (%2). By opening it, you may lose some information. Do you want to proceed?")
tr("The document '%1' has been generated with a newer version of OpenBoard (%2). By opening it, you may lose some information. Do you want to proceed?")
.arg(proxy->metaData(UBSettings::documentName).toString())
.arg(docVersion)))
{
......
......@@ -70,9 +70,9 @@ QStringList UBPlatformUtils::availableTranslations()
{
QString translationsPath = applicationResourcesDirectory() + "/" + "i18n" + "/";
QStringList translationsList = UBFileSystemUtils::allFiles(translationsPath);
QRegExp sankoreTranslationFiles(".*sankore_.*.qm");
QRegExp sankoreTranslationFiles(".*OpenBoard_.*.qm");
translationsList=translationsList.filter(sankoreTranslationFiles);
return translationsList.replaceInStrings(QRegExp("(.*)sankore_(.*).qm"),"\\2");
return translationsList.replaceInStrings(QRegExp("(.*)OpenBoard_(.*).qm"),"\\2");
}
QString UBPlatformUtils::translationPath(QString pFilePrefix,QString pLanguage)
......
......@@ -71,8 +71,8 @@ void UBPlatformUtils::init()
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSString *currentPath = [[NSBundle mainBundle] pathForResource:@"Save PDF to Open-Sankore" ofType:@"workflow"];
NSString *installedPath = [[[@"~/Library/PDF Services" stringByExpandingTildeInPath] stringByAppendingPathComponent:@"Save PDF to Open-Sankore"] stringByAppendingPathExtension:@"workflow"];
NSString *currentPath = [[NSBundle mainBundle] pathForResource:@"Save PDF to OpenBoard" ofType:@"workflow"];
NSString *installedPath = [[[@"~/Library/PDF Services" stringByExpandingTildeInPath] stringByAppendingPathComponent:@"Save PDF to OpenBoard"] stringByAppendingPathExtension:@"workflow"];
NSString *currentVersion = bundleShortVersion([NSBundle bundleWithPath:currentPath]);
NSString *installedVersion = bundleShortVersion([NSBundle bundleWithPath:installedPath]);
......
......@@ -72,9 +72,9 @@ QStringList UBPlatformUtils::availableTranslations()
{
QString translationsPath = applicationResourcesDirectory() + "/" + "i18n" + "/";
QStringList translationsList = UBFileSystemUtils::allFiles(translationsPath);
QRegExp sankoreTranslationFiles(".*sankore_.*.qm");
QRegExp sankoreTranslationFiles(".*OpenBoard_.*.qm");
translationsList=translationsList.filter(sankoreTranslationFiles);
return translationsList.replaceInStrings(QRegExp("(.*)sankore_(.*).qm"),"\\2");
return translationsList.replaceInStrings(QRegExp("(.*)OpenBoard_(.*).qm"),"\\2");
}
QString UBPlatformUtils::translationPath(QString pFilePrefix,QString pLanguage)
......@@ -147,7 +147,7 @@ void UBPlatformUtils::setWindowNonActivableFlag(QWidget* widget, bool nonAcivabl
#define KEYBTDECL(s1, s2, clSwitch) KEYBT(s1, s2, clSwitch, 0, 0, KEYCODE(s1), KEYCODE(s2))
KEYBT RUSSIAN_LOCALE [] =
KEYBT RUSSIAN_LOCALE [] =
{
/* Ј і */ KEYBTDECL(0x451, 0x401, true),
/* 1 ! */ KEYBTDECL(0x31, 0x21, false),
......
......@@ -354,7 +354,7 @@ void UBPodcastController::start()
}
else
{
videoFileName = mPodcastRecordingPath + "/" + tr("Sankore Cast") + "." + mVideoEncoder->videoFileExtension();
videoFileName = mPodcastRecordingPath + "/" + tr("OpenBoard Cast") + "." + mVideoEncoder->videoFileExtension();
}
videoFileName = UBFileSystemUtils::nextAvailableFileName(videoFileName, " ");
......
......@@ -53,7 +53,7 @@ UBWindowsMediaVideoEncoder::~UBWindowsMediaVideoEncoder()
bool UBWindowsMediaVideoEncoder::start()
{
QString profile = UBFileSystemUtils::readTextFile(":/podcast/uniboard.prx");
QString profile = UBFileSystemUtils::readTextFile(":/podcast/OpenBoard.prx");
profile.replace("{in.videoWidth}", QString("%1").arg(videoSize().width()));
profile.replace("{in.videoHeight}", QString("%1").arg(videoSize().height()));
......
......@@ -64,7 +64,7 @@ void UBYouTubePublisher::uploadVideo(const QString& videoFilePath)
UBYouTubePublishingDialog pub(videoFilePath, UBApplication::mainWindow);
pub.title->setText(QFileInfo(mVideoFilePath).completeBaseName());
pub.keywords->setText(tr("Open-Sankore"));
pub.keywords->setText(qApp->applicationName());
QString defaultEMail = UBSettings::settings()->youTubeUserEMail->get().toString();
pub.email->setText(defaultEMail);
......@@ -111,7 +111,7 @@ void UBYouTubePublisher::postClientLoginRequest(const QString& userName, const Q
QString payload = QString("Email=%1&Passwd=%2&service=youtube&source=%3")
.arg(userName)
.arg(password)
.arg(tr("OpenSankore"));
.arg(qApp->applicationName());
mAuthRequest->post(url, payload.toUtf8());
......@@ -278,7 +278,7 @@ QString UBYouTubePublisher::youtubeMetadata()
workingDescription = workingDescription.left(4900) + "...";
}
workingDescription += "\n\nhttp://www.open-sankore.org";
workingDescription += "\n\nhttp://www.oe-f.org";
if(workingDescription.length() == 0)
{
......
......@@ -175,7 +175,7 @@ void WBWebPage::handleUnsupportedContent(QNetworkReply *reply)
if (isPDF)
{
QMessageBox messageBox(mainWindow());
messageBox.setText(tr("Download PDF Document: would you prefer to download the PDF file or add it to the current Sankore document?"));
messageBox.setText(tr("Download PDF Document: would you prefer to download the PDF file or add it to the current OpenBoard document?"));
messageBox.addButton(tr("Download"), QMessageBox::AcceptRole);
QAbstractButton *addButton = messageBox.addButton(tr("Add to Current Document"), QMessageBox::AcceptRole);
......@@ -380,7 +380,7 @@ QUrl WBWebView::url() const
url = QWebView::url();
} catch(...)
{}
if (!url.isEmpty())
return url;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment