Index: win_installer/README
===================================================================
RCS file: /usr/local/cvsroot/win_installer/Attic/README,v
diff -u -r1.4 -r1.5
--- win_installer/README 20 Oct 2006 05:40:18 -0000 1.4
+++ win_installer/README 31 Oct 2006 06:29:42 -0000 1.5
@@ -11,7 +11,9 @@
1. Build LAMS as usual. If using an alternate location for JBOSS_HOME, specify
at the top of src/installer.nsi
2. Check out jsMath and run the build-war ant target (needed for
- step 5)
-3. Run the dump-db and compile-java targets in the main build.xml file
-4. Compile src/lams-start.nsi and src/lams-stop.nsi
-5. Compile src/installer.nsi.
+ step 6)
+3. Start LAMS, login as sysadmin/sysadmin, and delete the users 'test', 'mmm'
+ and 'lamskh01'.
+4. Run the dump-db and compile-java targets in the main build.xml file
+5. Compile src/lams-start.nsi and src/lams-stop.nsi
+6. Compile src/installer.nsi.
Index: win_installer/src/build.xml
===================================================================
RCS file: /usr/local/cvsroot/win_installer/src/Attic/build.xml,v
diff -u -r1.4 -r1.5
--- win_installer/src/build.xml 20 Oct 2006 05:40:18 -0000 1.4
+++ win_installer/src/build.xml 31 Oct 2006 06:29:42 -0000 1.5
@@ -22,6 +22,8 @@
+
+
Index: win_installer/src/installer.nsi
===================================================================
RCS file: /usr/local/cvsroot/win_installer/src/Attic/installer.nsi,v
diff -u -r1.10 -r1.11
--- win_installer/src/installer.nsi 20 Oct 2006 05:40:18 -0000 1.10
+++ win_installer/src/installer.nsi 31 Oct 2006 06:29:42 -0000 1.11
@@ -24,11 +24,8 @@
/*
* TODO: uninstaller option to keep database/repository
- * TODO: detect if db exists and has data, ask whether to use or import fresh db
- * TODO: custom lams admin user LI-27
+ * TODO: installer option to use existing db/repo
* TODO: desktop icons, readme?
- * TODO: transaction isolation
- * TODO: checkbox to start lams on finish page
*/
# includes
@@ -37,8 +34,9 @@
!include "MUI.nsh"
!include "LogicLib.nsh"
-# function from TextFunc.nsh
+# functions from TextFunc.nsh
!insertmacro FileJoin
+!insertmacro LineFind
# constants
!define VERSION "2.0 RC1"
@@ -79,6 +77,9 @@
!define MUI_UNFINISHPAGE_NOAUTOCLOSE
# display finish page stuff
+!define MUI_FINISHPAGE_RUN $INSTDIR\lams-start.exe
+!define MUI_FINISHPAGE_RUN_TEXT "Start LAMS now."
+;!define MUI_FINISHPAGE_TEXT "The LAMS Server has been successfully installed on your computer."
!define MUI_FINISHPAGE_LINK "Visit LAMS Community"
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.lamscommunity.org"
@@ -195,7 +196,7 @@
Section "JBoss 4.0.2" jboss
SectionIn RO
SetOutPath $INSTDIR
- File /a /r /x all /x minimal /x log /x tmp /x work /x jsMath.war ${SOURCE_JBOSS_HOME}
+ File /a /r /x all /x minimal /x robyn /x log /x tmp /x work /x jsMath.war ${SOURCE_JBOSS_HOME}
SectionEnd
Section "LAMS ${VERSION}" lams
@@ -570,6 +571,8 @@
FileWrite $0 "DB_PASS=$DB_PASS$\r$\n"
FileWrite $0 "LAMS_PORT=$LAMS_PORT$\r$\n"
+ FileWrite $0 "LAMS_USER=$LAMS_USER$\r$\n"
+ FileWrite $0 "LAMS_PASS=$LAMS_PASS$\r$\n"
FileClose $0
# for debugging purposes
CopyFiles "$TEMP\installer.properties" $INSTDIR
@@ -585,13 +588,12 @@
nsExec::ExecToStack '$INSTDIR\apache-ant-1.6.5\bin\newAnt.bat configure-deploy'
Pop $0 ; return code, 0=success, error=fail
Pop $1 ; console output
- DetailPrint "LAMS configure status: $0"
- DetailPrint "LAMS configure output: $1"
FileOpen $R0 "$INSTDIR\installer_ant.log" w
IfErrors 0 +2
goto error
FileWrite $R0 $1
+ FileClose $R0
${If} $0 == "error"
goto error
@@ -601,15 +603,32 @@
goto error
${EndIf}
+ # write my.ini if exists
+ # TODO doesn't check if tx_isolation is already READ-COMMITTED
+ # TODO doesn't take effect until mysql server is restarted
+ DetailPrint "Setting MySQL transaction-isolation to READ-COMMITTED"
+ ${LineFind} "$MYSQL_DIR\my.ini" "" "1" "WriteMyINI"
+ IfErrors 0 +2
+ MessageBox MB_OK|MB_ICONEXCLAMATION "Couldn't write to $MYSQL_DIR\my.ini. Please write this text into your MySQL configuration file and restart MySQL:$\r$\n$\r$\n[mysqld]$\r$\ntransaction-isolation=READ-COMMITTED"
+ DetailPrint "MySQL will need to be restarted for this to take effect."
+
goto done
error:
+ DetailPrint "Ant configure-deploy failed."
MessageBox MB_OK|MB_ICONSTOP "LAMS configuration failed. Please check your LAMS configuration and try again.$\r$\nError:$\r$\n$\r$\n$1"
Abort "LAMS configuration failed."
done:
FunctionEnd
+Function WriteMyINI
+ FileWrite $R4 "[mysqld]$\r$\n"
+ FileWrite $R4 "transaction-isolation=READ-COMMITTED$\r$\n"
+ Push $0
+FunctionEnd
+
+
Function ImportDatabase
SetOutPath $TEMP
File "..\build\dump.sql"
@@ -826,6 +845,7 @@
!insertmacro MUI_INSTALLOPTIONS_READ $UNINSTALL_DB "uninstall.ini" "Field 1" "State"
FunctionEnd
+
# http://nsis.sourceforge.net/StrStr
#
!define un.StrStr "!insertmacro un.StrStr"
Index: win_installer/src/lams2.ini
===================================================================
RCS file: /usr/local/cvsroot/win_installer/src/Attic/lams2.ini,v
diff -u -r1.2 -r1.3
--- win_installer/src/lams2.ini 5 Oct 2006 05:47:21 -0000 1.2
+++ win_installer/src/lams2.ini 31 Oct 2006 06:29:42 -0000 1.3
@@ -16,7 +16,7 @@
Right=130
Bottom=94
State=sysadmin
-Flags=DISABLED
+Flags=
[Field 3]
Type=Label
@@ -41,7 +41,7 @@
Right=264
Bottom=93
State=sysadmin
-Flags=DISABLED
+Flags=
[Field 6]
Type=Link
Index: win_installer/templates/update_lams_configuration.sql
===================================================================
RCS file: /usr/local/cvsroot/win_installer/templates/Attic/update_lams_configuration.sql,v
diff -u -r1.1 -r1.2
--- win_installer/templates/update_lams_configuration.sql 20 Oct 2006 05:40:18 -0000 1.1
+++ win_installer/templates/update_lams_configuration.sql 31 Oct 2006 06:29:42 -0000 1.2
@@ -10,3 +10,4 @@
update lams_configuration set config_value='@WILDFIRE_CONFERENCE@' where config_key='XmppConference';
update lams_configuration set config_value='@WILDFIRE_USER@' where config_key='XmppAdmin';
update lams_configuration set config_value='@WILDFIRE_PASS@' where config_key='XmppPassword';
+update lams_user set login='@LAMS_USER@', password=sha1('@LAMS_PASS@') where user_id=1;