From bf2cfa77a1003319b4c0b768f724d1481ec866aa Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 3 Jun 2014 18:39:12 +0200 Subject: Remove unnecessary sub-directory --- test/windows/README | 2 +- test/windows/all | 67 ++++++++++++++ test/windows/build.bat | 184 ++++++++++++++++++++++++++++++++++++ test/windows/default.options | 4 + test/windows/mingw/build | 185 +++++++++++++++++++++++++++++++++++++ test/windows/mingw/unpack | 3 + test/windows/mssql-driver.bat | 62 +++++++++++++ test/windows/mssql.options | 10 ++ test/windows/mysql-driver.bat | 46 +++++++++ test/windows/mysql.options | 8 ++ test/windows/odb/all | 67 -------------- test/windows/odb/build.bat | 184 ------------------------------------ test/windows/odb/default.options | 4 - test/windows/odb/mingw/build | 185 ------------------------------------- test/windows/odb/mingw/unpack | 3 - test/windows/odb/mssql-driver.bat | 62 ------------- test/windows/odb/mssql.options | 10 -- test/windows/odb/mysql-driver.bat | 46 --------- test/windows/odb/mysql.options | 8 -- test/windows/odb/oracle-driver.bat | 42 --------- test/windows/odb/oracle.options | 7 -- test/windows/odb/pgsql-driver.bat | 52 ----------- test/windows/odb/pgsql.options | 6 -- test/windows/odb/setenv.bat | 43 --------- test/windows/odb/sqlite-driver.bat | 1 - test/windows/odb/sqlite.options | 1 - test/windows/odb/unpack | 102 -------------------- test/windows/oracle-driver.bat | 42 +++++++++ test/windows/oracle.options | 7 ++ test/windows/pgsql-driver.bat | 52 +++++++++++ test/windows/pgsql.options | 6 ++ test/windows/setenv.bat | 43 +++++++++ test/windows/sqlite-driver.bat | 1 + test/windows/sqlite.options | 1 + test/windows/unpack | 102 ++++++++++++++++++++ 35 files changed, 824 insertions(+), 824 deletions(-) create mode 100755 test/windows/all create mode 100755 test/windows/build.bat create mode 100644 test/windows/default.options create mode 100755 test/windows/mingw/build create mode 100755 test/windows/mingw/unpack create mode 100644 test/windows/mssql-driver.bat create mode 100644 test/windows/mssql.options create mode 100644 test/windows/mysql-driver.bat create mode 100644 test/windows/mysql.options delete mode 100755 test/windows/odb/all delete mode 100755 test/windows/odb/build.bat delete mode 100644 test/windows/odb/default.options delete mode 100755 test/windows/odb/mingw/build delete mode 100755 test/windows/odb/mingw/unpack delete mode 100644 test/windows/odb/mssql-driver.bat delete mode 100644 test/windows/odb/mssql.options delete mode 100644 test/windows/odb/mysql-driver.bat delete mode 100644 test/windows/odb/mysql.options delete mode 100644 test/windows/odb/oracle-driver.bat delete mode 100644 test/windows/odb/oracle.options delete mode 100644 test/windows/odb/pgsql-driver.bat delete mode 100644 test/windows/odb/pgsql.options delete mode 100644 test/windows/odb/setenv.bat delete mode 100644 test/windows/odb/sqlite-driver.bat delete mode 100644 test/windows/odb/sqlite.options delete mode 100755 test/windows/odb/unpack create mode 100644 test/windows/oracle-driver.bat create mode 100644 test/windows/oracle.options create mode 100644 test/windows/pgsql-driver.bat create mode 100644 test/windows/pgsql.options create mode 100644 test/windows/setenv.bat create mode 100644 test/windows/sqlite-driver.bat create mode 100644 test/windows/sqlite.options create mode 100755 test/windows/unpack (limited to 'test') diff --git a/test/windows/README b/test/windows/README index 5ab9228..8d9aa3b 100644 --- a/test/windows/README +++ b/test/windows/README @@ -7,7 +7,7 @@ Assumptions: Steps: -1. Copy odb\ to the root directory. +1. Copy contents to the odb/ sub-directory under the root directory. 2. Edit default.options, -driver.bat and .options to match your setup. diff --git a/test/windows/all b/test/windows/all new file mode 100755 index 0000000..9b91ca3 --- /dev/null +++ b/test/windows/all @@ -0,0 +1,67 @@ +#! /usr/bin/env bash + +trap 'exit 1' ERR + +function error () +{ + echo "$*" 1>&2 +} + +function usage () +{ + error "usage: $0 qt-version vc-version database conf plat [action]" + error " valid configurations are: {Debug,Release}|all" + error " valid platforms are: {Win32,x64}|all" + error " valid actions are: /Build (default), /Clean, and /Rebuild" +} + +if [ "$1" = "" ]; then + error qt version expected + usage + exit 1 +fi + +if [ "$2" = "" ]; then + error vc version expected + usage + exit 1 +fi + +if [ "$3" = "" ]; then + error database expected + usage + exit 1 +else + if [ "$3" = "all" ]; then + databases="mssql oracle pgsql sqlite mysql" + else + databases=$3 + fi +fi + +if [ "$4" = "" ]; then + error configuration expected + usage + exit 1 +fi + +if [ "$5" = "" ]; then + error platform expected + usage + exit 1 +fi + +action=$6 +if [ "$action" == "" ]; then + action=/Build +fi + +for d in $databases; do + cmd.exe /C setenv.bat "$2" build.bat "$d" "$1" "$2" "$4" "$5" "$action" + cd odb-tests-$d + cmd.exe /C ..\\setenv.bat "$2" test.bat "$d" + cd .. + cd odb-examples-$d + cmd.exe /C ..\\setenv.bat "$2" test.bat "$d" + cd .. +done diff --git a/test/windows/build.bat b/test/windows/build.bat new file mode 100755 index 0000000..2718206 --- /dev/null +++ b/test/windows/build.bat @@ -0,0 +1,184 @@ +@echo off +rem file : build.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +rem +rem build.bat database qt-version vc-version conf plat [/Build|/Clean|/Rebuild] +rem +rem conf: {Debug,Release}|all +rem plat: {Win32,x64}|all +rem + +setlocal + +if "_%1_" == "__" ( + echo no database specified + goto usage +) + +if "_%2_" == "__" ( + echo no Qt version specified + goto usage +) + +if "_%3_" == "__" ( + echo no VC++ version specified + goto usage +) + +if "_%~4_" == "__" ( + echo no configuration specified + goto usage +) + +if "_%~5_" == "__" ( + echo no platform specified + goto usage +) + +set "failed=" + +if "_%2_" == "_0_" set "qtver=0" +if "_%2_" == "_4_" set "qtver=4" +if "_%2_" == "_5_" set "qtver=5" + +if "_%qtver%_" == "__" ( + echo unknown Qt version %2 + goto usage +) + +if "_%3_" == "_8_" set "vcver=8" +if "_%3_" == "_9_" set "vcver=9" +if "_%3_" == "_10_" set "vcver=10" +if "_%3_" == "_11_" set "vcver=11" +if "_%3_" == "_12_" set "vcver=12" + +if "_%vcver%_" == "__" ( + echo unknown VC++ version %3 + goto usage +) + +set "confs=%~4" +set "plats=%~5" + +if "_%confs%_" == "_all_" set "confs=Debug Release" +if "_%plats%_" == "_all_" set "plats=Win32 x64" + +set "action=%6" +if "_%action%_" == "__" set "action=/Build" + +set "devenv=%DEVENV%" +if "_%devenv%_" == "__" set "devenv=devenv.com" + +goto start + +rem +rem %1 - solution name +rem %2 - configuration to build +rem %3 - platform to build +rem +:run_build + echo. + echo building %1 %3 %2 + "%devenv%" %1 %action% "%2|%3" 2>&1 + if errorlevel 1 set "failed=%failed% %1\%3\%2" +goto :eof + +:start + +for %%d in (libodb libodb-%1 libodb-boost) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_build %%d/%%d-vc%vcver%.sln %%c %%p + ) + ) +) + +if not "_%failed%_" == "__" goto error + +if "_%qtver%_" == "_0_" goto skip_libodb_qt +for %%d in (libodb-qt) do ( + for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_build %%d/%%d%qtver%-vc%vcver%.sln %%c %%p + ) + ) +) +if not "_%failed%_" == "__" goto error +:skip_libodb_qt + +for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_build odb-examples-%1/examples-%1-vc%vcver%.sln %%c %%p + ) +) + +if not "_%failed%_" == "__" goto error + +for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_build odb-examples-%1/boost/boost-%1-vc%vcver%.sln %%c %%p + ) +) + +if not "_%failed%_" == "__" goto error + +if "_%qtver%_" == "_0_" goto skip_qt_examples +for %%c in (%confs%) do ( + for %%p in (%plats%) do ( + call :run_build odb-examples-%1/qt/qt%qtver%-%1-vc%vcver%.sln %%c %%p + ) +) +if not "_%failed%_" == "__" goto error +:skip_qt_examples + +cd odb-tests-%1 +call build.bat %1 %3 %4 %5 %action% +if errorlevel 1 ( + cd .. + goto error +) + +cd boost +call build.bat %1 %3 %4 %5 %action% +if errorlevel 1 ( + cd ..\.. + goto error +) +cd .. + +if "_%qtver%_" == "_0_" goto skip_qt_tests +cd qt +call build.bat %1 %2 %3 %4 %5 %action% +if errorlevel 1 ( + cd ..\.. + goto error +) +cd .. +:skip_qt_tests + +echo. +echo ALL BUILDS SUCCEEDED +echo. +goto end + +:usage +echo. +echo usage: build.bat database qt-version vc-version conf plat [action] +echo valid configurations are: {Debug,Release}|all +echo valid platforms are: {Win32,x64}|all +echo valid actions are: /Build (default), /Clean, and /Rebuild +echo. + +:error +if not "_%failed%_" == "__" ( + echo. + for %%t in (%failed%) do echo FAILED: %%t + echo. +) +endlocal +exit /b 1 + +:end +endlocal diff --git a/test/windows/default.options b/test/windows/default.options new file mode 100644 index 0000000..95f42e8 --- /dev/null +++ b/test/windows/default.options @@ -0,0 +1,4 @@ +-I C:\projects\boost-vc10.0 +-I C:\projects\qtcore-vc10.0\include +-I C:\projects\qtcore-vc10.0\include\QtCore +#-D MSSQL_SERVER_VERSION=900 \ No newline at end of file diff --git a/test/windows/mingw/build b/test/windows/mingw/build new file mode 100755 index 0000000..6394fdf --- /dev/null +++ b/test/windows/mingw/build @@ -0,0 +1,185 @@ +#! /usr/bin/env bash + +# Build ODB for MinGW +# +# -rebuild +# -test +# -db +# +trap 'exit 1' ERR + +function error () +{ + echo "$*" 1>&2 +} + +function clean () +{ + if [ -f $1/Makefile ]; then + make -C $1 distclean + fi +} + +ROOT=/c/projects +MYSQL=$ROOT/mysql-mingw32 +SQLITE=$ROOT/sqlite-mingw32 +PGSQL=$ROOT/pgsql-mingw32 +ORACLE=$ROOT/oracle-mingw32 +BOOST=$ROOT/boost-mingw32 +QTCORE=$ROOT/qtcore-mingw32 + +CPPFLAGS="-I$BOOST -I$QTCORE/include -I$QTCORE/include/QtCore -I$ORACLE/sdk/include -I$PGSQL/include -I$SQLITE -I$MYSQL/include" +LDFLAGS="-L$BOOST/stage/lib -L$QTCORE/lib -L$ORACLE/sdk/lib -L$PGSQL/lib -L$SQLITE -L$MYSQL/lib -Wl,--enable-auto-import" +PATH="$QTCORE/bin:$ORACLE:$PATH" + +mysql_options="--with-mysql-host=192.168.0.2 --with-mysql-client=$MYSQL/bin/mysql.exe" +sqlite_options="--with-sqlite-db=c:\\projects\\odb\\odb_test.db" +pgsql_options="--with-pgsql-host=192.168.0.2 --with-pgsql-client=$PGSQL/bin/psql.exe" +oracle_options="--with-oracle-host=192.168.0.2 --with-oracle-service=xe --with-oracle-client=$ORACLE/sqlplus.exe" +mssql_options="--with-mssql-server=windows2008r2\\ss2008r2,1435" + +test=n +rebuild=n +db= + +while [ $# -gt 0 ]; do + case $1 in + -rebuild) + rebuild=y + shift + ;; + -test) + test=y + shift + ;; + -db) + shift + db="$db $1" + shift + ;; + *) + error "unknown option: $1" + exit 1 + ;; + esac +done + +if [ "$db" = "" ]; then + db="mssql oracle pgsql sqlite mysql" +fi + +# Clean everything up if we are rebuilding. +# +if [ $rebuild = y ]; then + clean libodb + clean libodb-mssql + clean libodb-oracle + clean libodb-pgsql + clean libodb-sqlite + clean libodb-mysql + clean libodb-boost + clean libodb-qt + + for d in $db; do + rm -rf odb-tests-$d + rm -rf odb-examples-$d + done +fi + +# Build libodb +# +cd libodb + +if [ $rebuild = y -o ! -f Makefile ]; then + ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" +fi + +make +cd .. + +# Build libodb- +# +for d in $db; do + cd libodb-$d + + if [ $rebuild = y -o ! -f Makefile ]; then + ./configure --with-libodb=../libodb CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" + fi + + make + cd .. +done + +# Build libodb-boost +# +cd libodb-boost + +if [ $rebuild = y -o ! -f Makefile ]; then + ./configure --with-libodb=../libodb CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" +fi + +make +cd .. + +# Build libodb-qt +# +cd libodb-qt + +if [ $rebuild = y -o ! -f Makefile ]; then + ./configure --with-libodb=../libodb CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" +fi + +make +cd .. + +# Build odb-tests +# +for d in $db; do + mkdir -p odb-tests-$d + cd odb-tests-$d + + optvar=${d}_options + + if [ $rebuild = y -o ! -f Makefile ]; then + ../odb-tests/configure \ +--with-database=$d \ +--with-libodb=../libodb \ +--with-libodb-$d=../libodb-$d \ +--with-libodb-boost=../libodb-boost \ +--with-libodb-qt=../libodb-qt \ +${!optvar} \ +CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" DIFFFLAGS=-ubB + fi + + make + if [ $test = y ]; then + make check + fi + cd .. +done + +# Build odb-examples +# +for d in $db; do + mkdir -p odb-examples-$d + cd odb-examples-$d + + optvar=${d}_options + + if [ $rebuild = y -o ! -f Makefile ]; then + ../odb-examples/configure \ +--with-database=$d \ +--with-libodb=../libodb \ +--with-libodb-$d=../libodb-$d \ +--with-libodb-boost=../libodb-boost \ +--with-libodb-qt=../libodb-qt \ +${!optvar} \ +CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" DIFFFLAGS=-ubB + fi + + make + if [ $test = y ]; then + make check + fi + cd .. +done diff --git a/test/windows/mingw/unpack b/test/windows/mingw/unpack new file mode 100755 index 0000000..ff24c84 --- /dev/null +++ b/test/windows/mingw/unpack @@ -0,0 +1,3 @@ +#! /usr/bin/env bash + +../unpack -mingw diff --git a/test/windows/mssql-driver.bat b/test/windows/mssql-driver.bat new file mode 100644 index 0000000..6452e0b --- /dev/null +++ b/test/windows/mssql-driver.bat @@ -0,0 +1,62 @@ +@echo off +rem file : mssql-driver.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +rem +rem mssql-driver.bat sql-file +rem +rem Run the mssql client on the SQL file specified. Adjust the +rem options below to match your SQL Server setup. +rem + +setlocal + +set "options=%MSSQL_OPTIONS%" + +rem User. +rem +set "options=%options% -U odb_test" + +rem Password. +rem +set "options=%options% -P odb_test" + +rem Database name. +rem +set "options=%options% -d odb_test" + +rem SQL Server instance address. +rem +set "options=%options% -S X\Y" +rem set "options=%options% -S tcp:host,port" + +rem Standard options. +rem +set "options=%options% -x -r -b" + +set "mssql=%MSSQL_CLIENT%" + +if "_%mssql%_" == "__" set "mssql=sqlcmd" + +if "_%1_" == "__" ( + echo no sql file specified + goto usage +) + +%mssql% %options% -i %1 + +if errorlevel 1 goto error +goto end + +:usage +echo. +echo usage: mssql-driver.bat sql-file +echo. + +:error +endlocal +exit /b 1 + +:end +endlocal diff --git a/test/windows/mssql.options b/test/windows/mssql.options new file mode 100644 index 0000000..36be670 --- /dev/null +++ b/test/windows/mssql.options @@ -0,0 +1,10 @@ +# Sample Microsoft SQL Server options file used to run the tests. Adjust to +# match your SQL Server setup. +# + +--user odb_test +--password odb_test +--database odb_test +--server X\Y +# --server tcp:host,port +# --driver diff --git a/test/windows/mysql-driver.bat b/test/windows/mysql-driver.bat new file mode 100644 index 0000000..75df06c --- /dev/null +++ b/test/windows/mysql-driver.bat @@ -0,0 +1,46 @@ +@echo off +rem file : mysql-driver.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +rem +rem mysql-driver.bat sql-file +rem +rem Run the mysql client on the SQL file specified. +rem + +setlocal + +set "options=%MYSQL_OPTIONS%" +set "options=%options% --user=odb_test" +set "options=%options% --database=odb_test" +rem set "options=%options% --password=" +set "options=%options% --host=192.168.0.X" +rem set "options=%options% --post=" +rem set "options=%options% --socket=" + +set "mysql=%MYSQL_CLIENT%" + +if "_%mysql%_" == "__" set "mysql=mysql" + +if "_%1_" == "__" ( + echo no sql file specified + goto usage +) + +%mysql% %options% < %1 + +if errorlevel 1 goto error +goto end + +:usage +echo. +echo usage: mysql-driver.bat sql-file +echo. + +:error +endlocal +exit /b 1 + +:end +endlocal diff --git a/test/windows/mysql.options b/test/windows/mysql.options new file mode 100644 index 0000000..84a973c --- /dev/null +++ b/test/windows/mysql.options @@ -0,0 +1,8 @@ +# +# +--user 'odb_test' +--database 'odb_test' +# --password '' +--host '192.168.0.X' +# --port 0 +# --socket '' diff --git a/test/windows/odb/all b/test/windows/odb/all deleted file mode 100755 index 9b91ca3..0000000 --- a/test/windows/odb/all +++ /dev/null @@ -1,67 +0,0 @@ -#! /usr/bin/env bash - -trap 'exit 1' ERR - -function error () -{ - echo "$*" 1>&2 -} - -function usage () -{ - error "usage: $0 qt-version vc-version database conf plat [action]" - error " valid configurations are: {Debug,Release}|all" - error " valid platforms are: {Win32,x64}|all" - error " valid actions are: /Build (default), /Clean, and /Rebuild" -} - -if [ "$1" = "" ]; then - error qt version expected - usage - exit 1 -fi - -if [ "$2" = "" ]; then - error vc version expected - usage - exit 1 -fi - -if [ "$3" = "" ]; then - error database expected - usage - exit 1 -else - if [ "$3" = "all" ]; then - databases="mssql oracle pgsql sqlite mysql" - else - databases=$3 - fi -fi - -if [ "$4" = "" ]; then - error configuration expected - usage - exit 1 -fi - -if [ "$5" = "" ]; then - error platform expected - usage - exit 1 -fi - -action=$6 -if [ "$action" == "" ]; then - action=/Build -fi - -for d in $databases; do - cmd.exe /C setenv.bat "$2" build.bat "$d" "$1" "$2" "$4" "$5" "$action" - cd odb-tests-$d - cmd.exe /C ..\\setenv.bat "$2" test.bat "$d" - cd .. - cd odb-examples-$d - cmd.exe /C ..\\setenv.bat "$2" test.bat "$d" - cd .. -done diff --git a/test/windows/odb/build.bat b/test/windows/odb/build.bat deleted file mode 100755 index 2718206..0000000 --- a/test/windows/odb/build.bat +++ /dev/null @@ -1,184 +0,0 @@ -@echo off -rem file : build.bat -rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -rem license : GNU GPL v2; see accompanying LICENSE file - -rem -rem build.bat database qt-version vc-version conf plat [/Build|/Clean|/Rebuild] -rem -rem conf: {Debug,Release}|all -rem plat: {Win32,x64}|all -rem - -setlocal - -if "_%1_" == "__" ( - echo no database specified - goto usage -) - -if "_%2_" == "__" ( - echo no Qt version specified - goto usage -) - -if "_%3_" == "__" ( - echo no VC++ version specified - goto usage -) - -if "_%~4_" == "__" ( - echo no configuration specified - goto usage -) - -if "_%~5_" == "__" ( - echo no platform specified - goto usage -) - -set "failed=" - -if "_%2_" == "_0_" set "qtver=0" -if "_%2_" == "_4_" set "qtver=4" -if "_%2_" == "_5_" set "qtver=5" - -if "_%qtver%_" == "__" ( - echo unknown Qt version %2 - goto usage -) - -if "_%3_" == "_8_" set "vcver=8" -if "_%3_" == "_9_" set "vcver=9" -if "_%3_" == "_10_" set "vcver=10" -if "_%3_" == "_11_" set "vcver=11" -if "_%3_" == "_12_" set "vcver=12" - -if "_%vcver%_" == "__" ( - echo unknown VC++ version %3 - goto usage -) - -set "confs=%~4" -set "plats=%~5" - -if "_%confs%_" == "_all_" set "confs=Debug Release" -if "_%plats%_" == "_all_" set "plats=Win32 x64" - -set "action=%6" -if "_%action%_" == "__" set "action=/Build" - -set "devenv=%DEVENV%" -if "_%devenv%_" == "__" set "devenv=devenv.com" - -goto start - -rem -rem %1 - solution name -rem %2 - configuration to build -rem %3 - platform to build -rem -:run_build - echo. - echo building %1 %3 %2 - "%devenv%" %1 %action% "%2|%3" 2>&1 - if errorlevel 1 set "failed=%failed% %1\%3\%2" -goto :eof - -:start - -for %%d in (libodb libodb-%1 libodb-boost) do ( - for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_build %%d/%%d-vc%vcver%.sln %%c %%p - ) - ) -) - -if not "_%failed%_" == "__" goto error - -if "_%qtver%_" == "_0_" goto skip_libodb_qt -for %%d in (libodb-qt) do ( - for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_build %%d/%%d%qtver%-vc%vcver%.sln %%c %%p - ) - ) -) -if not "_%failed%_" == "__" goto error -:skip_libodb_qt - -for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_build odb-examples-%1/examples-%1-vc%vcver%.sln %%c %%p - ) -) - -if not "_%failed%_" == "__" goto error - -for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_build odb-examples-%1/boost/boost-%1-vc%vcver%.sln %%c %%p - ) -) - -if not "_%failed%_" == "__" goto error - -if "_%qtver%_" == "_0_" goto skip_qt_examples -for %%c in (%confs%) do ( - for %%p in (%plats%) do ( - call :run_build odb-examples-%1/qt/qt%qtver%-%1-vc%vcver%.sln %%c %%p - ) -) -if not "_%failed%_" == "__" goto error -:skip_qt_examples - -cd odb-tests-%1 -call build.bat %1 %3 %4 %5 %action% -if errorlevel 1 ( - cd .. - goto error -) - -cd boost -call build.bat %1 %3 %4 %5 %action% -if errorlevel 1 ( - cd ..\.. - goto error -) -cd .. - -if "_%qtver%_" == "_0_" goto skip_qt_tests -cd qt -call build.bat %1 %2 %3 %4 %5 %action% -if errorlevel 1 ( - cd ..\.. - goto error -) -cd .. -:skip_qt_tests - -echo. -echo ALL BUILDS SUCCEEDED -echo. -goto end - -:usage -echo. -echo usage: build.bat database qt-version vc-version conf plat [action] -echo valid configurations are: {Debug,Release}|all -echo valid platforms are: {Win32,x64}|all -echo valid actions are: /Build (default), /Clean, and /Rebuild -echo. - -:error -if not "_%failed%_" == "__" ( - echo. - for %%t in (%failed%) do echo FAILED: %%t - echo. -) -endlocal -exit /b 1 - -:end -endlocal diff --git a/test/windows/odb/default.options b/test/windows/odb/default.options deleted file mode 100644 index 95f42e8..0000000 --- a/test/windows/odb/default.options +++ /dev/null @@ -1,4 +0,0 @@ --I C:\projects\boost-vc10.0 --I C:\projects\qtcore-vc10.0\include --I C:\projects\qtcore-vc10.0\include\QtCore -#-D MSSQL_SERVER_VERSION=900 \ No newline at end of file diff --git a/test/windows/odb/mingw/build b/test/windows/odb/mingw/build deleted file mode 100755 index 6394fdf..0000000 --- a/test/windows/odb/mingw/build +++ /dev/null @@ -1,185 +0,0 @@ -#! /usr/bin/env bash - -# Build ODB for MinGW -# -# -rebuild -# -test -# -db -# -trap 'exit 1' ERR - -function error () -{ - echo "$*" 1>&2 -} - -function clean () -{ - if [ -f $1/Makefile ]; then - make -C $1 distclean - fi -} - -ROOT=/c/projects -MYSQL=$ROOT/mysql-mingw32 -SQLITE=$ROOT/sqlite-mingw32 -PGSQL=$ROOT/pgsql-mingw32 -ORACLE=$ROOT/oracle-mingw32 -BOOST=$ROOT/boost-mingw32 -QTCORE=$ROOT/qtcore-mingw32 - -CPPFLAGS="-I$BOOST -I$QTCORE/include -I$QTCORE/include/QtCore -I$ORACLE/sdk/include -I$PGSQL/include -I$SQLITE -I$MYSQL/include" -LDFLAGS="-L$BOOST/stage/lib -L$QTCORE/lib -L$ORACLE/sdk/lib -L$PGSQL/lib -L$SQLITE -L$MYSQL/lib -Wl,--enable-auto-import" -PATH="$QTCORE/bin:$ORACLE:$PATH" - -mysql_options="--with-mysql-host=192.168.0.2 --with-mysql-client=$MYSQL/bin/mysql.exe" -sqlite_options="--with-sqlite-db=c:\\projects\\odb\\odb_test.db" -pgsql_options="--with-pgsql-host=192.168.0.2 --with-pgsql-client=$PGSQL/bin/psql.exe" -oracle_options="--with-oracle-host=192.168.0.2 --with-oracle-service=xe --with-oracle-client=$ORACLE/sqlplus.exe" -mssql_options="--with-mssql-server=windows2008r2\\ss2008r2,1435" - -test=n -rebuild=n -db= - -while [ $# -gt 0 ]; do - case $1 in - -rebuild) - rebuild=y - shift - ;; - -test) - test=y - shift - ;; - -db) - shift - db="$db $1" - shift - ;; - *) - error "unknown option: $1" - exit 1 - ;; - esac -done - -if [ "$db" = "" ]; then - db="mssql oracle pgsql sqlite mysql" -fi - -# Clean everything up if we are rebuilding. -# -if [ $rebuild = y ]; then - clean libodb - clean libodb-mssql - clean libodb-oracle - clean libodb-pgsql - clean libodb-sqlite - clean libodb-mysql - clean libodb-boost - clean libodb-qt - - for d in $db; do - rm -rf odb-tests-$d - rm -rf odb-examples-$d - done -fi - -# Build libodb -# -cd libodb - -if [ $rebuild = y -o ! -f Makefile ]; then - ./configure CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" -fi - -make -cd .. - -# Build libodb- -# -for d in $db; do - cd libodb-$d - - if [ $rebuild = y -o ! -f Makefile ]; then - ./configure --with-libodb=../libodb CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" - fi - - make - cd .. -done - -# Build libodb-boost -# -cd libodb-boost - -if [ $rebuild = y -o ! -f Makefile ]; then - ./configure --with-libodb=../libodb CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" -fi - -make -cd .. - -# Build libodb-qt -# -cd libodb-qt - -if [ $rebuild = y -o ! -f Makefile ]; then - ./configure --with-libodb=../libodb CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" -fi - -make -cd .. - -# Build odb-tests -# -for d in $db; do - mkdir -p odb-tests-$d - cd odb-tests-$d - - optvar=${d}_options - - if [ $rebuild = y -o ! -f Makefile ]; then - ../odb-tests/configure \ ---with-database=$d \ ---with-libodb=../libodb \ ---with-libodb-$d=../libodb-$d \ ---with-libodb-boost=../libodb-boost \ ---with-libodb-qt=../libodb-qt \ -${!optvar} \ -CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" DIFFFLAGS=-ubB - fi - - make - if [ $test = y ]; then - make check - fi - cd .. -done - -# Build odb-examples -# -for d in $db; do - mkdir -p odb-examples-$d - cd odb-examples-$d - - optvar=${d}_options - - if [ $rebuild = y -o ! -f Makefile ]; then - ../odb-examples/configure \ ---with-database=$d \ ---with-libodb=../libodb \ ---with-libodb-$d=../libodb-$d \ ---with-libodb-boost=../libodb-boost \ ---with-libodb-qt=../libodb-qt \ -${!optvar} \ -CPPFLAGS="$CPPFLAGS" LDFLAGS="$LDFLAGS" DIFFFLAGS=-ubB - fi - - make - if [ $test = y ]; then - make check - fi - cd .. -done diff --git a/test/windows/odb/mingw/unpack b/test/windows/odb/mingw/unpack deleted file mode 100755 index ff24c84..0000000 --- a/test/windows/odb/mingw/unpack +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/env bash - -../unpack -mingw diff --git a/test/windows/odb/mssql-driver.bat b/test/windows/odb/mssql-driver.bat deleted file mode 100644 index 6452e0b..0000000 --- a/test/windows/odb/mssql-driver.bat +++ /dev/null @@ -1,62 +0,0 @@ -@echo off -rem file : mssql-driver.bat -rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -rem license : GNU GPL v2; see accompanying LICENSE file - -rem -rem mssql-driver.bat sql-file -rem -rem Run the mssql client on the SQL file specified. Adjust the -rem options below to match your SQL Server setup. -rem - -setlocal - -set "options=%MSSQL_OPTIONS%" - -rem User. -rem -set "options=%options% -U odb_test" - -rem Password. -rem -set "options=%options% -P odb_test" - -rem Database name. -rem -set "options=%options% -d odb_test" - -rem SQL Server instance address. -rem -set "options=%options% -S X\Y" -rem set "options=%options% -S tcp:host,port" - -rem Standard options. -rem -set "options=%options% -x -r -b" - -set "mssql=%MSSQL_CLIENT%" - -if "_%mssql%_" == "__" set "mssql=sqlcmd" - -if "_%1_" == "__" ( - echo no sql file specified - goto usage -) - -%mssql% %options% -i %1 - -if errorlevel 1 goto error -goto end - -:usage -echo. -echo usage: mssql-driver.bat sql-file -echo. - -:error -endlocal -exit /b 1 - -:end -endlocal diff --git a/test/windows/odb/mssql.options b/test/windows/odb/mssql.options deleted file mode 100644 index 36be670..0000000 --- a/test/windows/odb/mssql.options +++ /dev/null @@ -1,10 +0,0 @@ -# Sample Microsoft SQL Server options file used to run the tests. Adjust to -# match your SQL Server setup. -# - ---user odb_test ---password odb_test ---database odb_test ---server X\Y -# --server tcp:host,port -# --driver diff --git a/test/windows/odb/mysql-driver.bat b/test/windows/odb/mysql-driver.bat deleted file mode 100644 index 75df06c..0000000 --- a/test/windows/odb/mysql-driver.bat +++ /dev/null @@ -1,46 +0,0 @@ -@echo off -rem file : mysql-driver.bat -rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -rem license : GNU GPL v2; see accompanying LICENSE file - -rem -rem mysql-driver.bat sql-file -rem -rem Run the mysql client on the SQL file specified. -rem - -setlocal - -set "options=%MYSQL_OPTIONS%" -set "options=%options% --user=odb_test" -set "options=%options% --database=odb_test" -rem set "options=%options% --password=" -set "options=%options% --host=192.168.0.X" -rem set "options=%options% --post=" -rem set "options=%options% --socket=" - -set "mysql=%MYSQL_CLIENT%" - -if "_%mysql%_" == "__" set "mysql=mysql" - -if "_%1_" == "__" ( - echo no sql file specified - goto usage -) - -%mysql% %options% < %1 - -if errorlevel 1 goto error -goto end - -:usage -echo. -echo usage: mysql-driver.bat sql-file -echo. - -:error -endlocal -exit /b 1 - -:end -endlocal diff --git a/test/windows/odb/mysql.options b/test/windows/odb/mysql.options deleted file mode 100644 index 84a973c..0000000 --- a/test/windows/odb/mysql.options +++ /dev/null @@ -1,8 +0,0 @@ -# -# ---user 'odb_test' ---database 'odb_test' -# --password '' ---host '192.168.0.X' -# --port 0 -# --socket '' diff --git a/test/windows/odb/oracle-driver.bat b/test/windows/odb/oracle-driver.bat deleted file mode 100644 index 36a0d85..0000000 --- a/test/windows/odb/oracle-driver.bat +++ /dev/null @@ -1,42 +0,0 @@ -@echo off -rem file : oracle-driver.bat -rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -rem license : GNU GPL v2; see accompanying LICENSE file - -rem -rem oracle-driver.bat sql-file -rem -rem Run the oracle client on the SQL file specified. Adjust the -rem option below to match your Oracle setup. -rem - -setlocal - -set "options=%ORACLE_OPTIONS% -L -S" -set "options=%options% odb_test/odb_test@//192.168.0.X:1521/xe" - -set "oracle=%ORACLE_CLIENT%" - -if "_%oracle%_" == "__" set "oracle=sqlplus" - -if "_%1_" == "__" ( - echo no sql file specified - goto usage -) - -%oracle% %options% @%1 - -if errorlevel 1 goto error -goto end - -:usage -echo. -echo usage: oracle-driver.bat sql-file -echo. - -:error -endlocal -exit /b 1 - -:end -endlocal diff --git a/test/windows/odb/oracle.options b/test/windows/odb/oracle.options deleted file mode 100644 index c4ad2bc..0000000 --- a/test/windows/odb/oracle.options +++ /dev/null @@ -1,7 +0,0 @@ -# -# ---user odb_test ---password odb_test ---host 192.168.0.X -# --port -# --service diff --git a/test/windows/odb/pgsql-driver.bat b/test/windows/odb/pgsql-driver.bat deleted file mode 100644 index 4b70df8..0000000 --- a/test/windows/odb/pgsql-driver.bat +++ /dev/null @@ -1,52 +0,0 @@ -@echo off -rem file : pgsql-driver.bat -rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC -rem license : GNU GPL v2; see accompanying LICENSE file - -rem -rem pgsql-driver.bat sql-file -rem -rem Run the pgsql client on the SQL file specified. Adjust the -rem option below to match your PostgreSQL setup. -rem - -setlocal - -set "options=%PGSQL_OPTIONS%" - -rem This user must be able to login without specifying a password. -rem -set "options=%options% --username=odb_test" - -set "options=%options% --dbname=odb_test" -set "options=%options% --host=192.168.0.X" -rem set "options=%options% --port=" - -set "options=%options% --quiet" -set "PGOPTIONS=--client-min-messages=warning" - -set "pgsql=%PGSQL_CLIENT%" - -if "_%pgsql%_" == "__" set "pgsql=psql" - -if "_%1_" == "__" ( - echo no sql file specified - goto usage -) - -%pgsql% %options% < %1 - -if errorlevel 1 goto error -goto end - -:usage -echo. -echo usage: pgsql-driver.bat sql-file -echo. - -:error -endlocal -exit /b 1 - -:end -endlocal diff --git a/test/windows/odb/pgsql.options b/test/windows/odb/pgsql.options deleted file mode 100644 index eabacc8..0000000 --- a/test/windows/odb/pgsql.options +++ /dev/null @@ -1,6 +0,0 @@ -# -# ---username odb_test ---database odb_test ---host '192.168.0.X' -# --port diff --git a/test/windows/odb/setenv.bat b/test/windows/odb/setenv.bat deleted file mode 100644 index 600c29d..0000000 --- a/test/windows/odb/setenv.bat +++ /dev/null @@ -1,43 +0,0 @@ -@echo off - -if "_%1_" == "__" ( - echo no VC++ version specified - goto usage -) - -rem set CL=/DMSSQL_SERVER_VERSION=900 - -set ODB=c:\projects\odb -set MYSQL=c:\projects\mysql -set MYSQL64=c:\projects\mysql64 -set SQLITE=c:\projects\sqlite-vc%1.0 -set PGSQL=c:\projects\pgsql -set PGSQL64=c:\projects\pgsql64 -set ORACLE=c:\projects\oracle -set ORACLE64=c:\projects\oracle64 -set QTCORE=c:\projects\qtcore-vc%1.0 -set QTCORE64=c:\projects\qtcore64-vc%1.0 -rem set "NLS_LANG=AMERICA_AMERICA.WE8MSWIN1252" -set "DIFF=c:\cygwin\bin\diff.exe -ubB" -if "_%1_" == "_8_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\devenv.com" -if "_%1_" == "_9_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com" -if "_%1_" == "_10_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" -if "_%1_" == "_11_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com" -if "_%1_" == "_12_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" -set PATH=%ODB%\libodb\bin;%ODB%\libodb-sqlite\bin;%ODB%\libodb-mysql\bin;%ODB%\libodb-pgsql\bin;%ODB%\libodb-oracle\bin;%ODB%\libodb-mssql\bin;%ODB%\libodb-boost\bin;%ODB%\libodb-qt\bin;%MYSQL%\bin;%SQLITE%\bin;%PGSQL%\bin;%ORACLE%;%QTCORE%\bin;%PATH% -set PATH=%ODB%\libodb\bin64;%ODB%\libodb-sqlite\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-pgsql\bin64;%ODB%\libodb-oracle\bin64;%ODB%\libodb-mssql\bin64;%ODB%\libodb-boost\bin64;%ODB%\libodb-qt\bin64;%MYSQL64%\bin;%SQLITE%\bin64;%PGSQL64%\bin;%ORACLE64%;%QTCORE64%\bin;%PATH% - -if "_%2_" == "__" goto end - -%2 %3 %4 %5 %6 %7 %8 %9 -goto end - -:usage -echo. -echo usage: setenv.bat vc-version ... -echo. - -:error -exit /b 1 - -:end diff --git a/test/windows/odb/sqlite-driver.bat b/test/windows/odb/sqlite-driver.bat deleted file mode 100644 index bfc3acb..0000000 --- a/test/windows/odb/sqlite-driver.bat +++ /dev/null @@ -1 +0,0 @@ -rem dummy diff --git a/test/windows/odb/sqlite.options b/test/windows/odb/sqlite.options deleted file mode 100644 index 98ded5c..0000000 --- a/test/windows/odb/sqlite.options +++ /dev/null @@ -1 +0,0 @@ ---database 'c:\projects\odb\odb_test.db' diff --git a/test/windows/odb/unpack b/test/windows/odb/unpack deleted file mode 100755 index a9e0299..0000000 --- a/test/windows/odb/unpack +++ /dev/null @@ -1,102 +0,0 @@ -#! /usr/bin/env bash - -# Unpack ODB distribution for Windows. -# -# -mingw unpack for MinGW -# - -trap 'exit 1' ERR - -function error () -{ - echo "$*" 1>&2 -} - -databases="mssql oracle pgsql sqlite mysql" -mingw=n - -while [ $# -gt 0 ]; do - case $1 in - -mingw) - mingw=y - shift - ;; - *) - error "unknown option: $1" - exit 1 - ;; - esac -done - -if [ $mingw = y ]; then - base=/t/pack -else - base=/cygdrive/t/pack -fi - -rm -rf libodb libodb-mssql libodb-oracle libodb-pgsql libodb-sqlite \ -libodb-mysql libodb-boost libodb-qt odb odb-tests odb-examples \ -odb-tests-* odb-examples-* - -v=`echo $base/odb-*-*-*.zip | sed -e "s%$base/odb-\([^-]*\).*.zip%\1%"` -mv=`echo $v | sed -e 's%\([0-9]*\.[0-9]*\).*%\1%'` - -echo unpacking $mv from $base - -unzip -q $base/libodb-$mv.*.zip -mv libodb-$mv.*/ libodb - -unzip -q $base/libodb-mssql-$mv.*.zip -mv libodb-mssql-$mv.*/ libodb-mssql - -unzip -q $base/libodb-oracle-$mv.*.zip -mv libodb-oracle-$mv.*/ libodb-oracle - -unzip -q $base/libodb-pgsql-$mv.*.zip -mv libodb-pgsql-$mv.*/ libodb-pgsql - -unzip -q $base/libodb-sqlite-$mv.*.zip -mv libodb-sqlite-$mv.*/ libodb-sqlite - -unzip -q $base/libodb-mysql-$mv.*.zip -mv libodb-mysql-$mv.*/ libodb-mysql - -unzip -q $base/libodb-boost-$mv.*.zip -mv libodb-boost-$mv.*/ libodb-boost - -unzip -q $base/libodb-qt-$mv.*.zip -mv libodb-qt-$mv.*/ libodb-qt - -unzip -q $base/odb-tests-$mv.*.zip -if [ $mingw = n ]; then - for d in $databases; do - cp -r odb-tests-$mv.*/ odb-tests-$d - done - rm -r odb-tests-$mv.* -else - mv odb-tests-$mv.*/ odb-tests -fi - -unzip -q $base/odb-examples-$mv.*.zip -if [ $mingw = n ]; then - for d in $databases; do - cp -r odb-examples-$mv.*/ odb-examples-$d - done - rm -r odb-examples-$mv.* -else - mv odb-examples-$mv.*/ odb-examples -fi - -if [ $mingw = n ]; then - unzip -q $base/odb-$v-i686-windows.zip - mv odb-$v-i686-windows odb - - cp default.options odb/etc/odb/ - - for d in $databases; do - cp $d.options odb-tests-$d/ - cp $d-driver.bat odb-tests-$d/ - cp $d.options odb-examples-$d/ - cp $d-driver.bat odb-examples-$d/ - done -fi diff --git a/test/windows/oracle-driver.bat b/test/windows/oracle-driver.bat new file mode 100644 index 0000000..36a0d85 --- /dev/null +++ b/test/windows/oracle-driver.bat @@ -0,0 +1,42 @@ +@echo off +rem file : oracle-driver.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +rem +rem oracle-driver.bat sql-file +rem +rem Run the oracle client on the SQL file specified. Adjust the +rem option below to match your Oracle setup. +rem + +setlocal + +set "options=%ORACLE_OPTIONS% -L -S" +set "options=%options% odb_test/odb_test@//192.168.0.X:1521/xe" + +set "oracle=%ORACLE_CLIENT%" + +if "_%oracle%_" == "__" set "oracle=sqlplus" + +if "_%1_" == "__" ( + echo no sql file specified + goto usage +) + +%oracle% %options% @%1 + +if errorlevel 1 goto error +goto end + +:usage +echo. +echo usage: oracle-driver.bat sql-file +echo. + +:error +endlocal +exit /b 1 + +:end +endlocal diff --git a/test/windows/oracle.options b/test/windows/oracle.options new file mode 100644 index 0000000..c4ad2bc --- /dev/null +++ b/test/windows/oracle.options @@ -0,0 +1,7 @@ +# +# +--user odb_test +--password odb_test +--host 192.168.0.X +# --port +# --service diff --git a/test/windows/pgsql-driver.bat b/test/windows/pgsql-driver.bat new file mode 100644 index 0000000..4b70df8 --- /dev/null +++ b/test/windows/pgsql-driver.bat @@ -0,0 +1,52 @@ +@echo off +rem file : pgsql-driver.bat +rem copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +rem license : GNU GPL v2; see accompanying LICENSE file + +rem +rem pgsql-driver.bat sql-file +rem +rem Run the pgsql client on the SQL file specified. Adjust the +rem option below to match your PostgreSQL setup. +rem + +setlocal + +set "options=%PGSQL_OPTIONS%" + +rem This user must be able to login without specifying a password. +rem +set "options=%options% --username=odb_test" + +set "options=%options% --dbname=odb_test" +set "options=%options% --host=192.168.0.X" +rem set "options=%options% --port=" + +set "options=%options% --quiet" +set "PGOPTIONS=--client-min-messages=warning" + +set "pgsql=%PGSQL_CLIENT%" + +if "_%pgsql%_" == "__" set "pgsql=psql" + +if "_%1_" == "__" ( + echo no sql file specified + goto usage +) + +%pgsql% %options% < %1 + +if errorlevel 1 goto error +goto end + +:usage +echo. +echo usage: pgsql-driver.bat sql-file +echo. + +:error +endlocal +exit /b 1 + +:end +endlocal diff --git a/test/windows/pgsql.options b/test/windows/pgsql.options new file mode 100644 index 0000000..eabacc8 --- /dev/null +++ b/test/windows/pgsql.options @@ -0,0 +1,6 @@ +# +# +--username odb_test +--database odb_test +--host '192.168.0.X' +# --port diff --git a/test/windows/setenv.bat b/test/windows/setenv.bat new file mode 100644 index 0000000..600c29d --- /dev/null +++ b/test/windows/setenv.bat @@ -0,0 +1,43 @@ +@echo off + +if "_%1_" == "__" ( + echo no VC++ version specified + goto usage +) + +rem set CL=/DMSSQL_SERVER_VERSION=900 + +set ODB=c:\projects\odb +set MYSQL=c:\projects\mysql +set MYSQL64=c:\projects\mysql64 +set SQLITE=c:\projects\sqlite-vc%1.0 +set PGSQL=c:\projects\pgsql +set PGSQL64=c:\projects\pgsql64 +set ORACLE=c:\projects\oracle +set ORACLE64=c:\projects\oracle64 +set QTCORE=c:\projects\qtcore-vc%1.0 +set QTCORE64=c:\projects\qtcore64-vc%1.0 +rem set "NLS_LANG=AMERICA_AMERICA.WE8MSWIN1252" +set "DIFF=c:\cygwin\bin\diff.exe -ubB" +if "_%1_" == "_8_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 8\Common7\IDE\devenv.com" +if "_%1_" == "_9_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.com" +if "_%1_" == "_10_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com" +if "_%1_" == "_11_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com" +if "_%1_" == "_12_" set "DEVENV=c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com" +set PATH=%ODB%\libodb\bin;%ODB%\libodb-sqlite\bin;%ODB%\libodb-mysql\bin;%ODB%\libodb-pgsql\bin;%ODB%\libodb-oracle\bin;%ODB%\libodb-mssql\bin;%ODB%\libodb-boost\bin;%ODB%\libodb-qt\bin;%MYSQL%\bin;%SQLITE%\bin;%PGSQL%\bin;%ORACLE%;%QTCORE%\bin;%PATH% +set PATH=%ODB%\libodb\bin64;%ODB%\libodb-sqlite\bin64;%ODB%\libodb-mysql\bin64;%ODB%\libodb-pgsql\bin64;%ODB%\libodb-oracle\bin64;%ODB%\libodb-mssql\bin64;%ODB%\libodb-boost\bin64;%ODB%\libodb-qt\bin64;%MYSQL64%\bin;%SQLITE%\bin64;%PGSQL64%\bin;%ORACLE64%;%QTCORE64%\bin;%PATH% + +if "_%2_" == "__" goto end + +%2 %3 %4 %5 %6 %7 %8 %9 +goto end + +:usage +echo. +echo usage: setenv.bat vc-version ... +echo. + +:error +exit /b 1 + +:end diff --git a/test/windows/sqlite-driver.bat b/test/windows/sqlite-driver.bat new file mode 100644 index 0000000..bfc3acb --- /dev/null +++ b/test/windows/sqlite-driver.bat @@ -0,0 +1 @@ +rem dummy diff --git a/test/windows/sqlite.options b/test/windows/sqlite.options new file mode 100644 index 0000000..98ded5c --- /dev/null +++ b/test/windows/sqlite.options @@ -0,0 +1 @@ +--database 'c:\projects\odb\odb_test.db' diff --git a/test/windows/unpack b/test/windows/unpack new file mode 100755 index 0000000..a9e0299 --- /dev/null +++ b/test/windows/unpack @@ -0,0 +1,102 @@ +#! /usr/bin/env bash + +# Unpack ODB distribution for Windows. +# +# -mingw unpack for MinGW +# + +trap 'exit 1' ERR + +function error () +{ + echo "$*" 1>&2 +} + +databases="mssql oracle pgsql sqlite mysql" +mingw=n + +while [ $# -gt 0 ]; do + case $1 in + -mingw) + mingw=y + shift + ;; + *) + error "unknown option: $1" + exit 1 + ;; + esac +done + +if [ $mingw = y ]; then + base=/t/pack +else + base=/cygdrive/t/pack +fi + +rm -rf libodb libodb-mssql libodb-oracle libodb-pgsql libodb-sqlite \ +libodb-mysql libodb-boost libodb-qt odb odb-tests odb-examples \ +odb-tests-* odb-examples-* + +v=`echo $base/odb-*-*-*.zip | sed -e "s%$base/odb-\([^-]*\).*.zip%\1%"` +mv=`echo $v | sed -e 's%\([0-9]*\.[0-9]*\).*%\1%'` + +echo unpacking $mv from $base + +unzip -q $base/libodb-$mv.*.zip +mv libodb-$mv.*/ libodb + +unzip -q $base/libodb-mssql-$mv.*.zip +mv libodb-mssql-$mv.*/ libodb-mssql + +unzip -q $base/libodb-oracle-$mv.*.zip +mv libodb-oracle-$mv.*/ libodb-oracle + +unzip -q $base/libodb-pgsql-$mv.*.zip +mv libodb-pgsql-$mv.*/ libodb-pgsql + +unzip -q $base/libodb-sqlite-$mv.*.zip +mv libodb-sqlite-$mv.*/ libodb-sqlite + +unzip -q $base/libodb-mysql-$mv.*.zip +mv libodb-mysql-$mv.*/ libodb-mysql + +unzip -q $base/libodb-boost-$mv.*.zip +mv libodb-boost-$mv.*/ libodb-boost + +unzip -q $base/libodb-qt-$mv.*.zip +mv libodb-qt-$mv.*/ libodb-qt + +unzip -q $base/odb-tests-$mv.*.zip +if [ $mingw = n ]; then + for d in $databases; do + cp -r odb-tests-$mv.*/ odb-tests-$d + done + rm -r odb-tests-$mv.* +else + mv odb-tests-$mv.*/ odb-tests +fi + +unzip -q $base/odb-examples-$mv.*.zip +if [ $mingw = n ]; then + for d in $databases; do + cp -r odb-examples-$mv.*/ odb-examples-$d + done + rm -r odb-examples-$mv.* +else + mv odb-examples-$mv.*/ odb-examples +fi + +if [ $mingw = n ]; then + unzip -q $base/odb-$v-i686-windows.zip + mv odb-$v-i686-windows odb + + cp default.options odb/etc/odb/ + + for d in $databases; do + cp $d.options odb-tests-$d/ + cp $d-driver.bat odb-tests-$d/ + cp $d.options odb-examples-$d/ + cp $d-driver.bat odb-examples-$d/ + done +fi -- cgit v1.1