From 69090c1303cb5923085628a8bdac42dd496c0efe Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 31 Jul 2012 11:40:25 +0200 Subject: [PATCH 1/5] improved windows installer --- release.win7.vc9.bat | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/release.win7.vc9.bat b/release.win7.vc9.bat index af1f549b..9d7c5bae 100644 --- a/release.win7.vc9.bat +++ b/release.win7.vc9.bat @@ -18,6 +18,7 @@ set QT_BIN=%QT_DIR%\bin set PROGRAMS_FILE_PATH=C:\Program Files +set SEVEN_ZIP_EXE="%PROGRAMS_FILE_PATH%\7-Zip\7z.exe" 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 @@ -37,7 +38,7 @@ REM is correct. This is important because installer REM pick up dll from this directory IF NOT EXIST "%QT_DIR%\lib\QtCore4.dll" GOTO EXIT_WITH_ERROR -rmdir /S /Q %BUILD_DIR% +REM rmdir /S /Q %BUILD_DIR% set EDITION=MNEMIS_EDITION @@ -46,7 +47,9 @@ set EDITION=MNEMIS_EDITION %LRELEASE% Sankore_3.1.pro %LRELEASE% %BASE_QT_TRANSLATIONS_DIRECTORY%\translations.pro -REM set /p VERSION= < build\win32\release\version +set /p VERSION= < build\win32\release\version +REM remove the last character that is a space +set VERSION=%VERSION: =% REM git rev-list --tags --max-count=1 > tmp REM set /p LAST_TAG= < tmp REM erase tmp @@ -78,3 +81,17 @@ set INSTALLER_PATH=.\install\win32\%INSTALLER_NAME%.exe call "%INNO_EXE%" "Sankore 3.1.iss" /F"%INSTALLER_NAME%" +set INSTALL_DIRECTORY=install\win32\ + +xcopy *.pdf %INSTALL_DIRECTORY% +cd %INSTALL_DIRECTORY% +call %SEVEN_ZIP_EXE% a Open-Sankore_Windows_%VERSION%.zip *.exe *.pdf +cd ..\..\ +GOTO END + +:EXIT_WITH_ERROR +echo "Error found" +GOTO :EOF + +:END +echo "Open-Sankore's build finished" From 77af92e25d80febfa5d6f29ced2d0cb4123a4b59 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 31 Jul 2012 11:56:42 +0200 Subject: [PATCH 2/5] added the accent on the package name --- release.win7.vc9.bat | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release.win7.vc9.bat b/release.win7.vc9.bat index 9d7c5bae..4e600cb0 100644 --- a/release.win7.vc9.bat +++ b/release.win7.vc9.bat @@ -1,7 +1,7 @@ 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 the Free Software Foundation, either version 2 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, @@ -85,7 +85,7 @@ set INSTALL_DIRECTORY=install\win32\ xcopy *.pdf %INSTALL_DIRECTORY% cd %INSTALL_DIRECTORY% -call %SEVEN_ZIP_EXE% a Open-Sankore_Windows_%VERSION%.zip *.exe *.pdf +call %SEVEN_ZIP_EXE% a Open-Sankor‚_Windows_%VERSION%.zip *.exe *.pdf cd ..\..\ GOTO END @@ -95,3 +95,5 @@ GOTO :EOF :END echo "Open-Sankore's build finished" + +:EOF From 55374a24da980d5c95234a5b7ed9ee9280c9d4de Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 31 Jul 2012 14:46:55 +0200 Subject: [PATCH 3/5] fixed Calculatrice app --- .../Calculatrice.wgt/js/ubw-main.js | 33 ++++++++++++++----- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/resources/library/applications/Calculatrice.wgt/js/ubw-main.js b/resources/library/applications/Calculatrice.wgt/js/ubw-main.js index f0a1b0f9..70755293 100644 --- a/resources/library/applications/Calculatrice.wgt/js/ubw-main.js +++ b/resources/library/applications/Calculatrice.wgt/js/ubw-main.js @@ -350,7 +350,6 @@ function init(){ function compute(){ var result; - //alert(calc) if(calc.length <= 1) result = eval(calc); else{ @@ -362,7 +361,6 @@ function init(){ operation = (calc.indexOf("+", 0) != -1)?calc.charAt(calc.indexOf("+", 0)):((calc.indexOf("*", 0) != -1)?calc.charAt(calc.indexOf("*", 0)):((calc.indexOf("/", 0) != -1)?calc.charAt(calc.indexOf("/", 0)):((calc.indexOf("-", 0) != -1)?calc.charAt(calc.indexOf("-", 0)):""))); fNumber = fMinus + calc.substring(0, calc.indexOf(operation, 0)); lNumber = calc.substring(calc.indexOf(operation, 0)+1, calc.length); - //alert(fNumber + " | " + operation + " | " + lNumber) result = calcIt(fNumber, operation, lNumber); } @@ -391,10 +389,10 @@ function init(){ lCount = (lNumber.indexOf(".", 0) != -1)?lNumber.substring(lNumber.indexOf(".", 0)+1, lNumber.length):""; length = (fCount.length >= lCount.length)?fCount.length:lCount.length; length = Math.pow(10, length); - fNumber = fNumber * length; - lNumber = lNumber * length; + fNumber = Math.round(fNumber * length); + lNumber = Math.round(lNumber * length); switch(operation){ - case "+": + case "+": result = (fNumber + lNumber)/length; break; case "-": @@ -516,10 +514,27 @@ function init(){ displayTrunk = displayTrunk.substr(0, displayTrunk.length-1); }; - calc += String(char); - displayTrunk += String(char); - historyTrunk += String(char); - lastchar.type = "Number"; + if(calc == "0"){ + if(char != "0"){ + if(char != "."){ + calc = String(char); + displayTrunk = String(char); + historyTrunk = String(char); + lastchar.type = "Number"; + } else{ + calc += String(char); + displayTrunk += String(char); + historyTrunk += String(char); + lastchar.type = "Number"; + } + } + } else { + char = (char == ".")?((displayTrunk.indexOf(".", 0) != -1)?"":"."):char; + calc += String(char); + displayTrunk += String(char); + historyTrunk += String(char); + lastchar.type = "Number"; + } } // char is an operator else { From d00071338134628dd4ea23b9e24349ce3092a686 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 31 Jul 2012 14:00:30 +0200 Subject: [PATCH 4/5] added path for preinstalled resources --- src/board/UBFeaturesController.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/board/UBFeaturesController.cpp b/src/board/UBFeaturesController.cpp index 4adf7194..6a597736 100644 --- a/src/board/UBFeaturesController.cpp +++ b/src/board/UBFeaturesController.cpp @@ -99,12 +99,17 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) : mUserAnimationDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->userAnimationDirectory()); mLibPicturesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationImageLibraryDirectory()); + mLibAudiosDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationAudiosLibraryDirectory()); + mLibVideosDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationVideosLibraryDirectory()); + mLibAnimationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationAnimationsLibraryDirectory()); mLibInteractiveDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationInteractivesDirectory()); mLibApplicationsDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationApplicationsLibraryDirectory()); mLibShapesDirectoryPath = QUrl::fromLocalFile(UBSettings::settings()->applicationShapeLibraryDirectory()); mLibSearchDirectoryPath =QUrl::fromLocalFile(UBSettings::settings()->userSearchDirectory()); trashDirectoryPath = QUrl::fromLocalFile(UBSettings::userTrashDirPath()); + + rootElement = UBFeature(QString(), QPixmap( ":images/libpalette/home.png" ), "root", QUrl()); audiosElement = UBFeature( rootPath, QPixmap(":images/libpalette/AudiosCategory.svg"), "Audios" , mUserAudioDirectoryPath, FEATURE_CATEGORY); moviesElement = UBFeature( rootPath, QPixmap(":images/libpalette/MoviesCategory.svg"), "Movies" , mUserVideoDirectoryPath, FEATURE_CATEGORY); From de65259be2092164f6c9b9287aae57efd26a7328 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Tue, 31 Jul 2012 14:00:38 +0200 Subject: [PATCH 5/5] updated version --- Sankore_3.1.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sankore_3.1.pro b/Sankore_3.1.pro index 66991470..bf00af51 100644 --- a/Sankore_3.1.pro +++ b/Sankore_3.1.pro @@ -14,7 +14,7 @@ linux-g++-64 { VERSION_MAJ = 2 VERSION_MIN = 00 VERSION_TYPE = b # a = alpha, b = beta, r = release, other => error -VERSION_PATCH = 01 +VERSION_PATCH = 02 VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = $$replace(VERSION, "\\.r", "")