19 !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS "pages\DatabaseConfig.ini" "DatabaseConfig.ini" |
19 !insertmacro XPUI_INSTALLOPTIONS_EXTRACT_AS "pages\DatabaseConfig.ini" "DatabaseConfig.ini" |
20 !insertmacro XPUI_HEADER_TEXT "Database configuration" "Configure how $(^Name) will access your database." |
20 !insertmacro XPUI_HEADER_TEXT "Database configuration" "Configure how $(^Name) will access your database." |
21 WriteINIStr "$PLUGINSDIR\DatabaseConfig.ini" "Field 9" "Text" \ |
21 WriteINIStr "$PLUGINSDIR\DatabaseConfig.ini" "Field 9" "Text" \ |
22 "$(^Name) needs database access to work properly. Setup can create a database for you if you provide \ |
22 "$(^Name) needs database access to work properly. Setup can create a database for you if you provide \ |
23 $db_dbmsname's administration password, or you can choose to enter credentials for a database that already exists." |
23 $db_dbmsname's administration password, or you can choose to enter credentials for a database that already exists." |
24 |
24 |
|
25 StrCpy $R2 0 ; Hide manual credential items |
|
26 StrCpy $R3 0 ; Hide root password/set manual to disabled |
|
27 |
|
28 ; if the back button was clicked we might have use manual checked |
|
29 ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 3" "State" |
|
30 IntCmp $0 1 UseManualIsOn |
|
31 |
|
32 StrCpy $R2 1 |
|
33 |
|
34 UseManualIsOn: |
|
35 |
|
36 ; do we need to disable the checkbox? |
|
37 ReadINIStr $0 "$PLUGINSDIR\DatabaseConfig.ini" "Field 2" "State" |
|
38 IntCmp $0 1 0 ShowDialog ShowDialog |
|
39 |
|
40 StrCpy $R3 1 |
|
41 |
|
42 ShowDialog: |
|
43 |
25 !insertmacro XPUI_INSTALLOPTIONS_INITDIALOG "DatabaseConfig.ini" |
44 !insertmacro XPUI_INSTALLOPTIONS_INITDIALOG "DatabaseConfig.ini" |
26 Pop $XPUI_HWND |
45 Pop $XPUI_HWND |
27 |
46 |
28 ${ShowRange} $XPUI_HWND 1204 1207 ${SW_HIDE} |
47 IntCmp $R2 1 "" SkipHideManual |
29 ${ShowRange} $XPUI_HWND 1210 1213 ${SW_HIDE} |
48 |
30 |
49 ${ShowRange} $XPUI_HWND 1204 1207 ${SW_HIDE} |
|
50 ${ShowRange} $XPUI_HWND 1210 1213 ${SW_HIDE} |
|
51 |
|
52 SkipHideManual: |
|
53 |
|
54 IntCmp $R3 1 "" SkipForceManual |
|
55 |
|
56 ; check the box and disable |
|
57 GetDlgItem $0 $XPUI_HWND 1202 |
|
58 SendMessage $0 ${BM_SETCHECK} ${BST_CHECKED} 0 |
|
59 EnableWindow $0 0 |
|
60 |
|
61 ; hide the root password, enter manually is selected |
|
62 GetDlgItem $0 $XPUI_HWND 1203 |
|
63 ShowWindow $0 ${SW_HIDE} |
|
64 GetDlgItem $0 $XPUI_HWND 1209 |
|
65 ShowWindow $0 ${SW_HIDE} |
|
66 |
|
67 SkipForceManual: |
|
68 |
31 !insertmacro XPUI_INSTALLOPTIONS_SHOW |
69 !insertmacro XPUI_INSTALLOPTIONS_SHOW |
32 FunctionEnd |
70 FunctionEnd |
33 |
71 |
34 Function DatabaseConfigLeave |
72 Function DatabaseConfigLeave |
35 StrCmp $XPUI_ABORTED 1 0 +2 |
73 StrCmp $XPUI_ABORTED 1 0 +2 |