From 95100c486e8dd0a2f4597f533294a9b8c72158c9 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Sun, 25 Feb 2018 14:56:32 -0500 Subject: [PATCH] Switch to MYSQLC/_64 env var and update messages to note usage of Connector/C. --- AMBuildScript | 12 ++++-------- configure.py | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/AMBuildScript b/AMBuildScript index 853f0789e..5d2c65937 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -182,12 +182,9 @@ class SMConfig(object): if builder.options.mysql_path: self.mysql_root['x86'] = builder.options.mysql_path else: - for i in range(7): - self.mysql_root['x86'] = ResolveEnvPath('MYSQL5', 'mysql-5.' + str(i)) - if self.mysql_root['x86']: - break + self.mysql_root['x86'] = ResolveEnvPath('MYSQLC', 'mysql-connector-c' if not self.mysql_root['x86'] or not os.path.isdir(self.mysql_root['x86']): - raise Exception('Could not find a path to MySQL!') + raise Exception('Could not find a path to MySQL Connector/C!') self.mysql_root['x86'] = Normalize(self.mysql_root['x86']) # For now, ignore 64-bit MySQL on Windows @@ -195,12 +192,11 @@ class SMConfig(object): if builder.options.mysql_path: self.mysql_root['x64'] = builder.options.mysql64_path else: - for i in range(7): - self.mysql_root['x64'] = ResolveEnvPath('MYSQL5_64', 'mysql-5.' + str(i) + '-x86_64') + self.mysql_root['x64'] = ResolveEnvPath('MYSQLC_64', 'mysql-connector-c-x86_64') if self.mysql_root['x64']: break if not self.mysql_root['x64'] or not os.path.isdir(self.mysql_root['x64']): - raise Exception('Could not find a path to 64-bit MySQL!') + raise Exception('Could not find a path to 64-bit MySQL Connector/C!') self.mysql_root['x64'] = Normalize(self.mysql_root['x64']) def configure(self): diff --git a/configure.py b/configure.py index a0e99b952..166e9d676 100644 --- a/configure.py +++ b/configure.py @@ -21,9 +21,9 @@ parser.default_build_folder = make_objdir_name parser.options.add_option('--hl2sdk-root', type=str, dest='hl2sdk_root', default=None, help='Root search folder for HL2SDKs') parser.options.add_option('--mysql-path', type=str, dest='mysql_path', default=None, - help='Path to MySQL 5') + help='Path to MySQL Connector/C') parser.options.add_option('--mysql64-path', type=str, dest='mysql64_path', default=None, - help='Path to 64-bit MySQL 5') + help='Path to 64-bit Connector/C') parser.options.add_option('--mms-path', type=str, dest='mms_path', default=None, help='Path to Metamod:Source') parser.options.add_option('--enable-debug', action='store_const', const='1', dest='debug',