Index: lams_tool_chat/db/sql/updatescripts/updateTo20070227.sql =================================================================== diff -u -r487f2c5d01d76b996ecb1b534220b5ae496cdba9 -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc --- lams_tool_chat/db/sql/updatescripts/updateTo20070227.sql (.../updateTo20070227.sql) (revision 487f2c5d01d76b996ecb1b534220b5ae496cdba9) +++ lams_tool_chat/db/sql/updatescripts/updateTo20070227.sql (.../updateTo20070227.sql) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -1,4 +1,4 @@ -- Update the Notebook tables to 20070227 -- This is for the LAMS 2.0.1 release. -UPDATE lams_tool set modified_date_time = now(), classpath_addition = './lams-tool-lachat11.jar', context_file = '/org/lamsfoundation/lams/tool/chat/chatApplicationContext.xml' where tool_signature = 'lachat11'; +UPDATE lams_tool set modified_date_time = now(), classpath_addition = 'lams-tool-lachat11.jar', context_file = '/org/lamsfoundation/lams/tool/chat/chatApplicationContext.xml' where tool_signature = 'lachat11'; Index: win_installer/src/Functions.nsh =================================================================== diff -u -rfca3807bd08c44e434338128e180d3c7dd92862d -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc --- win_installer/src/Functions.nsh (.../Functions.nsh) (revision fca3807bd08c44e434338128e180d3c7dd92862d) +++ win_installer/src/Functions.nsh (.../Functions.nsh) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -421,3 +421,113 @@ Exch 2 Exch $0 ;output count found FunctionEnd + +;---------------------------------------------------------------------------- +; Superseded by : GetTime function. +;---------------------------------------------------------------------------- +; Title : Get Local Time +; Short Name : GetLocalTime +; Last Changed : 22/Feb/2005 +; Code Type : Function +; Code Sub-Type : One-way Output +;---------------------------------------------------------------------------- +; Required : System plugin. +; Description : Gets the current local time of the user's computer +;---------------------------------------------------------------------------- +; Function Call : Call GetLocalTime +; +; Pop "$Variable1" +; Day. +; +; Pop "$Variable2" +; Month. +; +; Pop "$Variable3" +; Year. +; +; Pop "$Variable4" +; Day of the week name. +; +; Pop "$Variable5" +; Hour. +; +; Pop "$Variable6" +; Minute. +; +; Pop "$Variable7" +; Second. +;---------------------------------------------------------------------------- +; Author : Diego Pedroso +; Author Reg. Name : deguix +;---------------------------------------------------------------------------- + +Function GetLocalTime + + # Prepare variables + Push $0 + Push $1 + Push $2 + Push $3 + Push $4 + Push $5 + Push $6 + + # Call GetLocalTime API from Kernel32.dll + System::Call '*(&i2, &i2, &i2, &i2, &i2, &i2, &i2, &i2) i .r0' + System::Call 'kernel32::GetLocalTime(i) i(r0)' + System::Call '*$0(&i2, &i2, &i2, &i2, &i2, &i2, &i2, &i2)i \ + (.r4, .r5, .r3, .r6, .r2, .r1, .r0,)' + + # Day of week: convert to name + StrCmp $3 0 0 +3 + StrCpy $3 Sunday + Goto WeekNameEnd + StrCmp $3 1 0 +3 + StrCpy $3 Monday + Goto WeekNameEnd + StrCmp $3 2 0 +3 + StrCpy $3 Tuesday + Goto WeekNameEnd + StrCmp $3 3 0 +3 + StrCpy $3 Wednesday + Goto WeekNameEnd + StrCmp $3 4 0 +3 + StrCpy $3 Thursday + Goto WeekNameEnd + StrCmp $3 5 0 +3 + StrCpy $3 Friday + Goto WeekNameEnd + StrCmp $3 6 0 +2 + StrCpy $3 Saturday + WeekNameEnd: + + # Minute: convert to 2 digits format + IntCmp $1 9 0 0 +2 + StrCpy $1 '0$1' + + # Second: convert to 2 digits format + IntCmp $0 9 0 0 +2 + StrCpy $0 '0$0' + + # Return to user + Exch $6 + Exch + Exch $5 + Exch + Exch 2 + Exch $4 + Exch 2 + Exch 3 + Exch $3 + Exch 3 + Exch 4 + Exch $2 + Exch 4 + Exch 5 + Exch $1 + Exch 5 + Exch 6 + Exch $0 + Exch 6 + +FunctionEnd Index: win_installer/src/updateLocales.sql =================================================================== diff -u -r3e0afea3eb6fc82e9bb97b1374c29caa67439d87 -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc --- win_installer/src/updateLocales.sql (.../updateLocales.sql) (revision 3e0afea3eb6fc82e9bb97b1374c29caa67439d87) +++ win_installer/src/updateLocales.sql (.../updateLocales.sql) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -43,6 +43,6 @@ FROM locale_temp t WHERE t.combined NOT IN (SELECT CONCAT_WS(',',l.language_iso_code,l.country_iso_code) FROM lams_supported_locale l)); -UPDATE lams_configuration set config_value='2007-03-02' WHERE config_key='DictionaryDateCreated'; +UPDATE lams_configuration set config_value='2007-03-08' WHERE config_key='DictionaryDateCreated'; drop table if exists locale_temp; Index: win_installer/src/updater.nsi =================================================================== diff -u -rfca3807bd08c44e434338128e180d3c7dd92862d -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc --- win_installer/src/updater.nsi (.../updater.nsi) (revision fca3807bd08c44e434338128e180d3c7dd92862d) +++ win_installer/src/updater.nsi (.../updater.nsi) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -49,8 +49,8 @@ # constants !define VERSION "2.0.1" -!define LANGUAGE_PACK_VERSION "2007-03-07" -!define DATE_TIME_STAMP "200703071200" +!define LANGUAGE_PACK_VERSION "2007-03-08" +!define DATE_TIME_STAMP "200703081600" !define SERVER_VERSION_NUMBER "${VERSION}.${DATE_TIME_STAMP}" !define BASE_VERSION "2.0" !define SOURCE_JBOSS_HOME "D:\jboss-4.0.2" ; location of jboss where lams was deployed @@ -178,6 +178,12 @@ ; Backing up existing lams installation call backupLams + ; removing temporary jboss files + Detailprint "Removing $INSTDIR\jboss-4.0.2\server\default\tmp " + rmdir /r "$INSTDIR\jboss-4.0.2\server\default\tmp" + Detailprint "Removing $INSTDIR\jboss-4.0.2\server\default\work\jboss.web\localhost" + rmdir /r "$INSTDIR\jboss-4.0.2\server\default\work\jboss.web\localhost" + ; setting up ant call setupant @@ -204,12 +210,7 @@ ; Then Calls deploy tools call createAndDeployTools - ; removing temporary jboss files - Detailprint "Removing jboss temp directories" - rmdir /r "$INSTDIR\server\default\tmp" - rmdir /r "$INSTDIR\server\default\work\jboss.web\localhost" - - + # RUNNING THE LANGUAGE PACK ################## call languagePackInit ; copy language files from LAMS projects to a folder in $INSTDIR @@ -223,7 +224,7 @@ call updateDatabase # write this language pack version to registry - Detailprint 'Writing Language pack version ${LANGUAGE_PACK_VERSION} to registry: "${LANGUAGE_PACK_VERSION}"' + Detailprint 'Writing Language pack version ${LANGUAGE_PACK_VERSION} to registry: "$VERSION_INT"' WriteRegStr HKLM "${REG_HEAD}" "language_pack" $VERSION_INT DetailPrint "LAMS Language Pack ${LANGUAGE_PACK_VERSION} install successfull" @@ -339,7 +340,7 @@ File /a "..\..\jsmath\build\lib\jsMath.war" CreateDirectory "$INSTDIR\jboss-4.0.2\server\default\deploy\jsMath.war" SetOutPath "$INSTDIR\jboss-4.0.2\server\default\deploy\jsMath.war" - DetailPrint "$JDK_DIR\bin\jar xf $TEMP\jsMath.war" + DetailPrint "$JDK_DIR\bin\jar xvf $TEMP\jsMath.war" DetailPrint "Expanding jsMath.war... This may take several minutes" nsExec::ExecToStack "$JDK_DIR\bin\jar xf $TEMP\jsMath.war" Pop $0 @@ -750,49 +751,38 @@ ; Checking to see if lams2.0 exists call checkRegistry - # ${StrTok} "ResultVar" "String" "Separators" "ResultPart" "SkipEmptyParts" + Call GetLocalTime + Pop "$0" ;Variable (for day) + Pop "$1" ;Variable (for month) + Pop "$2" ;Variable (for year) + Pop "$3" ;Variable (for day of week name) + Pop "$4" ;Variable (for hour) + Pop "$5" ;Variable (for minute) + Pop "$6" ;Variable (for second) - nsExec::ExecToStack "date /T" - Pop $0 - Pop $1 - /*${If} $0 == 1 - ${orif} $0 == 'error' - goto error - ${EndIf} - MessageBox MB_OK|MB_ICONSTOP $1 - */ - strcpy $8 $1 + strlen $7 $0 + ${if} $7 == 1 + strcpy $0 "0$0" + ${endif} - nsExec::ExecToStack "time /T" - Pop $0 - Pop $1 - /* - ${If} $0 == 1 - ${orif} $0 == 'error' - goto error - ${EndIf} - */ - + strlen $7 $1 + ${if} $7 == 1 + strcpy $1 "0$1" + ${endif} - strcpy $9 $1 + strlen $7 $4 + ${if} $7 == 1 + strcpy $4 "0$4" + ${endif} - ${StrTok} $0 $8 "/" 3 0 - ${StrTok} $1 $8 "/" 2 0 - ${StrTok} $2 $8 "/" 1 0 - - ${StrTok} $3 $9 ":" 0 0 - ${StrTok} $4 $9 ":" 1 0 - ${StrTok} $5 $9 ":" 2 0 - - - - ${if} $5 == "PM" - intop $3 $3 + 12 + strlen $7 $5 + ${if} $7 == 1 + strcpy $1 "0$5" ${endif} + + strcpy $TIMESTAMP "$2$1$0$4$5" - strcpy $TIMESTAMP "2.0" - ${if} $IS_UPDATE == "1" MessageBox MB_OKCANCEL|MB_ICONQUESTION "Your installation of LAMS will be backed up at $INSTDIR-$TIMESTAMP.bak" IDOK continue IDCANCEL cancel cancel: @@ -852,8 +842,14 @@ ; Backs up existing lams installation Function backupLams - #copyfiles /r $INSTDIR "$INSTDIR + iffileexists "$INSTDIR-$TIMESTAMP.bak\*.*" backupExists continue + backupExists: + DetailPrint "Lams backup failed" + MessageBox MB_OK|MB_ICONSTOP "Lams backup failed, please delete or change the name of the backup file before continuing with the update$\r$\n$INSTDIR-$TIMESTAMP.bak" + Abort "LAMS configuration failed" + continue: + DetailPrint "Backing up lams at: $INSTDIR-$TIMESTAMP.bak. This may take a few minutes" SetDetailsPrint listonly copyfiles /SILENT $INSTDIR $INSTDIR-$TIMESTAMP.bak 95000 @@ -929,7 +925,9 @@ ${EndIf} DetailPrint $1 + ;StrCpy $0 '"$MYSQL_DIR\bin\mysql" -v $DB_NAME -e "update lams_user set password= (select passord from lams_user where user_id=1) where login='test1' or login='test2' or login='test3' or login='test4'" + # generate a properties file ClearErrors FileOpen $0 $TEMP\lams\core.properties w Index: win_installer/templates/update-core-database.xml =================================================================== diff -u --- win_installer/templates/update-core-database.xml (revision 0) +++ win_installer/templates/update-core-database.xml (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file Index: win_installer/templates/update-deploy-tools.xml =================================================================== diff -u -r962910eaa157b4a569d7c0deed58c7ae9c728293 -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc --- win_installer/templates/update-deploy-tools.xml (.../update-deploy-tools.xml) (revision 962910eaa157b4a569d7c0deed58c7ae9c728293) +++ win_installer/templates/update-deploy-tools.xml (.../update-deploy-tools.xml) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -63,13 +63,12 @@ Deploy packaqe for ${signature} created. - Updating web.xml and MANIFEST.MF for lams-central.war, lams-monitor.war and lams-learning.war. - - - + + + @@ -87,16 +86,69 @@ - - + + + + + + - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + @@ -112,20 +164,19 @@ - - - - - - - - + + Updating web.xml and MANIFEST.MF for lams-central.war, lams-monitor.war and lams-learning.war. using config from ${build.deploy}/deploy.xml + + + + + + + + + + + \ No newline at end of file Index: win_installer/templates/update_lams_configuration.sql =================================================================== diff -u -r962910eaa157b4a569d7c0deed58c7ae9c728293 -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc --- win_installer/templates/update_lams_configuration.sql (.../update_lams_configuration.sql) (revision 962910eaa157b4a569d7c0deed58c7ae9c728293) +++ win_installer/templates/update_lams_configuration.sql (.../update_lams_configuration.sql) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) @@ -12,6 +12,10 @@ update lams_configuration set config_value='@WILDFIRE_PASS@' where config_key='XmppPassword'; update lams_user set login='@LAMS_USER@', password=sha1('@LAMS_PASS@') where user_id=1; update lams_user set locale_id=(select locale_id from lams_supported_locale where language_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', 1)) and country_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', -1))) where user_id=1; +update lams_user set locale_id=(select locale_id from lams_supported_locale where language_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', 1)) and country_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', -1))) where login='test1'; +update lams_user set locale_id=(select locale_id from lams_supported_locale where language_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', 1)) and country_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', -1))) where login='test2'; +update lams_user set locale_id=(select locale_id from lams_supported_locale where language_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', 1)) and country_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', -1))) where login='test3'; +update lams_user set locale_id=(select locale_id from lams_supported_locale where language_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', 1)) and country_iso_code=(SELECT SUBSTRING_INDEX('@LOCALE@', '_', -1))) where login='test4'; update lams_user set password=sha1('@LAMS_PASS@') where login='test1'; update lams_user set password=sha1('@LAMS_PASS@') where login='test2'; update lams_user set password=sha1('@LAMS_PASS@') where login='test3';