inst-resources/dbal.nsh
changeset 0 67e1cc6cd929
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/inst-resources/dbal.nsh	Wed May 27 01:05:23 2009 -0400
@@ -0,0 +1,27 @@
+!macro db_connect result user pass
+  Push "${user}"
+  Push "${pass}"
+  ClearErrors
+  StrCmp $db_driver "mysql" 0 +3
+    Call mysql_connect
+    Goto +2
+    Call postgresql_connect
+  Pop ${result}
+!macroend
+
+!define db_connect "!insertmacro db_connect"
+
+!macro db_create result user pass dbname nuser npass
+  Push "${user}"
+  Push "${pass}"
+  Push "${dbname}"
+  Push "${nuser}"
+  Push "${npass}"
+  StrCmp $db_driver "mysql" 0 +3
+    Call mysql_create_db
+    Goto +2
+    Call postgresql_create_db
+  Pop ${result}
+!macroend
+
+!define db_create "!insertmacro db_create"
\ No newline at end of file