Index: win_installer/src/language-pack.nsi =================================================================== diff -u -rf673ab71b94d65e28c3b9f637f8da786ef71321c -r0ad0bf312deca86e215b2abe611441c6cf9b2646 --- win_installer/src/language-pack.nsi (.../language-pack.nsi) (revision f673ab71b94d65e28c3b9f637f8da786ef71321c) +++ win_installer/src/language-pack.nsi (.../language-pack.nsi) (revision 0ad0bf312deca86e215b2abe611441c6cf9b2646) @@ -26,6 +26,7 @@ !include "Functions.nsh" !include "MUI.nsh" !include "LogicLib.nsh" +!include "Array.nsh" # constants !define VERSION "2006-12-12" ; DATE of language pack in fromat YYYYMMDD @@ -149,6 +150,11 @@ # Variables ;-------------------------------- +Var MYSQL_DIR +Var MYSQL_ROOT_PASS +Var DB_NAME +Var DB_USER +Var DB_PASS Var BACKUP_DIR Var LAMS_DIR Var VERSION_INT @@ -170,16 +176,21 @@ ; 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 + ; copy the flash dictionary files from central/web/flashxml to: ; \server\default\lams.ear\lams-central.war\flashxml call copyFlashxml - #################### # TODO Work out what language files to copy to the 'library' directory # TODO Copy the flshxml files #################### + #SELECT concat("@",learning_library_id,"@") FROM lams_learning_library SELECT concat("@",learning_library_id,"@") FROM lams_learning_library + #lams_blah\conf\language\*.properties # lams_central\flashxml\* SectionEnd @@ -245,7 +256,7 @@ setoutpath $INSTDIR rmdir /r "$BACKUP_DIR" createdirectory "$BACKUP_DIR" - Strcpy $4 '$EXEDIR\zip\7za.exe a -r -tzip "$BACKUP_DIR\lamsDictionaryBak.zip" "*"' + Strcpy $4 '$EXEDIR\zip\7za.exe a -r -tzip "$BACKUP_DIR\lamsDictionaryBak-${VERSION}.zip" "*"' nsExec::ExecToStack $4 pop $8 pop $9 @@ -292,7 +303,6 @@ detailprint "Extracting language files for lams_common" file /a "..\..\lams_common\conf\language\*" - ;copying ADMIN project language files setoutpath "$INSTDIR\admin" detailprint "Extracting language files for lams_admin" @@ -375,15 +385,26 @@ FunctionEnd +${Array} FOLDERS +; first, finds the location of the language files in the database +; then copy the required files to the dirname +Function copyllid + ReadRegStr $MYSQL_DIR HKLM "${REG_HEAD}" "dir_mysql" + ReadRegStr $DB_NAME HKLM "${REG_HEAD}" "db_name" + ReadRegStr $DB_USER HKLM "${REG_HEAD}" "db_user" + ReadRegStr $DB_PASS HKLM "${REG_HEAD}" "db_pass" + ;DO I NEED SQL_ROOT_PASS?????????????????? + + ${FOLDERS->init} +FunctionEnd + ; copys the files from lams_central/web/flashxml to: ; "/\server\default\lams.ear\lams-central.war\flashxml Function copyFlashxml strcpy $FLASHXML_DIR "$LAMS_DIR\jboss-4.0.2\server\default\deploy\lams.ear\lams-central.war\flashxml" - setoutpath $FLASHXML_DIR detailprint "Extracting language files for FLASH" file /a /r /x "CVS" "..\..\lams_central\web\flashxml\*" - detailprint "DONE!" - + detailprint "DONE!" FunctionEnd