Index: win_installer/BUILD-InstallerUpdater.txt =================================================================== diff -u -r962910eaa157b4a569d7c0deed58c7ae9c728293 -rbda7def73cd2f11ef2e6ff2f3cc999aac6704fff --- win_installer/BUILD-InstallerUpdater.txt (.../BUILD-InstallerUpdater.txt) (revision 962910eaa157b4a569d7c0deed58c7ae9c728293) +++ win_installer/BUILD-InstallerUpdater.txt (.../BUILD-InstallerUpdater.txt) (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -20,28 +20,31 @@ deploy-ear deploy-tools copyfiles + + Also need to run the copy-jar target in the build.xml from lams_tool_deploy 3. Start LAMS, login as sysadmin/sysadmin, and delete the users 'test', 'mmm' - and 'lamskh01'. -4. Check out jsMath and run the build-war ant target -5. Run the dump-db and compile-java targets in the main build.xml file -6. Compile src/lams-start.nsi and src/lams-stop.nsi -7. Make sure you have all the latest language files in your lams workspace, you + and 'lamskh01'. +4. Delete the SMPTServer entry from the lams_configuration table +5. Check out jsMath and run the build-war ant target +6. Run the dump-db and compile-java targets in the main build.xml file +7. Compile src/lams-start.nsi and src/lams-stop.nsi +8. Make sure you have all the latest language files in your lams workspace, you can do this by simply synchronising and updating with the CVS repository -8. (In updater.nsi) Put the date that you want for the language pack at this line +9. (In updater.nsi) Put the date that you want for the language pack at this line (around line 52): !define VERSION "2006-20-12" (example) Make sure it is in the form "yyyy-mm-dd" -9. In updateLocales.sql, you must alter it to insert the required rows in the +10. In updateLocales.sql, you must alter it to insert the required rows in the database. Update updateLocales.sql, so that every language to be supported by the current version is in the list An example line is below: INSERT INTO locale_temp (language_iso_code, country_iso_code, description, direction, combined) VALUES ('pt','BR','Portugu�s (Brasil)','LTR','pt,BR'); -10.In updateLocales.sql change the date to the date of this language pack at +11.In updateLocales.sql change the date to the date of this language pack at the line: UPDATE lams_configuration set DictionaryDateCreated("2006-12-20"); (example) -11.Put in the timestamp for the version number and the version number fields in +12.Put in the timestamp for the version number and the version number fields in updater.nsi (around line 51) -12.Compile src/updater.nsi +13.Compile src/updater.nsi Index: win_installer/backup.txt =================================================================== diff -u --- win_installer/backup.txt (revision 0) +++ win_installer/backup.txt (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -0,0 +1,3 @@ +Please go to: +http://wiki.lamsfoundation.org/display/lamsdocs/Revert+To+Windows+Updater+Backup +For instructions on how to revert to an older version from a backup \ No newline at end of file Index: win_installer/src/backup.ini =================================================================== diff -u --- win_installer/src/backup.ini (revision 0) +++ win_installer/src/backup.ini (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -0,0 +1,20 @@ +[Settings] +NumFields=2 +CancelShow=0 +BackEnabled=0 +NextButtonText=Run Backup + +[Field 1] +Type=DirRequest +Left=69 +Top=62 +Right=219 +Bottom=72 + +[Field 2] +Type=Label +Left=69 +Top=38 +Right=229 +Bottom=63 +Text=Please enter or browse for a location to backup your LAMS directory\r\n\r\nl Index: win_installer/src/backup.nsh =================================================================== diff -u --- win_installer/src/backup.nsh (revision 0) +++ win_installer/src/backup.nsh (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -0,0 +1,159 @@ +;---------------------------------------------------------------------------- +; 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. +;---------------------------------------------------------------------------- +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 + + +# http://nsis.sourceforge.net/StrStr +# +!define StrStr "!insertmacro StrStr" + +!macro StrStr ResultVar String SubString + Push `${String}` + Push `${SubString}` + Call StrStr + Pop `${ResultVar}` +!macroend +Function StrStr +/*After this point: + ------------------------------------------ + $R0 = SubString (input) + $R1 = String (input) + $R2 = SubStringLen (temp) + $R3 = StrLen (temp) + $R4 = StartCharPos (temp) + $R5 = TempStr (temp)*/ + + ;Get input from user + Exch $R0 + Exch + Exch $R1 + Push $R2 + Push $R3 + Push $R4 + Push $R5 + + ;Get "String" and "SubString" length + StrLen $R2 $R0 + StrLen $R3 $R1 + ;Start "StartCharPos" counter + StrCpy $R4 0 + + ;Loop until "SubString" is found or "String" reaches its end + ${Do} + ;Remove everything before and after the searched part ("TempStr") + StrCpy $R5 $R1 $R2 $R4 + + ;Compare "TempStr" with "SubString" + ${IfThen} $R5 == $R0 ${|} ${ExitDo} ${|} + ;If not "SubString", this could be "String"'s end + ${IfThen} $R4 >= $R3 ${|} ${ExitDo} ${|} + ;If not, continue the loop + IntOp $R4 $R4 + 1 + ${Loop} + +/*After this point: + ------------------------------------------ + $R0 = ResultVar (output)*/ + + ;Remove part before "SubString" on "String" (if there has one) + StrCpy $R0 $R1 `` $R4 + + ;Return output to user + Pop $R5 + Pop $R4 + Pop $R3 + Pop $R2 + Pop $R1 + Exch $R0 +FunctionEnd \ No newline at end of file Index: win_installer/src/backup.nsi =================================================================== diff -u --- win_installer/src/backup.nsi (revision 0) +++ win_installer/src/backup.nsi (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -0,0 +1,204 @@ +/**************************************************************** + * Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + * Coded by Luke Foxton (lfoxton@melcoe.mq.edu.au) + */ + +# includes +!include "MUI.nsh" +!include "LogicLib.nsh" +!include "backup.nsh" + +#defines +!define REG_HEAD "Software\LAMS Foundation\LAMSv2" +!define MUI_ICON "..\graphics\lams2.ico" + +# Installer attributes +Name "LAMS Backup Utility" +BrandingText "LAMS Backup Utility" +OutFile "..\build\lams-backup.exe" +InstallDir "C:\lams" +Icon ..\graphics\lams2.ico +InstallDirRegKey HKLM "${REG_HEAD}" "" +VIProductVersion 2.0.0.0 +VIAddVersionKey ProductName "LAMS Backup Utility" +VIAddVersionKey ProductVersion "1.0" +VIAddVersionKey CompanyName "LAMS International" +VIAddVersionKey CompanyWebsite "lamscommunity.org" +VIAddVersionKey FileVersion "" +VIAddVersionKey FileDescription "" +VIAddVersionKey LegalCopyright "" + +!define MUI_FINISHPAGE_TEXT "LAMS has been successfully backed up on your computer" + +# set warning when cancelling install +!define MUI_ABORTWARNING +Page custom PreBackupDir PostBackupDir +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_LANGUAGE "English" + + + +# variables +Var DB_NAME +Var DB_USER +Var DB_PASS +Var MYSQL_DIR +Var BACKUP_DIR + + +ReserveFile "backup.ini" + + +Section backup + ;make the section compulsory + SectionIn RO + setoutpath $BACKUP_DIR + file "..\backup.txt" + clearerrors + DetailPrint "Backing up lams at: $BACKUP_DIR. This may take a few minutes" + SetDetailsPrint listonly + createdirectory $BACKUP_DIR + copyfiles /SILENT $INSTDIR $BACKUP_DIR + SetDetailsPrint both + iferrors error1 continue1 + error1: + DetailPrint "Backup failed" + MessageBox MB_OK|MB_ICONSTOP "LAMS backup to $BACKUP_DIR failed. Check that all other applications are closed and LAMS is not running." + Abort + continue1: + + DetailPrint 'Dumping database to: $BACKUP_DIR' + setoutpath "$BACKUP_DIR" + Strcpy $4 '"$MYSQL_DIR\bin\mysqldump" -r "$BACKUP_DIR\dump.sql" $DB_NAME -u $DB_USER -p$DB_PASS' + DetailPrint $4 + nsExec::ExecToStack $4 + Pop $0 + Pop $1 + ${If} $0 == "yes" + goto error + ${EndIf} + + goto done + error: + DetailPrint "Database dump failed" + MessageBox MB_OK|MB_ICONSTOP "Database dump failed $\r$\nError:$\r$\n$\r$\n$1" + Abort "Database dump failed" + + done: + +SectionEnd + +Function .onInit + ReadRegStr $INSTDIR HKLM "${REG_HEAD}" "dir_inst" + ReadRegStr $DB_NAME HKLM "${REG_HEAD}" "db_name" + ReadRegStr $DB_USER HKLM "${REG_HEAD}" "db_user" + ReadRegStr $DB_PASS HKLM "${REG_HEAD}" "db_pass" + ReadRegStr $MYSQL_DIR HKLM "${REG_HEAD}" "dir_mysql" + call CheckMySQL + + 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) + + strlen $7 $0 + ${if} $7 == 1 + strcpy $0 "0$0" + ${endif} + + strlen $7 $1 + ${if} $7 == 1 + strcpy $1 "0$1" + ${endif} + + strlen $7 $4 + ${if} $7 == 1 + strcpy $4 "0$4" + ${endif} + + strlen $7 $5 + ${if} $7 == 1 + strcpy $1 "0$5" + ${endif} + + + strcpy $BACKUP_DIR "$INSTDIR-$2$1$0$4$5.bak" + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "backup.ini" +FunctionEnd + +Function PreBackupDir + !insertmacro MUI_INSTALLOPTIONS_WRITE "backup.ini" "Field 1" "State" "$BACKUP_DIR" + !insertmacro MUI_HEADER_TEXT "LAMS Backup Dir" "Enter a directory in the space provided" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "backup.ini" +FunctionEnd + +Function PostBackupDir + !insertmacro MUI_INSTALLOPTIONS_READ $BACKUP_DIR "backup.ini" "Field 1" "State" + ${if} $BACKUP_DIR == "" + MessageBox MB_OK|MB_ICONEXCLAMATION "The directory entered is not valid: $\r$\n$BACKUP_DIR" + Abort + ${endif} + + iffileexists $BACKUP_DIR exists continue + iffileexists "$BACKUP_DIR\*" exists continue + + goto continue + exists: + MessageBox MB_OK|MB_ICONEXCLAMATION "The file name for the directory entered is already in use: $\r$\n$BACKUP_DIR" + continue: +FunctionEnd + +Function CheckMySQL + # Checking if the given database name already exists in the mysql database list + ifFileExists "$MYSQL_DIR\data\$DB_NAME\*.*" continue NoDatabaseNameExists + NoDatabaseNameExists: + MessageBox MB_OK|MB_ICONSTOP "Could not find database $DB_NAME. Please check your database settings and try again" + quit + continue: + + # check mysql version is 5.0.x + nsExec::ExecToStack '$MYSQL_DIR\bin\mysqladmin --version' + Pop $0 + Pop $1 + ${If} $1 == "" ; if mySQL install directory field is empty, do not continue + MessageBox MB_OK|MB_ICONSTOP "Your MySQL directory does not appear to be valid, please enter a valid MySQL directory before continuing.$\r$\n$\r$\n$1" + Abort + ${EndIf} + + ${StrStr} $0 $1 "5.0" + + ${If} $0 == "" ; if not 5.0.x, check 5.1.x + ${StrStr} $0 $1 "5.1" + ${If} $0 == "" + MessageBox MB_OK|MB_ICONSTOP "Your MySQL version does not appear to be compatible with LAMS (5.0.x or 5.1.x): $\r$\n$\r$\n$1" + MessageBox MB_OK|MB_ICONSTOP "Your MySQL directory does not appear to be valid, please enter a valid MySQL directory before continuing.$\r$\n$\r$\n$1" + Abort + ${endif} + ${EndIf} +FunctionEnd + + Index: win_installer/src/revert-dir.ini =================================================================== diff -u --- win_installer/src/revert-dir.ini (revision 0) +++ win_installer/src/revert-dir.ini (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -0,0 +1,33 @@ +[Settings] +NumFields=4 +NextButtonText=Run Revert + +[Field 1] +Type=Label +Left=25 +Top=44 +Right=86 +Bottom=55 +Text=LAMS backup dir: + +[Field 2] +Type=DirRequest +Left=86 +Top=42 +Right=261 +Bottom=55 + +[Field 3] +Type=DirRequest +Left=85 +Top=78 +Right=261 +Bottom=91 + +[Field 4] +Type=Label +Left=25 +Top=79 +Right=86 +Bottom=89 +Text=LAMS revert dir: Index: win_installer/src/revert.nsi =================================================================== diff -u --- win_installer/src/revert.nsi (revision 0) +++ win_installer/src/revert.nsi (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -0,0 +1,201 @@ +/**************************************************************** + * Copyright (C) 2006 LAMS Foundation (http://lamsfoundation.org) + * ============================================================= + * License Information: http://lamsfoundation.org/licensing/lams/2.0/ + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2.0 + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 * USA + * + * http://www.gnu.org/licenses/gpl.txt + * **************************************************************** + * Coded by Luke Foxton (lfoxton@melcoe.mq.edu.au) + */ + +# includes +!include "MUI.nsh" +!include "LogicLib.nsh" +!include "backup.nsh" + +#defines +!define REG_HEAD "Software\LAMS Foundation\LAMSv2" +!define MUI_ICON "..\graphics\lams2.ico" + +# Installer attributes +Name "LAMS Backup Utility" +BrandingText "LAMS Backup Utility" +OutFile "..\build\lams-backup.exe" +InstallDir "C:\lams" +Icon ..\graphics\lams2.ico +InstallDirRegKey HKLM "${REG_HEAD}" "" +VIProductVersion 2.0.0.0 +VIAddVersionKey ProductName "LAMS Backup Utility" +VIAddVersionKey ProductVersion "1.0" +VIAddVersionKey CompanyName "LAMS International" +VIAddVersionKey CompanyWebsite "lamscommunity.org" +VIAddVersionKey FileVersion "" +VIAddVersionKey FileDescription "" +VIAddVersionKey LegalCopyright "" + +!define MUI_FINISHPAGE_TEXT "LAMS has been successfully backed up on your computer" + +# set warning when cancelling install +!define MUI_ABORTWARNING +Page custom PreRevertDir PostRevertDir +!insertmacro MUI_PAGE_INSTFILES +!insertmacro MUI_PAGE_FINISH +!insertmacro MUI_LANGUAGE "English" + + +# variables +Var DB_NAME +Var DB_USER +Var DB_PASS +Var MYSQL_DIR +Var BACKUP_DIR + + +ReserveFile "revert.ini" + + +Section backup + ;make the section compulsory + SectionIn RO + setoutpath $BACKUP_DIR + file "..\backup.txt" + clearerrors + DetailPrint "Backing up lams at: $BACKUP_DIR. This may take a few minutes" + SetDetailsPrint listonly + createdirectory $BACKUP_DIR + copyfiles /SILENT $INSTDIR $BACKUP_DIR + SetDetailsPrint both + iferrors error1 continue1 + error1: + DetailPrint "Backup failed" + MessageBox MB_OK|MB_ICONSTOP "LAMS backup to $BACKUP_DIR failed. Check that all other applications are closed and LAMS is not running." + Abort + continue1: + + DetailPrint 'Dumping database to: $BACKUP_DIR' + setoutpath "$BACKUP_DIR" + Strcpy $4 '"$MYSQL_DIR\bin\mysqldump" -r "$BACKUP_DIR\dump.sql" $DB_NAME -u $DB_USER -p$DB_PASS' + DetailPrint $4 + nsExec::ExecToStack $4 + Pop $0 + Pop $1 + ${If} $0 == "yes" + goto error + ${EndIf} + + goto done + error: + DetailPrint "Database dump failed" + MessageBox MB_OK|MB_ICONSTOP "Database dump failed $\r$\nError:$\r$\n$\r$\n$1" + Abort "Database dump failed" + + done: + +SectionEnd + +Function .onInit + ReadRegStr $INSTDIR HKLM "${REG_HEAD}" "dir_inst" + ReadRegStr $DB_NAME HKLM "${REG_HEAD}" "db_name" + ReadRegStr $DB_USER HKLM "${REG_HEAD}" "db_user" + ReadRegStr $DB_PASS HKLM "${REG_HEAD}" "db_pass" + ReadRegStr $MYSQL_DIR HKLM "${REG_HEAD}" "dir_mysql" + call CheckMySQL + + 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) + + strlen $7 $0 + ${if} $7 == 1 + strcpy $0 "0$0" + ${endif} + + strlen $7 $1 + ${if} $7 == 1 + strcpy $1 "0$1" + ${endif} + + strlen $7 $4 + ${if} $7 == 1 + strcpy $4 "0$4" + ${endif} + + strlen $7 $5 + ${if} $7 == 1 + strcpy $1 "0$5" + ${endif} + + + strcpy $BACKUP_DIR "$INSTDIR-$2$1$0$4$5.bak" + + !insertmacro MUI_INSTALLOPTIONS_EXTRACT "backup.ini" +FunctionEnd + +Function PreRevertDir + !insertmacro MUI_INSTALLOPTIONS_WRITE "backup.ini" "Field 1" "State" "$BACKUP_DIR" + !insertmacro MUI_HEADER_TEXT "Revert to Earlier LAMS Installation" "Enter the backup dir, and trhe" + !insertmacro MUI_INSTALLOPTIONS_DISPLAY "backup.ini" +FunctionEnd + +Function PostRevertDir + !insertmacro MUI_INSTALLOPTIONS_READ $BACKUP_DIR "backup.ini" "Field 1" "State" + ${if} $BACKUP_DIR == "" + MessageBox MB_OK|MB_ICONEXCLAMATION "The directory entered is not valid: $\r$\n$BACKUP_DIR" + Abort + ${endif} + + iffileexists $BACKUP_DIR exists continue + iffileexists "$BACKUP_DIR\*" exists continue + + goto continue + exists: + MessageBox MB_OK|MB_ICONEXCLAMATION "The file name for the directory entered is already in use: $\r$\n$BACKUP_DIR" + continue: +FunctionEnd + +Function CheckMySQL + # Checking if the given database name already exists in the mysql database list + ifFileExists "$MYSQL_DIR\data\$DB_NAME\*.*" continue NoDatabaseNameExists + NoDatabaseNameExists: + MessageBox MB_OK|MB_ICONSTOP "Could not find database $DB_NAME. Please check your database settings and try again" + quit + continue: + + # check mysql version is 5.0.x + nsExec::ExecToStack '$MYSQL_DIR\bin\mysqladmin --version' + Pop $0 + Pop $1 + ${If} $1 == "" ; if mySQL install directory field is empty, do not continue + MessageBox MB_OK|MB_ICONSTOP "Your MySQL directory does not appear to be valid, please enter a valid MySQL directory before continuing.$\r$\n$\r$\n$1" + Abort + ${EndIf} + + ${StrStr} $0 $1 "5.0" + + ${If} $0 == "" ; if not 5.0.x, check 5.1.x + ${StrStr} $0 $1 "5.1" + ${If} $0 == "" + MessageBox MB_OK|MB_ICONSTOP "Your MySQL version does not appear to be compatible with LAMS (5.0.x or 5.1.x): $\r$\n$\r$\n$1" + MessageBox MB_OK|MB_ICONSTOP "Your MySQL directory does not appear to be valid, please enter a valid MySQL directory before continuing.$\r$\n$\r$\n$1" + Abort + ${endif} + ${EndIf} +FunctionEnd \ No newline at end of file Index: win_installer/src/updateLocales.sql =================================================================== diff -u -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc -rbda7def73cd2f11ef2e6ff2f3cc999aac6704fff --- win_installer/src/updateLocales.sql (.../updateLocales.sql) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) +++ win_installer/src/updateLocales.sql (.../updateLocales.sql) (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -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-08' WHERE config_key='DictionaryDateCreated'; +UPDATE lams_configuration set config_value='2007-03-21' WHERE config_key='DictionaryDateCreated'; drop table if exists locale_temp; Index: win_installer/src/updater.nsi =================================================================== diff -u -r0d5c283e08ff6870153904ec7e0db368fbdaf322 -rbda7def73cd2f11ef2e6ff2f3cc999aac6704fff --- win_installer/src/updater.nsi (.../updater.nsi) (revision 0d5c283e08ff6870153904ec7e0db368fbdaf322) +++ win_installer/src/updater.nsi (.../updater.nsi) (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -48,10 +48,11 @@ !insertmacro LineFind # constants -!define VERSION "2.0.1" -!define LANGUAGE_PACK_VERSION "2007-03-08" -!define LANGUAGE_PACK_VERSION_INT "20070308" -!define DATE_TIME_STAMP "200703081600" +!define VERSION "2.0.2" +!define PREVIOUS_VERSION "2.0.1" +!define LANGUAGE_PACK_VERSION "2007-03-21" +!define LANGUAGE_PACK_VERSION_INT "20070321" +!define DATE_TIME_STAMP "200703211600" !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 @@ -170,7 +171,7 @@ ############################## # installer sections -SectionGroup "LAMS 2.0.1 Update (Requires LAMS 2.0)" update +SectionGroup "LAMS ${VERSION} Update (Requires LAMS 2.0)" update Section "!lamsCore" lamsCore ${if} $IS_UPDATE == "1" @@ -180,10 +181,17 @@ call backupLams ; removing temporary jboss files + clearerrors 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" + iferrors error continue + error: + MessageBox MB_OKCANCEL|MB_ICONQUESTION "Could not remove all of LAMS temporary files. Check all other programs are closed and LAMS is not running $\r$\n$\r$\n If you have just shutdown LAMS then LAMS may still be shutting down - please cancel the installation and then wait for a minute and try to run the installer again. If this problem reoccurs, please delete the following directories manually:$\r$\n$INSTDIR\jboss-4.0.2\server\default\work\jboss.web\localhost $\r$\n$INSTDIR\jboss-4.0.2\server\default\tmp $\r$\n$\r$\nClick ok to continue or cancel to stop installation" IDOK continue IDCANCEL cancel + cancel: + Abort + continue: ; setting up ant call setupant @@ -252,7 +260,7 @@ SectionGroupEnd -SectionGroup "LAMS 2.0.1 Full Install" fullInstall +SectionGroup "LAMS ${VERSION} Full Install" fullInstall Section "JBoss 4.0.2" jboss ${if} $IS_UPDATE == "0" DetailPrint "Setting up JBoss 4.0.2" @@ -375,9 +383,15 @@ ${orif} $1 == 1 MessageBox MB_OK|MB_ICONSTOP "You already have LAMS $0 Installed on your computer." Abort + ${elseif} $0 == ${PREVIOUS_VERSION} + # This is the correct version to update to + strcpy $IS_UPDATE "1" + ${elseif} $0 == "2.0" + # !!!!!!!!!!!!!THIS BLOCK IS ONLY FOR 2.0.2 UPDATER !!!!!!!!!!!!!!!! + strcpy $IS_UPDATE "1" ${else} - # Version to be installed is newer than the current - strcpy $IS_UPDATE "1" + MessageBox MB_OK|MB_ICONSTOP "Your existing version of LAMS ($0) is not compatible with this update. $\r$\n$\r$\nPlease update to LAMS-${PREVIOUS_VERSION} before running this update." + Abort ${endif} ${endif} @@ -415,9 +429,16 @@ Delete "$TEMP\LocalPortScanner.class" # Reading the registry values + Detailprint "Reading existing LAMS data from registry" call readRegistry + # clearing the update-logs directory + Detailprint "Removing existing update logs" + rmdir /r "$INSTDIR\update-logs" + + + SectionSetSize ${jboss} 0 SectionSetSize ${lams} 0 SectionSetSize ${service} 0 @@ -460,25 +481,76 @@ Function CheckJava # check for JDK - ReadRegStr $JDK_DIR HKLM "SOFTWARE\JavaSoft\Java Development Kit\1.6" "JavaHome" ${If} $JDK_DIR == "" - ReadRegStr $JDK_DIR HKLM "SOFTWARE\JavaSoft\Java Development Kit\1.5" "JavaHome" - ${if} $JDK_DIR == "" - MessageBox MB_OK|MB_ICONSTOP "Could not find a Java JDK 1.5 or 1.6 installation. Please ensure you have JDK 1.5 or 1.6 installed." + ReadRegStr $JDK_DIR HKLM "SOFTWARE\JavaSoft\Java Development Kit\1.6" "JavaHome" + ${If} $JDK_DIR == "" + ReadRegStr $JDK_DIR HKLM "SOFTWARE\JavaSoft\Java Development Kit\1.5" "JavaHome" + ${if} $JDK_DIR == "" + MessageBox MB_OK|MB_ICONSTOP "Could not find a Java JDK 1.5 or 1.6 installation. Please ensure you have JDK 1.5 or 1.6 installed." + ${EndIf} ${EndIf} + ${endif} + + # check java version using given dir + nsExec::ExecToStack '$JDK_DIR\bin\javac -version' + Pop $0 + Pop $1 + ${StrStr} $0 $1 "1.6" + ${If} $0 == "" + ${StrStr} $0 $1 "1.5" + ${If} $0 == "" + MessageBox MB_OK|MB_ICONEXCLAMATION "Could not verify Java JDK 1.5, or JDK 1.6. Please check your JDK directory." + ${if} $IS_UPDATE == "0" + Abort + ${else} + quit + ${endif} + ${EndIf} ${EndIf} FunctionEnd Function CheckMySQL # check for MySQL - ReadRegStr $MYSQL_DIR HKLM "SOFTWARE\MySQL AB\MySQL Server 5.0" "Location" + ;ReadRegStr $MYSQL_DIR HKLM "SOFTWARE\MySQL AB\MySQL Server 5.0" "Location" ${If} $MYSQL_DIR == "" ReadRegStr $MYSQL_DIR HKLM "SOFTWARE\MySQL AB\MySQL Server 5.1" "Location" ${If} $MYSQL_DIR == "" - MessageBox MB_OK|MB_ICONSTOP "Could not find a MySQL installation. Please ensure you have MySQL 5.0 or 5.1 installed." + ReadRegStr $MYSQL_DIR HKLM "SOFTWARE\MySQL AB\MySQL Server 5.0" "Location" + ${If} $MYSQL_DIR == "" + MessageBox MB_OK|MB_ICONSTOP "Could not find a MySQL installation. Please ensure you have MySQL 5.0 or 5.1 installed." + + ${EndIf} + ${endif} + ${else} + # check mysql version is 5.0.x + nsExec::ExecToStack '$MYSQL_DIR\bin\mysqladmin --version' + Pop $0 + Pop $1 + ${If} $1 == "" ; if mySQL install directory field is empty, do not continue + MessageBox MB_OK|MB_ICONSTOP "Your MySQL directory does not appear to be valid, please enter a valid MySQL directory before continuing.$\r$\n$\r$\n$1" + ${if} $IS_UPDATE == "0" + Abort + ${else} + quit + ${endif} ${EndIf} + ${StrStr} $0 $1 "5.0" + ${If} $0 == "" ; if not 5.0.x, check 5.1.x + ${StrStr} $0 $1 "5.1" + ${If} $0 == "" + MessageBox MB_OK|MB_ICONSTOP "Your MySQL version does not appear to be compatible with LAMS (5.0.x or 5.1.x): $\r$\n$\r$\n$1" + MessageBox MB_OK|MB_ICONSTOP "Your MySQL directory does not appear to be valid, please enter a valid MySQL directory before continuing.$\r$\n$\r$\n$1" + ${if} $IS_UPDATE == "0" + Abort + ${else} + quit + ${endif} + ${EndIf} + ${EndIf} + ${EndIf} + FunctionEnd Function PreComponents @@ -487,13 +559,13 @@ !insertmacro MUI_INSTALLOPTIONS_WRITE "lams_components.ini" "Field 1" "Text" "- JBoss 4.0.2" !insertmacro MUI_INSTALLOPTIONS_WRITE "lams_components.ini" "Field 2" "Text" "- LAMS ${VERSION} Core" !insertmacro MUI_INSTALLOPTIONS_WRITE "lams_components.ini" "Field 3" "Text" "- Install LAMS as a service" - !insertmacro MUI_HEADER_TEXT "LAMS 2.0.1 Components" "No installation of LAMS 2.0 was found on your computer. A full 2.0.1 installation required to run LAMS" + !insertmacro MUI_HEADER_TEXT "LAMS ${VERSION} Components" "No installation of LAMS 2.0 was found on your computer. A full ${VERSION} installation required to run LAMS" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "lams_components.ini" ${else} !insertmacro MUI_INSTALLOPTIONS_WRITE "lams_components.ini" "Field 4" "Text" "LAMS ${VERSION} Update" !insertmacro MUI_INSTALLOPTIONS_WRITE "lams_components.ini" "Field 1" "Text" "- LAMS ${VERSION} Core" !insertmacro MUI_INSTALLOPTIONS_WRITE "lams_components.ini" "Field 2" "Text" "- LAMS ${VERSION} Tools" - !insertmacro MUI_HEADER_TEXT "LAMS 2.0.1 Components" "Lams 2.0 is installed. Proceeding with update to 2.0.1" + !insertmacro MUI_HEADER_TEXT "LAMS ${VERSION} Components" "Lams 2.0 is installed. Proceeding with update to ${VERSION}" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "lams_components.ini" ${endif} FunctionEnd @@ -579,7 +651,7 @@ continue1: ${else} # Checking if the given database name already exists in the mysql database list - ifFileExists "$MYSQL_DIRdata\$DB_NAME\*.*" continue NoDatabaseNameExists + ifFileExists "$MYSQL_DIR\data\$DB_NAME\*.*" continue NoDatabaseNameExists NoDatabaseNameExists: MessageBox MB_OK|MB_ICONSTOP "Could not find database $DB_NAME. Please check your database settings and try again" quit @@ -643,7 +715,6 @@ quit ${endif} ${EndIf} - FunctionEnd @@ -820,9 +891,11 @@ # Extract the ant scripts SetOutPath "$TEMP\lams" + File "..\templates\update-deploy-tools.xml" # use Ant to write config to files + clearerrors FileOpen $0 "$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat" w IfErrors 0 +2 goto error @@ -834,7 +907,7 @@ error: DetailPrint "Error setting up ant" MessageBox MB_OK|MB_ICONSTOP "Error setting up ant " - Abort "Error setting up ant" + Abort "Lams configuration failed" done: Functionend @@ -843,6 +916,7 @@ ; Backs up existing lams installation Function backupLams + clearerrors iffileexists "$INSTDIR-$TIMESTAMP.bak\*.*" backupExists continue backupExists: DetailPrint "Lams backup failed" @@ -852,10 +926,15 @@ DetailPrint "Backing up lams at: $INSTDIR-$TIMESTAMP.bak. This may take a few minutes" SetDetailsPrint listonly - copyfiles /SILENT $INSTDIR $INSTDIR-$TIMESTAMP.bak 95000 + copyfiles /SILENT $INSTDIR $INSTDIR-$TIMESTAMP.bak 86000 SetDetailsPrint both + iferrors error1 continue1 + error1: + DetailPrint "Backup failed" + MessageBox MB_OK|MB_ICONSTOP "LAMS backup to $INSTDIR-$TIMESTAMP.bak failed. Check that all other applications are closed and LAMS is not running." + Abort + continue1: - DetailPrint 'Dumping database to: $INSTDIR-$TIMESTAMP.bak' setoutpath "$INSTDIR-$TIMESTAMP.bak" Strcpy $4 '"$MYSQL_DIR\bin\mysqldump" -r "$INSTDIR-$TIMESTAMP.bak\dump.sql" $DB_NAME -u $DB_USER -p$DB_PASS' @@ -866,12 +945,13 @@ ${If} $0 == "yes" goto error ${EndIf} - + goto done error: DetailPrint "Database dump failed" MessageBox MB_OK|MB_ICONSTOP "Database dump failed $\r$\nError:$\r$\n$\r$\n$1" Abort "Database dump failed" + done: FunctionEnd @@ -886,8 +966,100 @@ ; Updating lams-central.war Function updateLamsCentral - SetoutPath "$INSTDIR\jboss-4.0.2\server\default\deploy\lams.ear\lams-central.war" + strcpy $0 "$INSTDIR\jboss-4.0.2\server\default\deploy\lams.ear\lams-central.war" + SetoutPath $0 File /r "..\assembly\lams.ear\lams-central.war\*" + + ;removing all the unwanted cvs diorectories from the mistake in 2.0.1 updater + Detailprint "Removing CVS folders from lams-central.war" + rmdir /r "$0\CVS" + rmdir /r "$0\css\CVS" + rmdir /r "$0\development\CVS" + rmdir /r "$0\errorpages\CVS" + rmdir /r "$0\fckeditor\CVS" + rmdir /r "$0\fckeditor\editor\CVS" + rmdir /r "$0\fckeditor\editor\_source\CVS" + rmdir /r "$0\fckeditor\editor\_source\classes\CVS" + rmdir /r "$0\fckeditor\editor\_source\commandclasses\CVS" + rmdir /r "$0\fckeditor\editor\_source\internals\CVS" + rmdir /r "$0\fckeditor\editor\css\CVS" + rmdir /r "$0\fckeditor\editor\css\behaviors\CVS" + rmdir /r "$0\fckeditor\editor\css\images\CVS" + rmdir /r "$0\fckeditor\editor\dialog\CVS" + rmdir /r "$0\fckeditor\editor\dialog\common\CVS" + rmdir /r "$0\fckeditor\editor\dialog\common\images\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_about\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_docprops\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_flash\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_image\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_link\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_select\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_spellerpages\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_spellerpages\spellerpages\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_spellerpages\spellerpages\server-scripts\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_template\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_template\images\CVS" + rmdir /r "$0\fckeditor\editor\dialog\fck_universalkey\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\asp\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\aspx\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\cfm\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\lasso\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\perl\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\php\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\connectors\py\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\images\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\images\icons\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\images\icons\32\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\browser\default\js\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\upload\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\upload\asp\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\upload\aspx\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\upload\cfm\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\upload\lasso\CVS" + rmdir /r "$0\fckeditor\editor\filemanager\upload\php\CVS" + rmdir /r "$0\fckeditor\editor\images\CVS" + rmdir /r "$0\fckeditor\editor\images\smiley\CVS" + rmdir /r "$0\fckeditor\editor\images\smiley\msn\CVS" + rmdir /r "$0\fckeditor\editor\js\CVS" + rmdir /r "$0\fckeditor\editor\lang\CVS" + rmdir /r "$0\fckeditor\editor\plugins\CVS" + rmdir /r "$0\fckeditor\editor\plugins\autogrow\CVS" + rmdir /r "$0\fckeditor\editor\plugins\placeholder\CVS" + rmdir /r "$0\fckeditor\editor\plugins\placeholder\lang\CVS" + rmdir /r "$0\fckeditor\editor\plugins\simplecommands\CVS" + rmdir /r "$0\fckeditor\editor\plugins\tablecommands\CVS" + rmdir /r "$0\fckeditor\editor\skins\CVS" + rmdir /r "$0\fckeditor\editor\skins\default\CVS" + rmdir /r "$0\fckeditor\editor\skins\default\images\CVS" + rmdir /r "$0\fckeditor\editor\skins\office2003\CVS" + rmdir /r "$0\fckeditor\editor\skins\office2003\images\CVS" + rmdir /r "$0\fckeditor\editor\skins\silver\CVS" + rmdir /r "$0\fckeditor\editor\skins\silver\images\CVS" + rmdir /r "$0\flashxml\CVS" + rmdir /r "$0\flashxml\authoring\CVS" + rmdir /r "$0\flashxml\learner\CVS" + rmdir /r "$0\flashxml\monitoring\CVS" + rmdir /r "$0\flashxml\wizard\CVS" + rmdir /r "$0\images\CVS" + rmdir /r "$0\images\css\CVS" + rmdir /r "$0\images\license\CVS" + rmdir /r "$0\includes\CVS" + rmdir /r "$0\includes\javascript\CVS" + rmdir /r "$0\META-INF\CVS" + rmdir /r "$0\toolcontent\CVS" + rmdir /r "$0\WEB-INF\CVS" + rmdir /r "$0\WEB-INF\attachments\CVS" + rmdir /r "$0\WEB-INF\jstl\CVS" + rmdir /r "$0\WEB-INF\jstl\tlds\CVS" + rmdir /r "$0\WEB-INF\struts\CVS" + rmdir /r "$0\WEB-INF\struts\tlds\CVS" + rmdir /r "$0\WEB-INF\tags\CVS" + rmdir /r "$0\WEB-INF\tiles\CVS" + FunctionEnd ; Updating lams-www.war @@ -896,7 +1068,7 @@ File "..\assembly\lams.ear\lams-www.war\images\learner.logo.swf" SetoutPath "$INSTDIR\jboss-4.0.2\server\default\deploy\lams.ear\lams-www.war\" - File "..\templates\news.html" + File "..\..\lams_www\web\news.html" FunctionEnd @@ -925,70 +1097,72 @@ ${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 - IfErrors 0 +2 - goto error - - # convert '\' to '/' for Ant's benefit - Push $TEMP - Push "\" - Call StrSlash - Pop $2 - FileWrite $0 "temp=$2/$\r$\n" - - Push $INSTDIR - Push "\" - Call StrSlash - Pop $2 - - FileWrite $0 "instdir=$2/$\r$\n" - FileWrite $0 "db.name=$DB_NAME$\r$\n" - FileWrite $0 "db.username=$DB_USER$\r$\n" - FileWrite $0 "db.password=$DB_PASS$\r$\n" - FileWrite $0 "db.Driver=com.mysql.jdbc.Driver$\r$\n" - FileWrite $0 "db.url=jdbc:mysql://localhost/$${db.name}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useUnicode=true$\r$\n" - FileWrite $0 "jboss.deploy=$${instdir}/jboss-4.0.2/server/default/deploy/lams.ear/$\r$\n" - Fileclose $0 - IfErrors 0 +2 - goto error - - # Copying the core sql update scriptes to $TEMP/lams/sql - setoutpath "$TEMP\lams\sql" - file "..\..\lams_common\db\sql\updatescripts\*.sql" + ReadRegStr $0 HKLM "${REG_HEAD}" "version" - setoutpath "$TEMP\lams\" - file "..\templates\update-core-database.xml" + ${if} $0 == "2.0" + # generate a properties file + ClearErrors + FileOpen $0 $TEMP\lams\core.properties w + IfErrors 0 +2 + goto error + + # convert '\' to '/' for Ant's benefit + Push $TEMP + Push "\" + Call StrSlash + Pop $2 + FileWrite $0 "temp=$2/$\r$\n" + + Push $INSTDIR + Push "\" + Call StrSlash + Pop $2 + + FileWrite $0 "instdir=$2/$\r$\n" + FileWrite $0 "db.name=$DB_NAME$\r$\n" + FileWrite $0 "db.username=$DB_USER$\r$\n" + FileWrite $0 "db.password=$DB_PASS$\r$\n" + FileWrite $0 "db.Driver=com.mysql.jdbc.Driver$\r$\n" + FileWrite $0 "db.url=jdbc:mysql://localhost/$${db.name}?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useUnicode=true$\r$\n" + FileWrite $0 "jboss.deploy=$${instdir}/jboss-4.0.2/server/default/deploy/lams.ear/$\r$\n" - - # Running the ant scripts to create deploy.xml for the normal tools - strcpy $0 '"$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat" -logfile "$INSTDIR\update-logs\ant-update-core-database.log" -buildfile "$TEMP\lams\update-core-database.xml" update-core-database' - DetailPrint $0 - nsExec::ExecToStack $0 - Pop $0 ; return code, 0=success, error=fail - Pop $1 ; console output - ${if} $0 == "error" - ${orif} $0 == 1 - goto error - ${endif} - DetailPrint "Result: $1" + Fileclose $0 + IfErrors 0 +2 + goto error + - push "$INSTDIR\update-logs\ant-update-core-database.log" - push "Failed" - Call FileSearch - Pop $0 #Number of times found throughout - Pop $3 #Found at all? yes/no - Pop $2 #Number of lines found in - intcmp $0 0 +2 +2 0 - goto error - + # Copying the core sql update scriptes to $TEMP/lams/sql + setoutpath "$TEMP\lams\sql" + ;file "..\..\lams_common\db\sql\updatescripts\alter_${VERSION}*.sql" + file "..\..\lams_common\db\sql\updatescripts\*.sql" + + setoutpath "$TEMP\lams\" + file "..\templates\update-core-database.xml" + + # Running the ant scripts to create deploy.xml for the normal tools + strcpy $0 '"$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat" -logfile "$INSTDIR\update-logs\ant-update-core-database.log" -buildfile "$TEMP\lams\update-core-database.xml" update-core-database' + DetailPrint $0 + nsExec::ExecToStack $0 + Pop $0 ; return code, 0=success, error=fail + Pop $1 ; console output + ${if} $0 == "error" + ${orif} $0 == 1 + goto error + ${endif} + DetailPrint "Result: $1" + + push "$INSTDIR\update-logs\ant-update-core-database.log" + push "Failed" + Call FileSearch + Pop $0 #Number of times found throughout + Pop $3 #Found at all? yes/no + Pop $2 #Number of lines found in + intcmp $0 0 +2 +2 0 + goto error + ${endif} goto done error: Index: win_installer/templates/news.html =================================================================== diff -u -r3e0afea3eb6fc82e9bb97b1374c29caa67439d87 -rbda7def73cd2f11ef2e6ff2f3cc999aac6704fff --- win_installer/templates/news.html (.../news.html) (revision 3e0afea3eb6fc82e9bb97b1374c29caa67439d87) +++ win_installer/templates/news.html (.../news.html) (revision bda7def73cd2f11ef2e6ff2f3cc999aac6704fff) @@ -1,7 +1,7 @@