Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[APIS-1007] 11.4 드라이버 호환성 테스트 - ODBC (#3) #76

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions build_2017.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
@echo off

set WORKSPACE=%~dp0
set INSTALL_DIRS=output
echo %INSTALL_DIRS%

:VS2017COMNTOOLS PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\
if "%VS2017COMNTOOLS%x" == "x" (
echo "Please add 'VS2017COMNTOOLS' in the environment variable\n ex) C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools"
GOTO :EOF
)

call "%VS2017COMNTOOLS%VsDevCmd.bat"
mkdir %INSTALL_DIRS%

Expand All @@ -20,7 +25,9 @@ copy installer\installer.nsi %INSTALL_DIRS%\installer.nsi
copy installer\license.txt %INSTALL_DIRS%\license.txt
copy installer\README.txt %INSTALL_DIRS%\README.txt

c:
cd C:\NSIS
makensis %WORKSPACE%\%INSTALL_DIRS%\installer.nsi

makensis %WORKSPACE%\%INSTALL_DIRS%\installer.nsi
if %ERRORLEVEL% NEQ 0 (
echo "Error: cannot find NSIS. Are system environment variables set?"
GOTO :EOF
)
16 changes: 12 additions & 4 deletions build_unicode_2017.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
@echo off

set WORKSPACE=%~dp0
set INSTALL_DIRS=output_unicode
echo %INSTALL_DIRS%

:VS2017COMNTOOLS PATH=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\
if "%VS2017COMNTOOLS%x" == "x" (
echo "Please add 'VS2017COMNTOOLS' in the environment variable\n ex) C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools"
GOTO :EOF
)

call "%VS2017COMNTOOLS%VsDevCmd.bat"
mkdir %INSTALL_DIRS%

Expand All @@ -15,7 +21,9 @@ copy installer\installer-unicode.nsi %INSTALL_DIRS%\installer-unicode.nsi
copy installer\license.txt %INSTALL_DIRS%\license.txt
copy installer\README.txt %INSTALL_DIRS%\README.txt

c:
cd C:\NSIS

makensis %WORKSPACE%\%INSTALL_DIRS%\installer-unicode.nsi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

일반 사용자도 빌드 할 수 있기 때문에
VS2017COMNTOOLS나 NSIS가 환경 변수에 등록할수 있도록
환경 변수를 체크하는 것이 좋을 것 같습니다. (체크후 설정되어 있지 않으면 진행되지 않도록)
그리고 makensis앞에도 환경 변수가 있으면 좋겠습니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 확인했습니다 다만 nsis 환경 변수 같은 경우에는 보통 변수를 따로 잡지 않고 Path 내부에 nsis 디렉토리만 설정해서 사용하는 것 같아서 makensis명령이 실행 안됐을떄만 if 분기로 아래 예시처럼 처리하도록 수정하겠습니다

makensis

if %ERRORLEVEL% NEQ 0 (
  echo error: cannot find nsis
  goto :EOF
)

echo nsis launch success


if %ERRORLEVEL% NEQ 0 (
echo "error: cannot find NSIS. Are system environment variables set?"
GOTO :EOF
)
5 changes: 4 additions & 1 deletion cubrid_odbc_14.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ProjectName>cubrid_odbc</ProjectName>
<ProjectGuid>{37E00A2E-BBC5-4736-90D9-A1B4271759BB}</ProjectGuid>
<RootNamespace>cubrid_odbc</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -171,6 +172,7 @@
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
<ShowProgress>NotSet</ShowProgress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down Expand Up @@ -253,7 +255,7 @@
<Link>
<AdditionalDependencies>odbc32.lib;odbccp32.lib;wsock32.lib;cas_cci_d_14.lib;libssl.lib;libcrypto.lib;Crypt32.lib;Ws2_32.lib;legacy_stdio_definitions.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).dll</OutputFile>
<AdditionalLibraryDirectories>$(ProjectDir)\cci\lib64;C:\Program Files %28x86%29\Microsoft Visual Studio 14.0\VC\lib\amd64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>$(ProjectDir)cci\lib64;C:\Program Files %28x86%29\Microsoft Visual Studio 14.0\VC\lib\amd64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>cubrid_odbc.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)$(ProjectName).pdb</ProgramDatabaseFile>
Expand All @@ -262,6 +264,7 @@
<AdditionalOptions>
</AdditionalOptions>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<ShowProgress>NotSet</ShowProgress>
</Link>
<ProjectReference>
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
Expand Down
1 change: 1 addition & 0 deletions cubrid_odbc_unicode_14.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<ProjectName>cubrid_odbc_unicode</ProjectName>
<ProjectGuid>{0092BD82-BCE8-4E10-A9DB-D083FC5C9D67}</ProjectGuid>
<RootNamespace>cubrid_odbc</RootNamespace>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
6 changes: 3 additions & 3 deletions odbc_version.i
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MAJOR_VERSION 11
#define MINOR_VERSION 3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

