Index: win_installer/license.txt =================================================================== diff -u -r264a81e13f9851c2f44ecfdbbf6fbb35a10a02ce -rfca3807bd08c44e434338128e180d3c7dd92862d --- win_installer/license.txt (.../license.txt) (revision 264a81e13f9851c2f44ecfdbbf6fbb35a10a02ce) +++ win_installer/license.txt (.../license.txt) (revision fca3807bd08c44e434338128e180d3c7dd92862d) @@ -19,7 +19,6 @@ commons-lang-2.0.jar Apache Software License 1.1 commons-logging.jar Apache License 2.0 commons-validator.jar Apache License 2.0 -ehcache-1.1.jar Apache Software License 1.1 FCKeditor-2.3.jar CDL Closed Distribution License gnujaxp.jar GNU General Public License hibernate3.jar GNU General Public License @@ -60,6 +59,20 @@ xom-1.0.b3.jar GNU Lesser General Public License xpp3-1.1.3.4d_b4.jar XPP3 License xstream-1.1.jar xstream Licanse + +SHARE RECOURCES LIBRARY LICENSES +castor-0.9.5.3-xml.jar Castor License +jdom.jar Jdom Jar License +moonunitsrc.jar Reload License +reload-diva.jar Reload License +reload-editor.jar Reload License +reload-jdom.jar Reload License +reload-moonunit.jar Reload License +xercesImpl.jar Apache Software License 1.1 +xml-apis.jar Apache Software License 1.1 +jaxen-full.jar Jaxen Jar License (The Werken Company) +sax.jar Public Domain +saxpath.jar Jaxen Jar License (The Werken Company) -------------------------------------------------------------------------------- @@ -2333,4 +2346,250 @@ Terence Parr parrt@cs.usfca.edu parrt@antlr.org - \ No newline at end of file + +======================================================== + +CASTOR-LICENSE + +Copyright 2000-2002 (C) Intalio Inc. All Rights Reserved. + +Redistribution and use of this software and associated documentation +("Software"), with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions of source code must retain copyright statements + and notices. Redistributions must also contain a copy of this + document. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. The name "ExoLab" must not be used to endorse or promote products + derived from this Software without prior written permission of + Intalio Inc. For written permission, please contact info@exolab.org. + +4. Products derived from this Software may not be called "Castor" + nor may "Castor" appear in their names without prior written + permission of Intalio Inc. Exolab, Castor and Intalio are + trademarks of Intalio Inc. + +5. Due credit should be given to the ExoLab Project + (http://www.exolab.org/). + +THIS SOFTWARE IS PROVIDED BY INTALIO AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTALIO OR ITS +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE +USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +======================================================== + +Jaxen License + + Copyright 2003-2006 The Werken Company. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of the Jaxen Project nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +======================================================== + +Jdom License + +Copyright (C) 2000-2002 Brett McLaughlin & Jason Hunter. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact license@jdom.org. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management (pm@jdom.org). + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Brett McLaughlin and + Jason Hunter . For more information on the + JDOM Project, please see . + + ======================================================== + + Reload License + + Copyright (C) 2000-2002 Brett McLaughlin & Jason Hunter. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the disclaimer that follows + these conditions in the documentation and/or other materials + provided with the distribution. + + 3. The name "JDOM" must not be used to endorse or promote products + derived from this software without prior written permission. For + written permission, please contact license@jdom.org. + + 4. Products derived from this software may not be called "JDOM", nor + may "JDOM" appear in their name, without prior written permission + from the JDOM Project Management (pm@jdom.org). + + In addition, we request (but do not require) that you include in the + end-user documentation provided with the redistribution and/or in the + software itself an acknowledgement equivalent to the following: + "This product includes software developed by the + JDOM Project (http://www.jdom.org/)." + Alternatively, the acknowledgment may be graphical using the logos + available at http://www.jdom.org/images/logos. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE JDOM AUTHORS OR THE PROJECT + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + This software consists of voluntary contributions made by many + individuals on behalf of the JDOM Project and was originally + created by Brett McLaughlin and + Jason Hunter . For more information on the + JDOM Project, please see . + + ======================================================== + + Xerces License + + /* + * The Apache Software License, Version 1.1 + * + * + * Copyright (c) 1999-2002 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Xerces" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation and was + * originally based on software copyright (c) 1999, International + * Business Machines, Inc., http://www.ibm.com. For more + * information on the Apache Software Foundation, please see + * . + */ + + ======================================================== \ No newline at end of file Index: win_installer/readme.txt =================================================================== diff -u -r264a81e13f9851c2f44ecfdbbf6fbb35a10a02ce -rfca3807bd08c44e434338128e180d3c7dd92862d --- win_installer/readme.txt (.../readme.txt) (revision 264a81e13f9851c2f44ecfdbbf6fbb35a10a02ce) +++ win_installer/readme.txt (.../readme.txt) (revision fca3807bd08c44e434338128e180d3c7dd92862d) @@ -1,4 +1,4 @@ -LAMS 2.0.1.1 - Learning Activity Management System +LAMS 2.0.1 - Learning Activity Management System ---------------------------------------------- This is a pre-packaged copy of LAMS 2.0.1 for Windows 2000, XP, or 2003. @@ -11,14 +11,14 @@ 1. Startup and Shutdown ======================= -To use LAMS 2.0.1, first make sure it is started - use the 'Start LAMS' shortcut +To use LAMS 2, first make sure it is started - use the 'Start LAMS' shortcut in the LAMSv2 Start Menu folder if you're not sure. MySQL must be running. For chat rooms to function, Wildfire must also be running. -While LAMS 2.0.1 is running, you may access the login page using the 'Access +While LAMS 2 is running, you may access the login page using the 'Access LAMS' short cut in the LAMSv2 Start Menu folder. -To stop LAMS 2.0.1, use the 'Stop LAMS' shortcut in the LAMSv2 Start Menu +To stop LAMS 2, use the 'Stop LAMS' shortcut in the LAMSv2 Start Menu folder. 2. Server Configuration @@ -28,7 +28,7 @@ For server deployments, you will probably want to configure the default JVM memory settings for your server. In C:\lams\jboss-4.0.2\bin\run.bat (or -wherever you installed LAMS 2.0.1), find the line near the bottom that says +wherever you installed LAMS 2), find the line near the bottom that says set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m @@ -49,19 +49,19 @@ http://wiki.lamsfoundation.org/display/lamsdocs/Windows+Installer+Help -LAMS 2.0.1 developer-oriented information +LAMS 2 developer-oriented information http://wiki.lamsfoundation.org/display/lams -LAMS 2.0.1 help documents +LAMS 2 help documents http://wiki.lamsfoundation.org/display/lamsdocs Educational and technical forums for help and discussion http://www.lamscommunity.org -LAMS 2.0.1 bug tracker +LAMS 2 bug tracker https://bugs.lamsfoundation.org Index: win_installer/src/Functions.nsh =================================================================== diff -u -r9d6fcf6e3965c390f8c55f79623a33fb673a4906 -rfca3807bd08c44e434338128e180d3c7dd92862d --- win_installer/src/Functions.nsh (.../Functions.nsh) (revision 9d6fcf6e3965c390f8c55f79623a33fb673a4906) +++ win_installer/src/Functions.nsh (.../Functions.nsh) (revision fca3807bd08c44e434338128e180d3c7dd92862d) @@ -351,3 +351,73 @@ Pop $2 Exch $3 FunctionEnd + +;This function will search in a file for the specified string, and return some values. +/* +USAGE +Push C:\temp1.txt +Push hello + Call FileSearch +Pop $0 #Number of times found throughout +Pop $1 #Found at all? yes/no +Pop $2 #Number of lines found in + +StrCmp $1 yes 0 +2 +MessageBox MB_OK "$\"hello$\" was found in the file $0 times on $2 lines." +*/ +Function FileSearch +Exch $0 ;search for +Exch +Exch $1 ;input file +Push $2 +Push $3 +Push $4 +Push $5 +Push $6 +Push $7 +Push $8 +Push $9 +Push $R0 + FileOpen $2 $1 r + StrLen $4 $0 + StrCpy $5 0 + StrCpy $7 no + StrCpy $8 0 + StrCpy $9 0 + ClearErrors +loop_main: + FileRead $2 $3 + IfErrors done + IntOp $R0 $R0 + $9 + StrCpy $9 0 + StrCpy $5 0 +filter_top: + IntOp $5 $5 - 1 + StrCpy $6 $3 $4 $5 + StrCmp $6 "" loop_main + StrCmp $6 $0 0 filter_top + StrCpy $3 $3 $5 + StrCpy $5 0 + StrCpy $7 yes + StrCpy $9 1 + IntOp $8 $8 + 1 +Goto filter_top +done: + FileClose $2 + StrCpy $0 $8 + StrCpy $1 $7 + StrCpy $2 $R0 +Pop $R0 +Pop $9 +Pop $8 +Pop $7 +Pop $6 +Pop $5 +Pop $4 +Pop $3 +Exch $2 ;output number of lines +Exch +Exch $1 ;output yes/no +Exch 2 +Exch $0 ;output count found +FunctionEnd Index: win_installer/src/lams2.ini =================================================================== diff -u -r87d11d36875dfe65ec09a7866a6e8b27612d0e26 -rfca3807bd08c44e434338128e180d3c7dd92862d --- win_installer/src/lams2.ini (.../lams2.ini) (revision 87d11d36875dfe65ec09a7866a6e8b27612d0e26) +++ win_installer/src/lams2.ini (.../lams2.ini) (revision fca3807bd08c44e434338128e180d3c7dd92862d) @@ -104,4 +104,4 @@ Right=290 Bottom=131 State=en_AU - English (Australia) -ListItems=en_AU - English (Australia)|ar_JO - Arabic (Jordan)|da_DK - Dansk|de_DE - Deutsch|el_GR - Greek|es_ES - Espa�ol|fr_FR - Fran�ais|it_IT - Italiano|ko_KR - Korean|no_NO - Norsk|pl_PL - Polski|pt_BR - Portugu�s (Brasil)|sv_SE - Svenska|vi_VN - Vietnamese|zh_CN - Chinese(Simplified) +ListItems=en_AU - English (Australia)|ar_JO - Arabic (Jordan)|cy_GB - Cymraeg (Cymru)|da_DK - Dansk|de_DE - Deutsch|el_GR - Greek|es_ES - Espa�ol|fr_FR - Fran�ais|it_IT - Italiano|ko_KR - Korean|mi_NZ - Maori|no_NO - Norsk|pl_PL - Polski|pt_BR - Portugu�s (Brasil)|sv_SE - Svenska|vi_VN - Vietnamese|zh_CN - Chinese(Simplified) Index: win_installer/src/updater.nsi =================================================================== diff -u -r7d1b52c2e9fb77cfbd974d6cf78ff407a7b47673 -rfca3807bd08c44e434338128e180d3c7dd92862d --- win_installer/src/updater.nsi (.../updater.nsi) (revision 7d1b52c2e9fb77cfbd974d6cf78ff407a7b47673) +++ win_installer/src/updater.nsi (.../updater.nsi) (revision fca3807bd08c44e434338128e180d3c7dd92862d) @@ -49,8 +49,8 @@ # constants !define VERSION "2.0.1" -!define LANGUAGE_PACK_VERSION "2007-03-02" -!define DATE_TIME_STAMP "200703021200" +!define LANGUAGE_PACK_VERSION "2007-03-07" +!define DATE_TIME_STAMP "200703071200" !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 @@ -62,7 +62,7 @@ Name "LAMS ${VERSION}" ;BrandingText "LAMS ${VERSION} -- built on ${__TIMESTAMP__}" BrandingText "LAMS ${VERSION} -- built on ${__DATE__} ${__TIME__}" -OutFile "..\build\LAMS-updater-${VERSION}.exe" +OutFile "..\build\LAMS-${VERSION}.exe" InstallDir "C:\lams" InstallDirRegKey HKLM "${REG_HEAD}" "" LicenseForceSelection radiobuttons "I Agree" "I Do Not Agree" @@ -171,16 +171,16 @@ # installer sections SectionGroup "LAMS 2.0.1 Update (Requires LAMS 2.0)" update - Section !lamsCore + Section "!lamsCore" lamsCore ${if} $IS_UPDATE == "1" Detailprint "Installing LAMS ${VERSION} core" - # extract support files to write configuration - SetOutPath $INSTDIR - File /r "..\apache-ant-1.6.5" ; Backing up existing lams installation call backupLams + ; setting up ant + call setupant + ; Updating the the core lams jars/wars call updateCoreJarsWars @@ -190,13 +190,12 @@ ; Updating lams-www.war call updateLamswww - ; Updating the database to support version call updateCoreDatabase ${endif} SectionEnd - Section !lamsTools + Section "!lamsTools" lamsTools ${if} $IS_UPDATE == "1" Detailprint "Installing LAMS ${VERSION} tools" @@ -205,44 +204,47 @@ ; 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 + call copyProjects + ; get the language files locations specific to this server from the database + ; unpack to $INSTDIR\library\llidx + call copyllid + + ; Finally, add rows in the database (lams_supported_locale) for all new language files + call updateDatabase - call languagePackInit + # write this language pack version to registry + Detailprint 'Writing Language pack version ${LANGUAGE_PACK_VERSION} to registry: "${LANGUAGE_PACK_VERSION}"' + WriteRegStr HKLM "${REG_HEAD}" "language_pack" $VERSION_INT - ${if} $UPDATE_LANGUAGES == 1 - ; copy language files from LAMS projects to a folder in $INSTDIR - call copyProjects - - ; get the language files locations specific to this server from the database - ; unpack to $INSTDIR\library\llidx - call copyllid - - ; Finally, add rows in the database (lams_supported_locale) for all new language files - call updateDatabase - - # write this language pack version to registry - Detailprint 'Writing Language pack version ${LANGUAGE_PACK_VERSION} to registry: "${LANGUAGE_PACK_VERSION}"' - WriteRegStr HKLM "${REG_HEAD}" "language_pack" $VERSION_INT - - DetailPrint "LAMS Language Pack ${LANGUAGE_PACK_VERSION} install successfull" + DetailPrint "LAMS Language Pack ${LANGUAGE_PACK_VERSION} install successfull" - # changing the instdir back to the original inst dir - ReadRegStr $INSTDIR HKLM "${REG_HEAD}" "dir_inst" - - Call WriteRegEntries - - SetOutPath $INSTDIR - File /a "..\build\lams-start.exe" - File /a "..\build\lams-stop.exe" - File /a "..\license.txt" - File /a "..\license-wrapper.txt" - File /a "..\readme.txt" - Call SetupStartMenu - WriteUninstaller "$INSTDIR\lams-uninstall.exe" - ${endif} ################################################ + + # changing the instdir back to the original inst dir + ReadRegStr $INSTDIR HKLM "${REG_HEAD}" "dir_inst" + + Call WriteRegEntries + + SetOutPath $INSTDIR + File /a "..\build\lams-start.exe" + File /a "..\build\lams-stop.exe" + File /a "..\license.txt" + File /a "..\license-wrapper.txt" + File /a "..\readme.txt" + Call SetupStartMenu + WriteUninstaller "$INSTDIR\lams-uninstall.exe" + + ${endif} SectionEnd @@ -414,6 +416,13 @@ # Reading the registry values call readRegistry + + SectionSetSize ${jboss} 0 + SectionSetSize ${lams} 0 + SectionSetSize ${service} 0 + ${else} + SectionSetSize ${lamsCore} 0 + SectionSetSize ${lamsTools} 0 ${endif} @@ -426,7 +435,7 @@ !insertmacro MUI_INSTALLOPTIONS_EXTRACT "final.ini" # set jsmath exploded size (assumes 4KB cluster size on destination hdd) - SectionSetSize ${jsmathe} 81816 + ;SectionSetSize ${jsmathe} 81816 FunctionEnd @@ -477,19 +486,25 @@ !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" "Lams 2.0 is installed. You may update to 2.0.1" + !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_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" "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 2.0.1 Components" "Lams 2.0 is installed. Proceeding with update to 2.0.1" !insertmacro MUI_INSTALLOPTIONS_DISPLAY "lams_components.ini" ${endif} FunctionEnd Function PostComponents !insertmacro MUI_INSTALLOPTIONS_READ $INCLUDE_JSMATH "lams_components.ini" "Field 5" "State" + ${if} $INCLUDE_JSMATH == "1" + SectionSetSize ${jsmathe} 81816 + ${else} + SectionSetSize ${jsmathe} 0 + ${endif} + FunctionEnd @@ -736,20 +751,61 @@ call checkRegistry # ${StrTok} "ResultVar" "String" "Separators" "ResultPart" "SkipEmptyParts" - ${StrTok} $0 ${__DATE__} "/" 2 1 - ${StrTok} $1 ${__DATE__} "/" 1 1 - ${StrTok} $2 ${__DATE__} "/" 0 1 - ${StrTok} $3 "${__TIME__}" ":" 0 1 - ${StrTok} $4 "${__TIME__}" ":" 1 1 + 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 - strcpy $TIMESTAMP "$0$1$2-$3$4" - ${if} $IS_UPDATE == "0" + nsExec::ExecToStack "time /T" + Pop $0 + Pop $1 + /* + ${If} $0 == 1 + ${orif} $0 == 'error' + goto error + ${EndIf} + */ + + + strcpy $9 $1 + + ${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 + ${endif} + + + 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: Abort continue: - ${endif} + ${endif} + + goto done + error: + DetailPrint "Error getting system time" + MessageBox MB_OK|MB_ICONSTOP "Error getting system time $\r$\nError:$\r$\n$\r$\n$1 $\r$\n$\r$\n$0" + Abort "Error getting system time" + done: FunctionEnd ################################################################################ @@ -763,14 +819,64 @@ # CODE USED FOR UPDATER # ################################################################################ +Function setupant + + ; setting the first tool sig for properties files + strcpy $TOOL_SIG "lachat11" + + # extract support files to write configuration + SetOutPath $INSTDIR + File /r "..\apache-ant-1.6.5" + + # Extract the ant scripts + SetOutPath "$TEMP\lams" + File "..\templates\update-deploy-tools.xml" + + # use Ant to write config to files + FileOpen $0 "$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat" w + IfErrors 0 +2 + goto error + FileWrite $0 "@echo off$\r$\nset JAVACMD=$JDK_DIR\bin\java$\r$\n" + FileClose $0 + ${FileJoin} "$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat" "$INSTDIR\apache-ant-1.6.5\bin\ant.bat" "" + + goto done + error: + DetailPrint "Error setting up ant" + MessageBox MB_OK|MB_ICONSTOP "Error setting up ant " + Abort "Error setting up ant" + done: +Functionend + + + ; Backs up existing lams installation Function backupLams #copyfiles /r $INSTDIR "$INSTDIR - - DetailPrint "Backing up lams installation at: $INSTDIR-$TIMESTAMP.bak. This may take several minutes" + DetailPrint "Backing up lams at: $INSTDIR-$TIMESTAMP.bak. This may take a few minutes" + SetDetailsPrint listonly copyfiles /SILENT $INSTDIR $INSTDIR-$TIMESTAMP.bak 95000 + SetDetailsPrint both + + 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' + 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: FunctionEnd @@ -785,7 +891,7 @@ ; Updating lams-central.war Function updateLamsCentral SetoutPath "$INSTDIR\jboss-4.0.2\server\default\deploy\lams.ear\lams-central.war" - File /r "..\assembly\lams.ear\lams-central.war" + File /r "..\assembly\lams.ear\lams-central.war\*" FunctionEnd ; Updating lams-www.war @@ -824,13 +930,47 @@ DetailPrint $1 - # Copying the core sql update scriptes to $TEMOP/lams/sql + # 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" + 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\ant.bat" -logfile "$INSTDIR\update-logs\ant-update-core-database.log" -buildfile "$TEMP\lams\update-deploy-tools.xml" -D"prop.path=$TOOL_SIG" update-core-database' + 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 @@ -841,13 +981,23 @@ ${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 + + + goto done error: DetailPrint "LAMS core database updates failed" - MessageBox MB_OK|MB_ICONSTOP "LAMS core database updates failed $\r$\nError:$\r$\n$\r$\n$1" - Abort "LAMS core database updates failed" + MessageBox MB_OK|MB_ICONSTOP "LAMS core database updates failed, check update logs in the installation directory for details $\r$\nError:$\r$\n$\r$\n$1" + Abort "LAMS configuration failed" done: - FunctionEnd ; Updating application.xml @@ -859,7 +1009,7 @@ # Running the ant scripts to update web.xmls and manifests - strcpy $0 '"$INSTDIR\apache-ant-1.6.5\bin\ant.bat" -logfile "$INSTDIR\update-logs\ant-update-application-xml.log" -buildfile "$TEMP\lams\update-deploy-tools.xml" -D"prop.path=$TOOL_SIG" update-application-xml' + strcpy $0 '"$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat" -logfile "$INSTDIR\update-logs\ant-update-application-xml.log" -buildfile "$TEMP\lams\update-deploy-tools.xml" -D"prop.path=$TOOL_SIG" update-application-xml' DetailPrint $0 nsExec::ExecToStack $0 Pop $0 ; return code, 0=success, error=fail @@ -870,11 +1020,20 @@ ${endif} DetailPrint "Result: $1" + push "$INSTDIR\update-logs\ant-update-application-xml.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 + goto done error: DetailPrint "Application.xml update failed" - MessageBox MB_OK|MB_ICONSTOP "Application.xml update failed $\r$\nError:$\r$\n$\r$\n$1" - Abort "Application.xml update failed" + MessageBox MB_OK|MB_ICONSTOP "Application.xml update failed, check update logs in the installation directory for details $\r$\nError:$\r$\n$\r$\n$1" + Abort "LAMS configuration failed" done: FunctionEnd @@ -895,16 +1054,12 @@ SetOutPath "$TEMP\lams\lib" File "..\..\lams_build\deploy-tool\lib\*.jar" - # Extract the ant scripts to create the tools - SetOutPath "$TEMP\lams" - File "..\templates\update-deploy-tools.xml" - ; Updating application.xml call updateApplicationXML - /*# Exploding the lams-learning.war and lams-monitoring.war - strcpy $0 '$INSTDIR\apache-ant-1.6.5\bin\ant.bat -logfile $INSTDIR\update-logs\ant-explode-wars.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG explode-wars' + # Exploding the lams-learning.war and lams-monitoring.war + strcpy $0 '$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat -logfile $INSTDIR\update-logs\ant-explode-wars.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG explode-wars' DetailPrint $0 nsExec::ExecToStack $0 Pop $0 ; return code, 0=success, error=fail @@ -914,58 +1069,97 @@ goto error ${endif} DetailPrint "Result: $1" - */ + push "$INSTDIR\update-logs\ant-explode-wars.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 + # Creating all the tools, then deploying them strcpy $TOOL_SIG "lachat11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lafrum11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lamc11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "laqa11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "larsrc11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lanb11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lantbk" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lasbmt11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lascrb11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lasurv11" call runCreateDeployPackage call deployTool + call runUpdateToolContext strcpy $TOOL_SIG "lavote11" call runCreateDeployPackage call deployTool + call runUpdateToolContext + strcpy $0 '$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat -logfile $INSTDIR\update-logs\ant-compress-wars.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG compress-wars' + 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-compress-wars.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 + + goto done error: DetailPrint "Problem compressing/expanding lams-monitoring.war and lams-learning.war" MessageBox MB_OK|MB_ICONSTOP "Problem compressing/expanding lams-monitoring.war and lams-learning.war $\r$\nError:$\r$\n$\r$\n$1" - Abort "Problem compressing/expanding lams-monitoring.war and lams-learning.war" + Abort "LAMS configuration failed" done: FunctionEnd @@ -974,7 +1168,7 @@ # Tool created depends on the value of $TOOL_SIG Function runCreateDeployPackage # Running the ant scripts to create deploy.xml for the normal tools - strcpy $0 '$INSTDIR\apache-ant-1.6.5\bin\ant.bat -logfile $INSTDIR\update-logs\ant-create-deploy-package-$TOOL_SIG.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG create-deploy-package' + strcpy $0 '$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat -logfile $INSTDIR\update-logs\ant-create-deploy-package-$TOOL_SIG.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG create-deploy-package' DetailPrint $0 nsExec::ExecToStack $0 Pop $0 ; return code, 0=success, error=fail @@ -984,7 +1178,16 @@ goto error ${endif} DetailPrint "Result: $1" + push "$INSTDIR\update-logs\ant-create-deploy-package-$TOOL_SIG.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 + goto done error: DetailPrint "Ant create-tools-package failed, check update-logs for details" @@ -993,7 +1196,69 @@ done: FunctionEnd +# Running the ant scripts to create update the tool context paths +# Tool created depends on the value of $TOOL_SIG +Function runUpdateToolContext + # 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-tool-context-$TOOL_SIG.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG update-tool-context' + 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-tool-context-$TOOL_SIG.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 + goto done + error: + DetailPrint "Ant update-tool-context failed, check update-logs for details" + MessageBox MB_OK|MB_ICONSTOP "Ant update-tool-context failed, check update-logs for details$\r$\nError:$\r$\n$\r$\n$1" + Abort "LAMS configuration failed." + done: +FunctionEnd + +# Deploying the updated tools +Function deployTool + # 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-deploy-tool-$TOOL_SIG.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG deploy-tool' + DetailPrint $0 + nsExec::ExecToStack $0 + Pop $0 ; return code, 0=success, error=fail + Pop $1 ; console output + DetailPrint "Result: $1" + ${if} $0 == "fail" + ${orif} $0 == 1 + goto error + ${endif} + push "$INSTDIR\update-logs\ant-deploy-tool--$TOOL_SIG.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 + + + goto done + error: + DetailPrint "Ant deploy-tool failed, check update-logs for details" + MessageBox MB_OK|MB_ICONSTOP "Ant deploy-tool failed, check update-logs for details$\r$\nError:$\r$\n$\r$\n$1" + Abort "LAMS configuration failed." + done: +FunctionEnd + + # generates a properties file for all tools Function generateToolProperties @@ -1173,28 +1438,8 @@ FunctionEnd -# Deploying the updated tools -Function deployTool - # Running the ant scripts to create deploy.xml for the normal tools - strcpy $0 '$INSTDIR\apache-ant-1.6.5\bin\ant.bat -verbose -logfile $INSTDIR\update-logs\ant-deploy-tool-$TOOL_SIG.log -buildfile $TEMP\lams\update-deploy-tools.xml -Dprop.path=$TEMP\lams\$TOOL_SIG deploy-tool' - DetailPrint $0 - nsExec::ExecToStack $0 - Pop $0 ; return code, 0=success, error=fail - Pop $1 ; console output - ${if} $0 == "fail" - ${orif} $0 == 1 - goto error - ${endif} - DetailPrint "Result: $1" - - goto done - error: - DetailPrint "Ant deploy-tool failed, check update-logs for details" - MessageBox MB_OK|MB_ICONSTOP "Ant create-tools-package failed, check update-logs for details$\r$\nError:$\r$\n$\r$\n$1" - Abort "LAMS configuration failed." - done: -FunctionEnd + ################################################################################ # END CODE USED FOR UPDATER # ################################################################################ @@ -1451,7 +1696,7 @@ RMdir /r "$INSTDIR\backup\repository" delete "$INSTDIR\backup\lamsDump.sql" - Detailprint "FINISHED COPYTING lamsdump.sql" + Detailprint "finished copying lamsdump.sql" ${endif} @@ -1467,12 +1712,8 @@ FileWrite $R0 $1 FileClose $R0 + - ${StrStr} $0 $1 "BUILD SUCCESSFUL" - ${If} $0 == "" - goto error - ${EndIf} - /*${if} $RETAIN_FILES == '1' #replace the install dump with the retained dump #CopyFiles "$INSTDIR\backup\lamsDump.sql" "$TEMP\dump.sql" @@ -1631,6 +1872,7 @@ rmdir /r "$TEMP\installer.properties" rmdir /r "$TEMP\lams" WriteRegStr HKLM "${REG_HEAD}" "language_pack" $OLD_VERSION + WriteRegStr HKLM "${REG_HEAD}" "version" ${BASE_VERSION} delete "$INSTDIR\updateLocales.sql" delete "$INSTDIR\LanguagePack.xml" @@ -1990,10 +2232,14 @@ SetOutPath $INSTDIR File /a "LanguagePack.xml" + + ReadRegStr $0 HKLM "${REG_HEAD}" "dir_inst" + + ; update locals must be stored as a procedure first ; use ANT to store procedures - DetailPrint '$INSTDIR\apache-ant-1.6.5\bin\ant.bat insertLocale-db' - nsExec::ExecToStack '$INSTDIR\apache-ant-1.6.5\bin\ant.bat -buildfile $INSTDIR\LanguagePack.xml insertLocale-db' + 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' Pop $0 ; return code, 0=success, error=fail Pop $1 ; console output DetailPrint "Database insert status: $0"