Skip to content

Commit

Permalink
Bump MySQL version to 5.5 (#466)
Browse files Browse the repository at this point in the history
* Bump MySQL version to 5.5

* Let's see how Travis-CI goes

* Let's see how AppVeyor goes

* Adjust windows library path
  • Loading branch information
Arkshine committed Oct 31, 2017
1 parent 7fe7cd7 commit 175d492
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Expand Up @@ -18,9 +18,9 @@ compiler:
before_script:
- CHECKOUT_DIR=$PWD && cd ..
- chmod a+x $CHECKOUT_DIR/support/checkout-deps.sh
- $CHECKOUT_DIR/support/checkout-deps.sh --no-mysql && cd $CHECKOUT_DIR
- $CHECKOUT_DIR/support/checkout-deps.sh && cd $CHECKOUT_DIR
script:
- mkdir build && cd build
- PATH="~/.local/bin:$PATH"
- CC=clang-3.7 CXX=clang-3.7 python ../configure.py --enable-optimize --no-mysql
- CC=clang-3.7 CXX=clang-3.7 python ../configure.py --enable-optimize
- ambuild
4 changes: 2 additions & 2 deletions AMBuildScript
Expand Up @@ -88,15 +88,15 @@ class AMXXConfig(object):

mysql_path = builder.options.mysql_path
if not len(mysql_path):
mysql_path = os.getenv('MYSQL5', '')
mysql_path = os.getenv('MYSQL55', '')

if len(mysql_path):
self.mysql_path = os.path.join(builder.originalCwd, mysql_path)
if not os.path.exists(self.mysql_path):
raise Exception('Metamod path does not exist: {0}'.format(mysql_path))
else:
try_paths = [
os.path.join(builder.sourcePath, '..', 'mysql-5.0'),
os.path.join(builder.sourcePath, '..', 'mysql-5.5'),
]
for try_path in try_paths:
if os.path.exists(try_path):
Expand Down
12 changes: 10 additions & 2 deletions appveyor.yml
Expand Up @@ -7,12 +7,20 @@ install:
- git clone https://github.com/alliedmodders/ambuild
- git clone https://github.com/alliedmodders/metamod-hl1
- git clone https://github.com/alliedmodders/hlsdk
- cd ambuild
- ps: Start-FileDownload 'http://cdn.mysql.com/archives/mysql-5.5/mysql-5.5.54-win32.zip'
- 7z x mysql-5.5.54-win32.zip -o"mysql"
- cd mysql
- ren mysql-5.5.54-win32 mysql-5.5
- move /Y mysql-5.5 ..\
- cd ..\ambuild
- c:\python27\python setup.py install
- cd ..\amxmodx
cache:
- c:\projects\*.zip -> appveyor.yml
- c:\projects\mysql-5.5 -> appveyor.yml
build_script:
- '"%VS120COMNTOOLS%\vsvars32.bat"'
- mkdir build
- cd build
- c:\python27\python ../configure.py --enable-optimize --no-mysql
- c:\python27\python ../configure.py --enable-optimize
- c:\python27\scripts\ambuild
2 changes: 1 addition & 1 deletion modules/mysqlx/AMBuilder
Expand Up @@ -26,7 +26,7 @@ if AMXX.mysql_path:
]
elif builder.target_platform is 'windows':
binary.compiler.linkflags += [
os.path.join(AMXX.mysql_path, 'lib', 'opt', 'mysqlclient.lib'),
os.path.join(AMXX.mysql_path, 'lib', 'mysqlclient.lib'),
'ws2_32.lib'
]
if binary.compiler.vendor == 'msvc' and binary.compiler.version >= 1900:
Expand Down
8 changes: 4 additions & 4 deletions modules/mysqlx/msvc12/mysqlx.vcxproj
Expand Up @@ -54,7 +54,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk;..\..\..\public\amtl;..\..\third_party;..\..\third_party\hashing;..\..\..\..\mysql-5.0\include;..\mysql;..\sdk;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;$(MYSQL5)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk;..\..\..\public\amtl;..\..\third_party;..\..\third_party\hashing;..\..\..\..\mysql-5.5\include;..\mysql;..\sdk;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;$(MYSQL55)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_ITERATOR_DEBUG_LEVEL=0;_DEBUG;_WINDOWS;_USRDLL;MYSQL2_EXPORTS;SM_DEFAULT_THREADER;HAVE_STDINT_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
Expand All @@ -66,7 +66,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;..\..\..\..\mysql-5.0\lib\opt\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;..\..\..\..\mysql-5.5\lib\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>LIBCMT;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)mysql2.pdb</ProgramDatabaseFile>
Expand All @@ -78,7 +78,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk;..\..\..\public\amtl;..\..\third_party;..\..\third_party\hashing;..\..\..\..\mysql-5.0\include;..\mysql;..\sdk;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;$(MYSQL5)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\;..\..\..\public;..\..\..\public\sdk;..\..\..\public\amtl;..\..\third_party;..\..\third_party\hashing;..\..\..\..\mysql-5.5\include;..\mysql;..\sdk;..\thread;$(METAMOD)\metamod;$(HLSDK)\common;$(HLSDK)\engine;$(HLSDK)\dlls;$(HLSDK)\public;$(MYSQL55)\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_ITERATOR_DEBUG_LEVEL=0;NDEBUG;_WINDOWS;_USRDLL;MYSQL2_EXPORTS;SM_DEFAULT_THREADER;HAVE_STDINT_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
Expand All @@ -88,7 +88,7 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;..\..\..\..\mysql-5.0\lib\opt\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>ws2_32.lib;..\..\..\..\mysql-5.5\lib\mysqlclient.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
Expand Down
14 changes: 7 additions & 7 deletions support/checkout-deps.sh
Expand Up @@ -21,19 +21,19 @@ if [ "$1" != "--no-mysql" ]; then
fi

if [ $ismac -eq 1 ]; then
mysqlver=mysql-5.5.28-osx10.5-x86
mysqlver=mysql-5.5.40-osx10.6-x86
mysqlurl=http://cdn.mysql.com/archives/mysql-5.5/$mysqlver.$archive_ext
elif [ $iswin -eq 1 ]; then
mysqlver=mysql-noinstall-5.0.24a-win32
mysqlurl=http://cdn.mysql.com/archives/mysql-5.0/$mysqlver.$archive_ext
mysqlver=mysql-5.5.57-win32
mysqlurl=http://cdn.mysql.com/archives/mysql-5.5/$mysqlver.$archive_ext
# The folder in the zip archive does not contain the substring "-noinstall", so strip it
mysqlver=${mysqlver/-noinstall}
else
mysqlver=mysql-5.6.15-linux-glibc2.5-i686
mysqlurl=http://cdn.mysql.com/archives/mysql-5.6/$mysqlver.$archive_ext
mysqlver=mysql-5.5.57-linux-glibc2.12-i686
mysqlurl=http://cdn.mysql.com/archives/mysql-5.5/$mysqlver.$archive_ext
fi

if [ ! -d "mysql-5.0" ]; then
if [ ! -d "mysql-5.5" ]; then
if [ `command -v wget` ]; then
wget $mysqlurl -O mysql.$archive_ext
elif [ `command -v curl` ]; then
Expand All @@ -43,7 +43,7 @@ if [ "$1" != "--no-mysql" ]; then
exit 1
fi
$decomp mysql.$archive_ext
mv $mysqlver mysql-5.0
mv $mysqlver mysql-5.5
rm mysql.$archive_ext
fi
fi
Expand Down

0 comments on commit 175d492

Please sign in to comment.