diff --git a/.gitignore b/.gitignore index 1dc1817..4b02965 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,3 @@ -# Build output /build /extension/version_auto.h - -# Breakpad stuff, it apparently has to be called src -/src -/.gclient -/.gclient_entries +/breakpad diff --git a/.travis.yml b/.travis.yml index 82421e4..bea163b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,18 +8,12 @@ compiler: - clang before_script: - cd .. - - git clone --depth=1 --branch=master https://chromium.googlesource.com/chromium/tools/depot_tools.git - git clone --depth=1 --branch=1.7-dev https://github.com/alliedmodders/sourcemod sourcemod-1.5 - git clone --depth=1 --branch=master https://github.com/alliedmodders/ambuild - cd ambuild && python setup.py install --user - cd $TRAVIS_BUILD_DIR - - ../depot_tools/fetch breakpad - - mkdir ../dump_syms_build && cd ../dump_syms_build - - CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 $TRAVIS_BUILD_DIR/src/configure - - make src/tools/linux/dump_syms/dump_syms - - export PATH=$PATH:$PWD/src/tools/linux/dump_syms/ - - cd $TRAVIS_BUILD_DIR - git fetch --unshallow || true + - ./breakpad.sh && export PATH=$PATH:$PWD/breakpad/src/tools/linux/dump_syms/ script: - mkdir build && cd build - python ../configure.py --enable-optimize diff --git a/breakpad.sh b/breakpad.sh new file mode 100755 index 0000000..035df1e --- /dev/null +++ b/breakpad.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -ex + +if [ ! -d "breakpad" ]; then + mkdir breakpad +fi + +cd breakpad + +if [ ! -d "depot_tools" ]; then + git clone --depth=1 --branch=master https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools +fi + +if [ ! -d "src" ]; then + ./depot_tools/fetch breakpad +else + ./depot_tools/gclient sync +fi + +cd src + +CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure + +make src/tools/linux/dump_syms/dump_syms +#make src/client/linux/libbreakpad_client.a diff --git a/extension/AMBuilder b/extension/AMBuilder index a7d19d6..249e204 100644 --- a/extension/AMBuilder +++ b/extension/AMBuilder @@ -16,21 +16,21 @@ def BuildBreakpad(): breakpad = AMBuild.AddJob('breakpad') if AMBuild.target['platform'] in ['linux']: - if osutil.FileExists(os.path.join(AMBuild.outputFolder, 'src', 'src', 'client', 'linux', 'libbreakpad_client.a')): + if osutil.FileExists(os.path.join(AMBuild.outputFolder, 'breakpad', 'src', 'client', 'linux', 'libbreakpad_client.a')): return - breakpad.AddCommand(ShellCommand('CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ' + os.path.join(AMBuild.sourceFolder, 'src', 'configure'))) + breakpad.AddCommand(ShellCommand('CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ' + os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'configure'))) breakpad.AddCommand(ShellCommand('make src/client/linux/libbreakpad_client.a')) elif AMBuild.target['platform'] in ['windows']: - if osutil.FileExists(os.path.join(AMBuild.sourceFolder, 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib')): + if osutil.FileExists(os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib')): return - gyp = os.path.join(AMBuild.sourceFolder, 'src', 'src', 'tools', 'gyp', 'gyp.bat') - gyppath = os.path.join(AMBuild.sourceFolder, 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.gyp') + gyp = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'tools', 'gyp', 'gyp.bat') + gyppath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.gyp') breakpad.AddCommand(DirectCommand([gyp, gyppath])) - slnpath = os.path.join(AMBuild.sourceFolder, 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.sln') + slnpath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.sln') breakpad.AddCommand(DirectCommand(['msbuild', slnpath, '/p:Configuration=Release'])) def BuildExtension():