Index: win_installer/build.xml =================================================================== diff -u -rae13f2caa2572e368b592d80912e09782ce5a56a -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/build.xml (.../build.xml) (revision ae13f2caa2572e368b592d80912e09782ce5a56a) +++ win_installer/build.xml (.../build.xml) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -18,7 +18,7 @@ - + \ No newline at end of file Index: win_installer/license.txt =================================================================== diff -u -r820eb45a4a40956db153a5ca1c3923bd76943609 -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/license.txt (.../license.txt) (revision 820eb45a4a40956db153a5ca1c3923bd76943609) +++ win_installer/license.txt (.../license.txt) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -1,4 +1,4 @@ -LAMS 2.0.2 is released under the GPL license detailed below. This package +LAMS 2.0.3 is released under the GPL license detailed below. This package also includes other libraries/packages, whose respective licenses are detailed below. Index: win_installer/readme.txt =================================================================== diff -u -r424ac70971bf9588ec0fd1959eddeb2090bdcae8 -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/readme.txt (.../readme.txt) (revision 424ac70971bf9588ec0fd1959eddeb2090bdcae8) +++ win_installer/readme.txt (.../readme.txt) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -1,7 +1,7 @@ -LAMS 2.0.2 - Learning Activity Management System +LAMS 2.0.3 - Learning Activity Management System ---------------------------------------------- -This is a pre-packaged copy of LAMS 2.0.2 for Windows 2000, XP, or 2003. +This is a pre-packaged copy of LAMS 2.0.3 for Windows 2000, XP, or 2003. For the source code, please see the 'Building LAMS' wiki at http://wiki.lamsfoundation.org/display/lams/Building+LAMS @@ -21,6 +21,7 @@ To stop LAMS 2, use the 'Stop LAMS' shortcut in the LAMSv2 Start Menu folder. + 2. Server Configuration ======================= For single user installations (i.e., personal use on your own desktop), please @@ -42,9 +43,9 @@ For Sun JDK versions before 1.5.0_07, the default is 64m. If your Sun JDK version is 1.5.0_07 or later, the default is 256m. + 3. Web Resources ================ - Windows Installer Help wiki (includes download links) http://wiki.lamsfoundation.org/display/lamsdocs/Windows+Installer+Help Index: win_installer/src/Functions.nsh =================================================================== diff -u -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/src/Functions.nsh (.../Functions.nsh) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) +++ win_installer/src/Functions.nsh (.../Functions.nsh) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -531,3 +531,118 @@ Exch 6 FunctionEnd + +/* +Push hello #text to be replaced +Push blah #replace with +Push all #replace all occurrences +Push all #replace all occurrences +Push C:\temp1.bat #file to replace in +Call AdvReplaceInFile +*/ +Function AdvReplaceInFile +Exch $0 ;file to replace in +Exch +Exch $1 ;number to replace after +Exch +Exch 2 +Exch $2 ;replace and onwards +Exch 2 +Exch 3 +Exch $3 ;replace with +Exch 3 +Exch 4 +Exch $4 ;to replace +Exch 4 +Push $5 ;minus count +Push $6 ;universal +Push $7 ;end string +Push $8 ;left string +Push $9 ;right string +Push $R0 ;file1 +Push $R1 ;file2 +Push $R2 ;read +Push $R3 ;universal +Push $R4 ;count (onwards) +Push $R5 ;count (after) +Push $R6 ;temp file name + + GetTempFileName $R6 + FileOpen $R1 $0 r ;file to search in + FileOpen $R0 $R6 w ;temp file + StrLen $R3 $4 + StrCpy $R4 -1 + StrCpy $R5 -1 + +loop_read: + ClearErrors + FileRead $R1 $R2 ;read line + IfErrors exit + + StrCpy $5 0 + StrCpy $7 $R2 + +loop_filter: + IntOp $5 $5 - 1 + StrCpy $6 $7 $R3 $5 ;search + StrCmp $6 "" file_write2 + StrCmp $6 $4 0 loop_filter + +StrCpy $8 $7 $5 ;left part +IntOp $6 $5 + $R3 +IntCmp $6 0 is0 not0 +is0: +StrCpy $9 "" +Goto done +not0: +StrCpy $9 $7 "" $6 ;right part +done: +StrCpy $7 $8$3$9 ;re-join + +IntOp $R4 $R4 + 1 +StrCmp $2 all file_write1 +StrCmp $R4 $2 0 file_write2 +IntOp $R4 $R4 - 1 + +IntOp $R5 $R5 + 1 +StrCmp $1 all file_write1 +StrCmp $R5 $1 0 file_write1 +IntOp $R5 $R5 - 1 +Goto file_write2 + +file_write1: + FileWrite $R0 $7 ;write modified line +Goto loop_read + +file_write2: + FileWrite $R0 $R2 ;write unmodified line +Goto loop_read + +exit: + FileClose $R0 + FileClose $R1 + + SetDetailsPrint none + Delete $0 + Rename $R6 $0 + Delete $R6 + SetDetailsPrint both + +Pop $R6 +Pop $R5 +Pop $R4 +Pop $R3 +Pop $R2 +Pop $R1 +Pop $R0 +Pop $9 +Pop $8 +Pop $7 +Pop $6 +Pop $5 +Pop $0 +Pop $1 +Pop $2 +Pop $3 +Pop $4 +FunctionEnd Index: win_installer/src/GetLlidFolderNames.java =================================================================== diff -u --- win_installer/src/GetLlidFolderNames.java (revision 0) +++ win_installer/src/GetLlidFolderNames.java (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -0,0 +1,110 @@ +import java.io.File; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.util.Properties; + + +public class GetLlidFolderNames { + + private String title; + private String dbDriverClass; + private String dbDriverUrl; + private String dbUsername; + private String dbPassword; + + /** + * Dump out a list of all the nodes in the content repository, with their type and expected paths + * @throws Exception + */ + public static void main(String[] args) throws Exception { + GetLlidFolderNames me = new GetLlidFolderNames(); + + if (args.length < 4) + { + System.out.println("Usage: Java GetLlidFolderNames title dbDriverUrl dbUsername dbPassword"); + System.exit(1); + } + + String title = args[0]; + String dbDriverUrl = args[1]; + String dbUsername = args[2]; + String dbPassword = args[3]; + me.execute(title, dbDriverUrl, dbUsername, dbPassword); + } + + public void execute(String title, String dbDriverUrl, String dbUsername, String dbPassword) throws Exception + { + + + this.dbDriverClass = "com.mysql.jdbc.Driver"; + this.dbDriverUrl = dbDriverUrl; + this.dbUsername = dbUsername; + this.dbPassword = dbPassword; + this.title = title; + + String getLlid = "SELECT learning_library_id FROM lams_learning_library WHERE title = \'" + title +"\'"; + // SELECT learning_library_id FROM lams_learning_library WHERE title = $\'Chat and Scribe$\';" + + + + + + + Class.forName(dbDriverClass); + Connection conn = DriverManager.getConnection(dbDriverUrl, dbUsername, dbPassword); + conn.setAutoCommit(false); + PreparedStatement stmt = conn.prepareStatement(getLlid); + ResultSet results = stmt.executeQuery(); + + if (results.first()) + { + System.out.print(results.getString("learning_library_id")); + } + else + { + System.out.println("Could not find llid for:" + title); + System.exit(1); + } + /* + while (results.next()) + { + Long uid = results.getLong("uid"); + Boolean room_created = results.getBoolean("room_created"); + String jabber_room = results.getString("jabber_room"); + + String set_jabber_room; + Boolean set_room_created; + // checking if jabber_room is null + if (results.wasNull()) { + // tool session was created by the room doesnt exist on the jabber server + // generating a unique jabber room name + set_room_created = false; + set_jabber_room = (String) idGenerator.generate(null, null) + "@" + XMPPConference; + + } else { + // jabber has already been created + set_room_created = true; + set_jabber_room = jabber_room; + } + + stmtUpdate.setBoolean(1, set_room_created); + stmtUpdate.setString(2, set_jabber_room); + stmtUpdate.setLong(3, uid); + stmtUpdate.addBatch(); + + System.out.print(uid + "\t"); + System.out.print(room_created + "\t"); + System.out.print(jabber_room + "\n"); + + } + int[] upCount = stmtUpdate.executeBatch(); + */ + + + conn.commit(); + conn.close(); + } + +} \ No newline at end of file Index: win_installer/src/LanguagePack.xml =================================================================== diff -u -rb774997180e1f25228b59a70714036cdc22c3ae6 -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/src/LanguagePack.xml (.../LanguagePack.xml) (revision b774997180e1f25228b59a70714036cdc22c3ae6) +++ win_installer/src/LanguagePack.xml (.../LanguagePack.xml) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -7,7 +7,7 @@ Init} - ${FS_FOLDERS->Init} - ${RF_FOLDERS->Init} - - ; getting the rows for Chat and Scribe - strcpy $SQL_QUERY '"SELECT learning_library_id FROM lams_learning_library WHERE title = $\'Chat and Scribe$\';"' - strcpy $SQL_QUERY '"$MYSQL_DIR\bin\mysql.exe" -u"$DB_USER" -p"$DB_PASS" -s -i -B $DB_NAME -e $SQL_QUERY' - strcpy $FOLDER_FLAG "0" - call executeSQLScript + setoutpath "$TEMP\lams" + File "..\build\GetLlidFolderNames.class" + + strcpy $1 "jdbc:mysql://$MYSQL_HOST/$DB_NAME?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useUnicode=true" + ReadRegStr $3 HKLM "${REG_HEAD}" "dir_jdk" + # execute llid finder + Detailprint '"$3\bin\java.exe" -cp ".;lib\mysql-connector-java-3.1.12-bin.jar" GetLlidFolderNames "Chat and Scribe" "$1" "$DB_USER" "$DB_PASS"' + nsExec::ExecToStack '"$3\bin\java.exe" -cp ".;lib\mysql-connector-java-3.1.12-bin.jar" GetLlidFolderNames "Chat and Scribe" "$1" "$DB_USER" "$DB_PASS"' pop $0 - #detailprint "SQL script result for Chat and Scribe: $\n$0" + pop $CSllid + ${if} $0 != '0' + Messagebox MB_OK|MB_ICONSTOP "Error while finding Chat and Scrbe llid folders" + Abort + ${endif} - ; getting the rows for Forum and Scribe - strcpy $SQL_QUERY '"SELECT learning_library_id FROM lams_learning_library WHERE title = $\'Forum and Scribe$\';"' - strcpy $SQL_QUERY '"$MYSQL_DIR\bin\mysql.exe" -u"$DB_USER" -p"$DB_PASS" -s -i -B $DB_NAME -e $SQL_QUERY' - strcpy $FOLDER_FLAG "1" - call executeSQLScript + setoutpath "$TEMP\lams" + File "..\build\GetLlidFolderNames.class" + + strcpy $1 "jdbc:mysql://$MYSQL_HOST/$DB_NAME?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useUnicode=true" + ReadRegStr $3 HKLM "${REG_HEAD}" "dir_jdk" + # execute llid finder + Detailprint '"$3\bin\java.exe" -cp ".;lib\mysql-connector-java-3.1.12-bin.jar" GetLlidFolderNames "Forum and Scribe" "$1" "$DB_USER" "$DB_PASS"' + nsExec::ExecToStack '"$3\bin\java.exe" -cp ".;lib\mysql-connector-java-3.1.12-bin.jar" GetLlidFolderNames "Forum and Scribe" "$1" "$DB_USER" "$DB_PASS"' pop $0 - #detailprint "SQL script result for Forum and Scribe: $\n$0" + pop $FSllid + ${if} $0 != '0' + Messagebox MB_OK|MB_ICONSTOP "Error while finding Forum and Scribe llid folders" + Abort + ${endif} - ; getting the rows for Resources and Forum - strcpy $SQL_QUERY '"SELECT learning_library_id FROM lams_learning_library WHERE title = $\'Resources and Forum$\';"' - strcpy $SQL_QUERY '"$MYSQL_DIR\bin\mysql.exe" -u"$DB_USER" -p"$DB_PASS" -s -i -B $DB_NAME -e $SQL_QUERY' - strcpy $FOLDER_FLAG "2" - call executeSQLScript + strcpy $1 "jdbc:mysql://$MYSQL_HOST/$DB_NAME?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&useUnicode=true" + ReadRegStr $3 HKLM "${REG_HEAD}" "dir_jdk" + # execute llid finder + Detailprint '"$3\bin\java.exe" -cp ".;lib\mysql-connector-java-3.1.12-bin.jar" GetLlidFolderNames "Resource and Forum" "$1" "$DB_USER" "$DB_PASS"' + nsExec::ExecToStack '"$3\bin\java.exe" -cp ".;lib\mysql-connector-java-3.1.12-bin.jar" GetLlidFolderNames "Resources and Forum" "$1" "$DB_USER" "$DB_PASS"' pop $0 - #detailprint "SQL script result for Resource and Forum: $\n$0" + pop $RFllid + ${if} $0 != '0' + Messagebox MB_OK|MB_ICONSTOP "Error while finding Resource and Forum llid folders" + Abort + ${endif} - ; copy all the folders for llid Chat and Scribe - IntOp $R0 "$CS_FOLDERS_UBound" + 1 - ${do} - ${CS_FOLDERS->Get} $CS_FOLDERS_UBound $R1 - ${CS_FOLDERS->Delete} $CS_FOLDERS_UBound - IntOp $R0 "$CS_FOLDERS_UBound" + 1 - #MessageBox MB_OK|MB_ICONEXCLAMATION "Chat and Scribe: $R1 $\nElements $R0" - - setoutpath "$INSTDIR\library\llid$R1" - detailprint "Copying language files for chat and scribe" - file /a "..\..\lams_build\librarypackages\chatscribe\language\lams\*" - - ${loopuntil} $R0 == "0" + - ; copy all the folders for llid Forum and Scribe - IntOp $R0 "$FS_FOLDERS_UBound" + 1 - ${do} - ${FS_FOLDERS->Get} $FS_FOLDERS_UBound $R1 - ${FS_FOLDERS->Delete} $FS_FOLDERS_UBound - IntOp $R0 "$FS_FOLDERS_UBound" + 1 - #MessageBox MB_OK|MB_ICONEXCLAMATION "Forum and Scribe: $R1 $\nElements $R0" + setoutpath "$INSTDIR\library\llid$CSllid" + file /a "..\..\lams_build\librarypackages\chatscribe\language\lams\*" - setoutpath "$INSTDIR\library\llid$R1" - detailprint "Copying language files for forum and scribe" - file /a "..\..\lams_build\librarypackages\forumscribe\language\lams\*" - ${loopuntil} $R0 == "0" + setoutpath "$INSTDIR\library\llid$FSllid" + file /a "..\..\lams_build\librarypackages\forumscribe\language\lams\*" - ; copy all the folders for llid Resource and Forum - IntOp $R0 "$RF_FOLDERS_UBound" + 1 - ; copy all the folders for llid Forum and Scribe - IntOp $R0 "$FS_FOLDERS_UBound" + 1 - ${do} - ${RF_FOLDERS->Get} $RF_FOLDERS_UBound $R1 - ${RF_FOLDERS->Delete} $RF_FOLDERS_UBound - IntOp $R0 "$RF_FOLDERS_UBound" + 1 - #MessageBox MB_OK|MB_ICONEXCLAMATION "Resource and Forum: $R1 $\nElements $R0" - setoutpath "$INSTDIR\library\llid$R1" - detailprint "Copying language files for resource and forum" - file /a "..\..\lams_build\librarypackages\shareresourcesforum\language\lams\*" - ${loopuntil} $R0 == "0" - -FunctionEnd - - -; Executing sql scripts -; Puts the result of sql script on the stack -Function executeSQLScript - nsExec::ExecToStack $SQL_QUERY - detailprint $SQL_QUERY - pop $0 - pop $1 + setoutpath "$INSTDIR\library\llid$RFllid" + file /a "..\..\lams_build\librarypackages\shareresourcesforum\language\lams\*" - #check for errors and write result to install window - ${if} $0 != 0 - goto Errors - ${endif} - strcpy $1 $1 -2 - push $1 - - ; Getting the muliple entries out - ${while} $1 != "" - push "$\n" - push $1 - call SplitFirstStrPart - pop $R0 - pop $1 - - ${if} $FOLDER_FLAG == "0" - ${CS_FOLDERS->Push} $R0 - #MessageBox MB_OK|MB_ICONEXCLAMATION "Chat and scribe: $R0 $\n" - ${endif} - ${if} $FOLDER_FLAG == "1" - ${FS_FOLDERS->Push} $R0 - #MessageBox MB_OK|MB_ICONEXCLAMATION "Forum and Scribe: $R0" - ${endif} - ${if} $FOLDER_FLAG == "2" - ${RF_FOLDERS->Push} $R0 - #MessageBox MB_OK|MB_ICONEXCLAMATION "Resource and Forum: $R0" - ${endif} - ${endwhile} - - goto Finish - Errors: - DetailPrint "Can't read from $MYSQL_DIR\$DB_NAME database" - MessageBox MB_OK|MB_ICONSTOP "LAMS configuration failed. Please check you database name, user and password are set the same as when you installed LAMS$\r$\nError:$\r$\n$\r$\n$1" - Abort "LAMS configuration failed." - Finish: - clearerrors - FunctionEnd Function SplitFirstStrPart @@ -2465,6 +2349,7 @@ Pop $2 FileWrite $0 "INSTDIR=$2/$\r$\n" FileWrite $0 "DB_NAME=$DB_NAME$\r$\n" + FileWrite $0 "MYSQL_HOST=$MYSQL_HOST$\r$\n" FileWrite $0 "DB_USER=$DB_USER$\r$\n" FileWrite $0 "DB_PASS=$DB_PASS$\r$\n" Push $LAMS_DIR @@ -2478,14 +2363,12 @@ SetOutPath $INSTDIR File /a "LanguagePack.xml" + ReadRegStr $0 HKLM "${REG_HEAD}" "dir_inst" - ReadRegStr $0 HKLM "${REG_HEAD}" "dir_inst" - - ; update locals must be stored as a procedure first ; use ANT to store procedures DetailPrint '$0\apache-ant-1.6.5\bin\newAnt.bat insertLocale-db' - nsExec::ExecToStack '$0\apache-ant-1.6.5\bin\newAnt.bat -buildfile $INSTDIR\LanguagePack.xml insertLocale-db' + nsExec::ExecToStack '$0\apache-ant-1.6.5\bin\newAnt.bat -logfile "..\..\..\..\..\..\..\..\..\update-logs\ant-insert-locales.log" -buildfile $INSTDIR\LanguagePack.xml insertLocale-db' Pop $0 ; return code, 0=success, error=fail Pop $1 ; console output DetailPrint "Database insert status: $0" Index: win_installer/templates/index.html =================================================================== diff -u -rce62da8c797dd3f95cb9160151e2128c32525800 -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/templates/index.html (.../index.html) (revision ce62da8c797dd3f95cb9160151e2128c32525800) +++ win_installer/templates/index.html (.../index.html) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -50,7 +50,7 @@ Fisheye: Tag bbe120d48590638a20bc359ac6c1e6267fde2c98 refers to a dead (removed) revision in file `win_installer/templates/news.html'. Fisheye: No comparison available. Pass `N' to diff? Index: win_installer/templates/update-core-database.xml =================================================================== diff -u -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/templates/update-core-database.xml (.../update-core-database.xml) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) +++ win_installer/templates/update-core-database.xml (.../update-core-database.xml) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -8,16 +8,16 @@ - - - - - + + + + + \ No newline at end of file Index: win_installer/templates/update-deploy-tools.xml =================================================================== diff -u -red736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc -rbbe120d48590638a20bc359ac6c1e6267fde2c98 --- win_installer/templates/update-deploy-tools.xml (.../update-deploy-tools.xml) (revision ed736ed1dfbfd5a2a089f7a41e1242f2dcaa94dc) +++ win_installer/templates/update-deploy-tools.xml (.../update-deploy-tools.xml) (revision bbe120d48590638a20bc359ac6c1e6267fde2c98) @@ -178,5 +178,4 @@ - \ No newline at end of file