Fix Windows build
This commit is contained in:
parent
0d683c84b9
commit
3cced00e29
39
breakpad.bat
39
breakpad.bat
@ -1,37 +1,60 @@
|
||||
@echo on
|
||||
|
||||
IF EXIST breakpad\NUL GOTO HASBREAKPAD
|
||||
IF EXIST C:\Python27\NUL SET PATH=C:\Python27\;%PATH%
|
||||
|
||||
python --version
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
|
||||
@IF EXIST breakpad\NUL GOTO HASBREAKPAD
|
||||
mkdir breakpad
|
||||
:HASBREAKPAD
|
||||
cd breakpad
|
||||
|
||||
IF EXIST depot_tools\NUL GOTO HASDEPOTTOOLS
|
||||
@IF EXIST depot_tools\NUL GOTO HASDEPOTTOOLS
|
||||
git clone --depth=1 --branch=master https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
:HASDEPOTTOOLS
|
||||
|
||||
IF EXIST src\NUL GOTO HASSRC
|
||||
@IF EXIST src\NUL GOTO HASSRC
|
||||
cmd /c depot_tools\fetch --nohooks breakpad
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
GOTO DONESRC
|
||||
:HASSRC
|
||||
cmd /c depot_tools\gclient sync --nohooks
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
:DONESRC
|
||||
|
||||
IF EXIST gyp\NUL GOTO HASGYP
|
||||
@IF EXIST gyp\NUL GOTO HASGYP
|
||||
git clone --depth=1 --branch=master https://chromium.googlesource.com/external/gyp.git gyp
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
:HASGYP
|
||||
|
||||
powershell -Command "& {(Get-Content src\src\build\common.gypi).replace('''WarnAsError'': ''true'',', '''WarnAsError'': ''false'',') | Set-Content src\src\build\common.gypi}"
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
|
||||
cmd /c gyp\gyp.bat --no-circular-check src\src\client\windows\handler\exception_handler.gyp
|
||||
msbuild src\src\client\windows\handler\exception_handler.sln /m /p:Configuration=Release
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
msbuild src\src\client\windows\handler\exception_handler.sln /m /p:Configuration=Release /p:Platform=Win32
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
|
||||
cmd /c gyp\gyp.bat --no-circular-check src\src\client\windows\crash_generation\crash_generation.gyp
|
||||
msbuild src\src\client\windows\crash_generation\crash_generation.sln /m /p:Configuration=Release
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
msbuild src\src\client\windows\crash_generation\crash_generation.sln /m /p:Configuration=Release /p:Platform=Win32
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
|
||||
cmd /c gyp\gyp.bat --no-circular-check src\src\processor\processor.gyp
|
||||
msbuild src\src\processor\processor.sln /m /p:Configuration=Release
|
||||
IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
@REM msbuild src\src\processor\processor.sln /m /p:Configuration=Release /p:Platform=Win32
|
||||
@REM IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
@REM The solution file is currently including a load of broken projects, so just build exactly what we need.
|
||||
msbuild src\src\processor\processor.vcxproj /m /p:Configuration=Release /p:Platform=Win32
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
msbuild src\src\third_party\libdisasm\libdisasm.vcxproj /m /p:Configuration=Release /p:Platform=Win32
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
|
||||
cmd /c gyp\gyp.bat --no-circular-check src\src\tools\windows\dump_syms\dump_syms.gyp
|
||||
msbuild src\src\tools\windows\dump_syms\dump_syms.sln /m /p:Configuration=Release
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
msbuild src\src\tools\windows\dump_syms\dump_syms.sln /m /p:Configuration=Release /p:Platform=Win32
|
||||
@IF %errorlevel% neq 0 EXIT /b %errorlevel%
|
||||
|
||||
cd ..
|
||||
|
@ -38,24 +38,24 @@ def BuildEverything():
|
||||
|
||||
binary.AddSourceFiles(AMBuild.cache['SOURCEMOD'], ['public/smsdk_ext.cpp'])
|
||||
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
binary.AddSourceFiles(os.path.join('breakpad', 'src', 'src', 'common'), [
|
||||
'dwarf_cfi_to_module.cc',
|
||||
'dwarf_cu_to_module.cc',
|
||||
'dwarf_line_to_module.cc',
|
||||
'language.cc',
|
||||
'module.cc',
|
||||
'path_helper.cc',
|
||||
'stabs_reader.cc',
|
||||
'stabs_to_module.cc',
|
||||
'dwarf/bytereader.cc',
|
||||
'dwarf/dwarf2diehandler.cc',
|
||||
'dwarf/dwarf2reader.cc',
|
||||
'dwarf/elf_reader.cc',
|
||||
'linux/crc32.cc',
|
||||
'linux/dump_symbols.cc',
|
||||
'linux/elf_symbols_to_module.cc',
|
||||
])
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
binary.AddSourceFiles(os.path.join('breakpad', 'src', 'src', 'common'), [
|
||||
'dwarf_cfi_to_module.cc',
|
||||
'dwarf_cu_to_module.cc',
|
||||
'dwarf_line_to_module.cc',
|
||||
'language.cc',
|
||||
'module.cc',
|
||||
'path_helper.cc',
|
||||
'stabs_reader.cc',
|
||||
'stabs_to_module.cc',
|
||||
'dwarf/bytereader.cc',
|
||||
'dwarf/dwarf2diehandler.cc',
|
||||
'dwarf/dwarf2reader.cc',
|
||||
'dwarf/elf_reader.cc',
|
||||
'linux/crc32.cc',
|
||||
'linux/dump_symbols.cc',
|
||||
'linux/elf_symbols_to_module.cc',
|
||||
])
|
||||
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
libs = [
|
||||
@ -75,11 +75,11 @@ def BuildEverything():
|
||||
|
||||
elif AMBuild.target['platform'] in ['windows']:
|
||||
libs = [
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'common.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'Release', 'lib', 'crash_generation_client.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'libdisasm.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'processor.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'common.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'Release', 'lib', 'crash_generation_client.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'libdisasm.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'processor.lib'),
|
||||
]
|
||||
|
||||
for path in libs:
|
||||
|
@ -28,28 +28,28 @@ def BuildEverything():
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.ExecutableBuilder(name, AMBuild, extension, compiler)
|
||||
|
||||
sourceFiles = [
|
||||
'test.cpp',
|
||||
]
|
||||
sourceFiles = [
|
||||
'test.cpp',
|
||||
]
|
||||
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
sourceFiles.extend([
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf_cfi_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf_cu_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf_line_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'language.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'path_helper.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'stabs_reader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'stabs_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'bytereader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'dwarf2diehandler.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'dwarf2reader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'elf_reader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'linux', 'crc32.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'linux', 'dump_symbols.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'linux', 'elf_symbols_to_module.cc'),
|
||||
])
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
sourceFiles.extend([
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf_cfi_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf_cu_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf_line_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'language.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'path_helper.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'stabs_reader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'stabs_to_module.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'bytereader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'dwarf2diehandler.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'dwarf2reader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'dwarf', 'elf_reader.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'linux', 'crc32.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'linux', 'dump_symbols.cc'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'common', 'linux', 'elf_symbols_to_module.cc'),
|
||||
])
|
||||
|
||||
binary.AddSourceFiles('test', sourceFiles);
|
||||
|
||||
@ -71,11 +71,11 @@ def BuildEverything():
|
||||
|
||||
elif AMBuild.target['platform'] in ['windows']:
|
||||
libs = [
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'common.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'Release', 'lib', 'crash_generation_client.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'libdisasm.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'processor.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'common.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'Release', 'lib', 'crash_generation_client.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'libdisasm.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'processor.lib'),
|
||||
]
|
||||
|
||||
for path in libs:
|
||||
|
Loading…
Reference in New Issue
Block a user