aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/scripts/ci/appveyor.yml24
-rwxr-xr-xsrc/scripts/ci_build.py6
-rwxr-xr-xsrc/scripts/install.py39
3 files changed, 19 insertions, 50 deletions
diff --git a/src/scripts/ci/appveyor.yml b/src/scripts/ci/appveyor.yml
index 26a977ad1..aa2b22c46 100644
--- a/src/scripts/ci/appveyor.yml
+++ b/src/scripts/ci/appveyor.yml
@@ -1,36 +1,22 @@
-# Let's call MSVS 2017 the default compiler, 64 bit the default architecture,
-# release the default configuration and --enable-shared the default mode.
-#
-# Build jobs
-# 1. six basic builds: 32/64bit on MSVS2013/2015/2017
-# 2. MSVC2017 static lib with with amalgamation
-# 3. MSVC2017 with debug/sanitizers
-# 4. MSVC2015 for Windows RT (TODO)
clone_depth: 5
environment:
matrix:
- # 1
- - MSVS: 2013
- PLATFORM: x86
- TARGET: shared
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ # MSVC 2013 DLL x86-64
- MSVS: 2013
PLATFORM: x86_amd64
TARGET: shared
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- - MSVS: 2015
- PLATFORM: x86
- TARGET: shared
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ # MSVC 2015 DLL x86-64
- MSVS: 2015
PLATFORM: x86_amd64
TARGET: shared
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
+ # MSVC 2017 DLL x86-32 + x86-64
- MSVS: 2017
PLATFORM: x86
TARGET: shared
@@ -40,13 +26,13 @@ environment:
TARGET: shared
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- # 2
+ # MSVC 2017 static x86-64
- MSVS: 2017
PLATFORM: x86_amd64
TARGET: static
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- # 3
+ # MSVC 2017 w/debug iterators
- MSVS: 2017
PLATFORM: x86_amd64
TARGET: sanitizer
diff --git a/src/scripts/ci_build.py b/src/scripts/ci_build.py
index c81c86795..8c1645d3e 100755
--- a/src/scripts/ci_build.py
+++ b/src/scripts/ci_build.py
@@ -71,8 +71,10 @@ def determine_flags(target, target_os, target_cpu, target_cc, cc_bin, ccache, ro
if target in ['mini-static', 'mini-shared']:
flags += ['--minimized-build', '--enable-modules=system_rng,sha2_32,sha2_64,aes']
- if target == 'static':
- # Arbitrarily test amalgamation on static lib builds
+ if target == 'shared':
+ # Enabling amalgamation build for shared is somewhat arbitrary, but we want to test it
+ # somewhere. In addition the majority of the Windows builds are shared, and MSVC is
+ # much faster compiling via the amalgamation than individual files.
flags += ['--amalgamation']
if target in ['bsi', 'nist']:
diff --git a/src/scripts/install.py b/src/scripts/install.py
index 7a5659b47..c6e4ec2cd 100755
--- a/src/scripts/install.py
+++ b/src/scripts/install.py
@@ -14,7 +14,6 @@ import logging
import optparse # pylint: disable=deprecated-module
import os
import shutil
-import string
import sys
import subprocess
@@ -148,24 +147,13 @@ def main(args):
with open(os.path.join(options.build_dir, 'build_config.json')) as f:
cfg = json.load(f)
- def process_template(template_str):
- class PercentSignTemplate(string.Template):
- delimiter = '%'
-
- try:
- template = PercentSignTemplate(template_str)
- return template.substitute(cfg)
- except KeyError as e:
- raise Exception('Unbound var %s in template' % (e))
- except Exception as e:
- raise Exception('Exception %s in template' % (e))
-
ver_major = int(cfg['version_major'])
ver_minor = int(cfg['version_minor'])
ver_patch = int(cfg['version_patch'])
target_os = cfg['os']
build_shared_lib = bool(cfg['build_shared_lib'])
build_static_lib = bool(cfg['build_static_lib'])
+ out_dir = cfg['out_dir']
bin_dir = os.path.join(options.prefix, options.bindir)
lib_dir = os.path.join(options.prefix, options.libdir)
@@ -174,12 +162,6 @@ def main(args):
'botan-%d' % (ver_major),
'botan')
- out_dir = process_template('%{out_dir}')
- if target_os == "windows":
- app_exe = 'botan-cli.exe'
- else:
- app_exe = process_template('botan%{program_suffix}')
-
for d in [options.prefix, lib_dir, bin_dir, target_include_dir]:
makedirs(prepend_destdir(d))
@@ -197,21 +179,21 @@ def main(args):
copy_file(os.path.join(build_external_include_dir, include),
prepend_destdir(os.path.join(target_include_dir, include)))
- if build_static_lib:
- static_lib = process_template('%{lib_prefix}%{libname}.%{static_suffix}')
+ if build_static_lib or target_os == 'windows':
+ static_lib = cfg['static_lib_name']
copy_file(os.path.join(out_dir, static_lib),
prepend_destdir(os.path.join(lib_dir, os.path.basename(static_lib))))
if build_shared_lib:
if target_os == "windows":
- libname = process_template('%{libname}')
+ libname = cfg['libname']
soname_base = libname + '.dll'
copy_executable(os.path.join(out_dir, soname_base),
prepend_destdir(os.path.join(lib_dir, soname_base)))
else:
- soname_patch = process_template('%{soname_patch}')
- soname_abi = process_template('%{soname_abi}')
- soname_base = process_template('%{soname_base}')
+ soname_patch = cfg['soname_patch']
+ soname_abi = cfg['soname_abi']
+ soname_base = cfg['soname_base']
copy_executable(os.path.join(out_dir, soname_patch),
prepend_destdir(os.path.join(lib_dir, soname_patch)))
@@ -225,8 +207,7 @@ def main(args):
finally:
os.chdir(prev_cwd)
- copy_executable(os.path.join(out_dir, app_exe),
- prepend_destdir(os.path.join(bin_dir, app_exe)))
+ copy_executable(cfg['cli_exe'], prepend_destdir(os.path.join(bin_dir, cfg['cli_exe_name'])))
# On Darwin, if we are using shared libraries and we install, we should fix
# up the library name, otherwise the botan command won't work; ironically
@@ -234,13 +215,13 @@ def main(args):
# that would be correct for installation to one that lets us run it from
# the build directory
if target_os == 'darwin' and build_shared_lib:
- soname_abi = process_template('%{soname_abi}')
+ soname_abi = cfg['soname_abi']
subprocess.check_call(['install_name_tool',
'-change',
os.path.join('@executable_path', soname_abi),
os.path.join(lib_dir, soname_abi),
- os.path.join(bin_dir, app_exe)])
+ os.path.join(bin_dir, cfg['cli_exe_name'])])
if 'botan_pkgconfig' in cfg:
pkgconfig_dir = os.path.join(options.prefix, options.libdir, options.pkgconfigdir)