Using Powershell and MSBuild is recommended.
In fact the binaries of official release are built using this mothod.
Currently 4 Windows Powershell scripts are provided for developpers.
winbuild/BuildAll.ps1 - build all dlls for psqlodbc drivers using
MSBuild.
winbuild/editConfiguration.ps1 - a GUI tool to set Build environment
winbuild/regress.ps1 - build regression test programs and run
installer/buildInstallers.ps1 - build installers(.msi or setup.exe)
Use Powershell console or Command Prompt to invoke scripts:
For example, to build the driver:
C:\psqlodbc\winbuild\> (Powershell) ./BuildAll.ps1 <options>
or you can use the same functionality from Command Prompt using Windows
helper batch at the parent folder (..\). See ..\readme_winbuild.txt.
C:\psqlodbc\> (Commnd Prompt) .\BuildAll.bat <options>
1. Please start a powershell console and set the ExecutionPolicy of
Powershell to RemoteSigned or Unrestricted.
You can get the ExecutionPolicy by typing
Get-ExecutionPolicy
When the ExectionPolicy is "Restricted" or "AllSigned" then type e.g.
Set-ExecutionPolicy RemoteSigned
To see details about ExecutionPolicy, type
Get-Help about_Execution_Policies
2. You have to install one of the following.
. Visual Studio 2015 non-Express edtion or Express 2015 for Windows
Desktop
. Visual Studio 2013 non-Express edtion or Express 2013 for Windows
Desktop
. Visual Studio 2012 non-Express edtion or Express 2012 for Windows
Desktop
. Full Microsoft Visual C++ 2010
. Windows SDK 7.1
You have to include x64 development tools (bin, lib, include) as
well as x86 ones for the installation.
You can install multiple versions of VC++ and use them.
You can easily switch by specifying VCVersion parameter.
3. Setup Build environment
Please type
.\editConfiguration(.ps1)
and edit the setting of your environment especially the folders
you placed libpq related include/lib/bin files.
4. Build
Please type
.\BuildAll(.ps1)
to invoke build operations.
If you installed both VC10 and VC12 and you'd like to compile
under VC10 environment, type
.\BuildAll(.ps1) -V(CVersion) 10.0
or set the value 10.0 to vcversion using ./editConfiguration.
To see details about the use of BuildAll, type
Get-Help .\BuildAll(.ps1) [-Detailed | -Examples | -Full]
5. Outputs of Build
The build can produce output in up to four directories for each of
the debug and release configurations:
- x64_Unicode_Release the Unicode driver, 64-bit
- x86_ANSI_Release the ANSI driver, 64-bit
- x86_Unicode_Release the ANSI driver, 32-bit
- x86_ANSI_Release the Unicode driver, 32-bit
For debug builds (-Configuration Debug) the directories are named with
Debug instead of Release but otherwise the same.
pgxalib.dll is only built for the multibyte/unicode version, as it is
the same for both unicode and ansi drivers.
6. How to use drivers.
You can't use psqlodbc drivers at once you build the drivers.
Usually you have to install drivers using installers made by
installer/buildInstallers.ps1. buildInstallers.ps1 bundles
libpq and related libraries like ssleay32, libeay32 from the
PostgreSQL bin directory and MSVC runtime libraries compiled with.
However, it is painful for developers to build binaries, build
installers and install each time the source files are changed.
It is recommended to use a special installation-less driver
(postgres_devw) registered by regress.ps1
7. Regression test in place
After BuildAll(.ps1), please type
.\regress(.ps1)
You have to neither install nor copy binaries.
By default, build 32-bit binaries from test sources and run the tests.
If you'd like to test 64-bit version, please type
.\regress(.ps1) -p(latform) x64
Please note the outputs(obj, exe etc) generated by build operations and
results of tests are placed in the directory winbuild/test_x86(test_x64
in case of 64-bit).
8. Installer
To build the .msi installer file:
C:\psqlodbc\installer\> (Powershell) ./buildInstallers.ps1 <options>
or
C:\psqlodbc\> (Command Prompt) .\buildInstallers.bat <options>
By default, buildInstallers.ps1 builds bootstrapper program
psqlodbc-setup.exe together.
See ../installer/readme.txt in the source directory for details.
Troubleshooting:
Some documentation on dealing with Windows SDK installation issues
can be found on the related pg_build_win page:
https://github.com/2ndQuadrant/pg_build_win#troubleshooting
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
openGauss-connector-odbc-master.zip (474个子文件)
configure.ac 7KB
Makefile.am 3KB
makex64.bat 3KB
odbc.bat 2KB
make.bat 1KB
upgrade_x64.bat 973B
upgrade.bat 969B
Make.bat 305B
regress.bat 299B
BuildAll.bat 293B
editConfiguration.bat 150B
background.bmp 152KB
banner.bmp 84KB
info.c 176KB
convert.c 160KB
results.c 133KB
connection.c 102KB
statement.c 84KB
pgapi30.c 59KB
dlg_specific.c 55KB
parse.c 54KB
pgtypes.c 49KB
execute.c 43KB
odbcapi.c 39KB
qresult.c 37KB
win_unicode.c 29KB
odbcapiw.c 28KB
dlg_wingui.c 28KB
bind.c 25KB
odbcapi30.c 20KB
setup.c 20KB
options.c 20KB
result-conversions-test.c 19KB
descriptor.c 19KB
odbc_tinyint_04_SQLColAttribute.c 16KB
environ.c 15KB
drvconn.c 14KB
odbc_smalldatetime_04_SQLColAttribute.c 13KB
mylog.c 12KB
odbcapi30w.c 12KB
odbc_nvarchar2_02_SQLColAttribute.c 12KB
multibyte.c 10KB
catalogfunctions-test.c 10KB
deprecated-test.c 10KB
runsuite.c 9KB
odbc_DTS2019071815351.c 9KB
odbc_batch_insert.c 9KB
odbc_nvarchar2_09_SQLProcedureColumns.c 9KB
odbc_tinyint_09_SQLProcedureColumns.c 9KB
common.c 8KB
prepare-test.c 8KB
loadlib.c 7KB
odbc_smalldatetime_07_SQLProcedureColumns.c 7KB
arraybinding-test.c 7KB
odbc_null_adapt_03.c 7KB
odbc_capital_05.c 6KB
odbc_transaction_03.c 6KB
odbc_smalldatetime_02_SQLColumn.c 6KB
odbc_transaction_01.c 6KB
odbc_transaction_02.c 6KB
odbc_null_adapt_01.c 6KB
arraybinding-test.c 6KB
numeric-test.c 6KB
odbc_tinyint_02_SQLColumn.c 6KB
odbc_capital_07.c 6KB
odbc_transaction_for_extension_connector.c 6KB
odbc_SQLStatistics.c 6KB
param-conversions-test.c 6KB
odbc_nvarchar2_01_SQLGetData.c 6KB
odbc_capital_06.c 6KB
odbc_tinyint_06_SQLGetTypeInfo.c 6KB
odbc_tinyint_03_SQLBindParameter.c 6KB
odbc_nvarchar2_10_manycol.c 6KB
odbc_nvarchar2_11_out.c 6KB
odbc_tinyint_10_manycol.c 6KB
odbc_capital_03.c 6KB
misc.c 6KB
odbc_nvarchar2_03_SQLColumns.c 6KB
odbc_capital_04.c 6KB
odbc_capital_02.c 6KB
odbc_sha256.c 6KB
bulkoperations-test.c 6KB
odbc_null_adapt_04.c 6KB
odbc_SQLGetFunction.c 6KB
params-test.c 6KB
odbc_null_adapt_06.c 6KB
odbc_tinyint_01_SQLBindCol.c 6KB
odbc_sm3.c 6KB
odbc_smalldatetime_06_SQLDescribeCol.c 6KB
odbc_tinyint_08_SQLDescribeCol.c 5KB
odbc_smalldatetime_03_SQLBindParameter.c 5KB
odbc_nvarchar2_07_SQLDescribeCol.c 5KB
positioned-update-test.c 5KB
cursor-movement-test.c 5KB
odbc_smalldatetime_01_SQLPrimaryKeys.c 5KB
RegisterRegdsn.c 5KB
odbc-escapes-test.c 5KB
odbc_SQLTables.c 5KB
odbc_smalldatetime_05_SQLGetData.c 5KB
odbc_nvarchar2_04_SQLPrimaryKeys.c 5KB
共 474 条
- 1
- 2
- 3
- 4
- 5
资源评论
m0_72731342
- 粉丝: 2
- 资源: 1832
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 数据库管理工具:dbeaver-ce-23.2.1-macos-aarch64.dmg
- 数据库管理工具:dbeaver-ce-23.2.0-stable.x86-64.rpm
- 全国大学生建模大赛题目.pdf
- 数据库管理工具:dbeaver-ce-23.2.0-macos-x86-64.dmg
- 数据库管理工具:dbeaver-ce-23.2.0-macos-aarch64.dmg
- 电机学运动控制课程基础知识-绪论部分
- Delphi 12 控件之HGetIt.zip
- 数据库管理工具:dbeaver-ce-23.1.5-x86-64-setup.exe
- ADS1256的stm32参考程序
- 数据库管理工具:dbeaver-ce-23.1.5-macos-x86-64.dmg
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功