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", "") diff --git a/release.win7.vc9.bat b/release.win7.vc9.bat index af1f549b..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, @@ -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,19 @@ 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-Sankor‚_Windows_%VERSION%.zip *.exe *.pdf +cd ..\..\ +GOTO END + +:EXIT_WITH_ERROR +echo "Error found" +GOTO :EOF + +:END +echo "Open-Sankore's build finished" + +:EOF 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 { 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);