0
|
1 |
!macro db_connect result user pass
|
|
2 |
Push "${user}"
|
|
3 |
Push "${pass}"
|
|
4 |
ClearErrors
|
|
5 |
StrCmp $db_driver "mysql" 0 +3
|
|
6 |
Call mysql_connect
|
|
7 |
Goto +2
|
|
8 |
Call postgresql_connect
|
|
9 |
Pop ${result}
|
|
10 |
!macroend
|
|
11 |
|
|
12 |
!define db_connect "!insertmacro db_connect"
|
|
13 |
|
|
14 |
!macro db_create result user pass dbname nuser npass
|
|
15 |
Push "${user}"
|
|
16 |
Push "${pass}"
|
|
17 |
Push "${dbname}"
|
|
18 |
Push "${nuser}"
|
|
19 |
Push "${npass}"
|
|
20 |
StrCmp $db_driver "mysql" 0 +3
|
|
21 |
Call mysql_create_db
|
|
22 |
Goto +2
|
|
23 |
Call postgresql_create_db
|
|
24 |
Pop ${result}
|
|
25 |
!macroend
|
|
26 |
|
|
27 |
!define db_create "!insertmacro db_create" |