드라이버는 이제 Server 버전을 따르지 않습니다.
그러므로 CCI 또는 ODBC 변경사항이 크지 않다면 PATCH_VERSION만 올려주시면 됩니다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

네 확인했습니다 버전을 "11.3.1.0062"로 수정하겠습니다

#define PATCH_VERSION 0
#define BUILD_SERIAL_NUMBER 0061
#define VERSION_STRING "11.3.0.0061"
#define PATCH_VERSION 1
#define BUILD_SERIAL_NUMBER 0062
#define VERSION_STRING "11.3.1.0062"
21 changes: 10 additions & 11 deletions script/get_cci_driver.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@ if EXIST "%SCRIPT_DIR%\cubrid-cci" rmdir /s /q cubrid-cci

git clone [email protected]:CUBRID/cubrid-cci.git

if "%VS140COMNTOOLS%x" == "x" echo "Please add 'VS140COMNTOOLS' in the environment variable\n ex) C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools"
if "%VS110COMNTOOLS%x" == "x" echo "Please add 'VS110COMNTOOLS' in the environment variable\n ex) C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\Tools"
if "%VS2017COMNTOOLS%x" == "x" echo "Please add 'VS2017COMNTOOLS' in the environment variable\n ex) C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools"

cd %CCI_WIN_DIR%

call "%VS140COMNTOOLS%vsvars32.bat"
devenv cas_cci_v140_lib.vcxproj /build "release|x86"
if not "%ERRORLEVEL%" == "0" echo "Please check for 32bit V140 Relase Library." & GOTO END_SCRIPT
devenv cas_cci_v140_lib.vcxproj /build "debug|x86"
if not "%ERRORLEVEL%" == "0" echo "Please check for 32bit V140 Debug Library." & GOTO END_SCRIPT
devenv cas_cci_v140_lib.vcxproj /build "release|x64"
if not "%ERRORLEVEL%" == "0" echo "Please check for 64bit V140 Relase Library." & GOTO END_SCRIPT
devenv cas_cci_v140_lib.vcxproj /build "debug|x64"
if not "%ERRORLEVEL%" == "0" echo "Please check for 64bit V140 Debug Library." & GOTO END_SCRIPT
call "%VS2017COMNTOOLS%VsDevCmd.bat"
devenv cas_cci_v141_lib.vcxproj /build "release|x86"
if not "%ERRORLEVEL%" == "0" echo "Please check for 32bit V141 Relase Library." & GOTO END_SCRIPT
devenv cas_cci_v141_lib.vcxproj /build "debug|x86"
if not "%ERRORLEVEL%" == "0" echo "Please check for 32bit V141 Debug Library." & GOTO END_SCRIPT
devenv cas_cci_v141_lib.vcxproj /build "release|x64"
if not "%ERRORLEVEL%" == "0" echo "Please check for 64bit V141 Relase Library." & GOTO END_SCRIPT
devenv cas_cci_v141_lib.vcxproj /build "debug|x64"
if not "%ERRORLEVEL%" == "0" echo "Please check for 64bit V141 Debug Library." & GOTO END_SCRIPT

copy %CCI_WIN_DIR%\Win32\Release\cas_cci.lib %INSTALL_DIRS%\lib32\cas_cci_14.lib
copy %CCI_WIN_DIR%\Win32\Debug\cas_cci.lib %INSTALL_DIRS%\lib32\cas_cci_d_14.lib
Expand Down
6 changes: 3 additions & 3 deletions test.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
call "E:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
call "%VS2017COMNTOOLS%VsDevCmd.bat"
cd UnitTest
devenv UnitTest.sln /project UnitTest\UnitTest.csproj /rebuild "Release|x86"
cd UnitTest\bin\x86\Release
devenv UnitTest.sln /project UnitTest\UnitTest.csproj /rebuild "Release|x64"
cd UnitTest\bin\x64\Release
MSTest/testcontainer:UnitTest.dll