added changes to environment for unloze build and added README with rough instructions on how to build manually without having to use CI
This commit is contained in:
+81
-81
@@ -6,102 +6,102 @@ from ambuild.command import ShellCommand
|
||||
from ambuild.command import DirectCommand
|
||||
|
||||
def BuildEverything():
|
||||
if AMBuild.target['platform'] not in ['linux', 'windows']:
|
||||
return
|
||||
if AMBuild.target['platform'] not in ['linux', 'windows']:
|
||||
return
|
||||
|
||||
compiler = SM.DefaultCompiler()
|
||||
compiler = SM.DefaultCompiler()
|
||||
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'extension'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'extension'))
|
||||
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public', 'extensions'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public', 'amtl', 'amtl'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public', 'amtl'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'sourcepawn', 'include'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public', 'extensions'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public', 'amtl', 'amtl'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'public', 'amtl'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.cache['SOURCEMOD'], 'sourcepawn', 'include'))
|
||||
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
compiler['POSTLINKFLAGS'].append('-lm')
|
||||
compiler['POSTLINKFLAGS'].append('-lstdc++')
|
||||
compiler['POSTLINKFLAGS'].append('-pthread')
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
compiler['POSTLINKFLAGS'].append('-lm')
|
||||
compiler['POSTLINKFLAGS'].append('-lstdc++')
|
||||
compiler['POSTLINKFLAGS'].append('-pthread')
|
||||
|
||||
compiler['CDEFINES'].append('HAVE_CONFIG_H')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'breakpad', 'build', 'src'))
|
||||
compiler['CDEFINES'].append('HAVE_CONFIG_H')
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'extension', 'breakpad', 'build', 'src'))
|
||||
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src'))
|
||||
compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'extension', 'breakpad', 'src', 'src'))
|
||||
|
||||
name = 'accelerator.ext'
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
name = 'accelerator.ext'
|
||||
extension = AMBuild.AddJob(name)
|
||||
binary = Cpp.LibraryBuilder(name, AMBuild, extension, compiler)
|
||||
|
||||
binary.AddSourceFiles('extension', [
|
||||
'extension.cpp',
|
||||
'MemoryDownloader.cpp',
|
||||
])
|
||||
binary.AddSourceFiles('extension', [
|
||||
'extension.cpp',
|
||||
'MemoryDownloader.cpp',
|
||||
])
|
||||
|
||||
binary.AddSourceFiles(AMBuild.cache['SOURCEMOD'], [
|
||||
'public/smsdk_ext.cpp',
|
||||
# 'public/libudis86/decode.c',
|
||||
# 'public/libudis86/itab.c',
|
||||
# 'public/libudis86/syn-att.c',
|
||||
# 'public/libudis86/syn-intel.c',
|
||||
# 'public/libudis86/syn.c',
|
||||
# 'public/libudis86/udis86.c',
|
||||
])
|
||||
binary.AddSourceFiles(AMBuild.cache['SOURCEMOD'], [
|
||||
'public/smsdk_ext.cpp',
|
||||
# 'public/libudis86/decode.c',
|
||||
# 'public/libudis86/itab.c',
|
||||
# 'public/libudis86/syn-att.c',
|
||||
# 'public/libudis86/syn-intel.c',
|
||||
# 'public/libudis86/syn.c',
|
||||
# 'public/libudis86/udis86.c',
|
||||
])
|
||||
|
||||
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',
|
||||
'dwarf_range_list_handler.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',
|
||||
'linux/breakpad_getcontext.S',
|
||||
])
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
binary.AddSourceFiles(os.path.join('extension', 'breakpad', 'src', 'src', 'common'), [
|
||||
'dwarf_cfi_to_module.cc',
|
||||
'dwarf_cu_to_module.cc',
|
||||
'dwarf_line_to_module.cc',
|
||||
'dwarf_range_list_handler.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',
|
||||
'linux/breakpad_getcontext.S',
|
||||
])
|
||||
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
libs = [
|
||||
('libbreakpad_client.a', os.path.join('breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')),
|
||||
('libbreakpad.a', os.path.join('breakpad', 'build', 'src', 'libbreakpad.a')),
|
||||
('libdisasm.a', os.path.join('breakpad', 'build', 'src', 'third_party', 'libdisasm', 'libdisasm.a')),
|
||||
]
|
||||
if AMBuild.target['platform'] in ['linux']:
|
||||
libs = [
|
||||
('libbreakpad_client.a', os.path.join('extension', 'breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')),
|
||||
('libbreakpad.a', os.path.join('extension', 'breakpad', 'build', 'src', 'libbreakpad.a')),
|
||||
('libdisasm.a', os.path.join('extension', 'breakpad', 'build', 'src', 'third_party', 'libdisasm', 'libdisasm.a')),
|
||||
]
|
||||
|
||||
for lib, target in libs:
|
||||
link = os.path.join(AMBuild.outputFolder, extension.workFolder, lib)
|
||||
target = os.path.join(AMBuild.sourceFolder, target)
|
||||
try:
|
||||
os.lstat(link)
|
||||
except:
|
||||
extension.AddCommand(SymlinkCommand(link, target))
|
||||
binary.AddObjectFiles([lib])
|
||||
for lib, target in libs:
|
||||
link = os.path.join(AMBuild.outputFolder, extension.workFolder, lib)
|
||||
target = os.path.join(AMBuild.sourceFolder, target)
|
||||
try:
|
||||
os.lstat(link)
|
||||
except:
|
||||
extension.AddCommand(SymlinkCommand(link, target))
|
||||
binary.AddObjectFiles([lib])
|
||||
|
||||
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', 'third_party', 'libdisasm', 'Release', 'lib', 'libdisasm.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'processor.lib'),
|
||||
]
|
||||
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', 'third_party', 'libdisasm', 'Release', 'lib', 'libdisasm.lib'),
|
||||
os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'processor', 'Release', 'lib', 'processor.lib'),
|
||||
]
|
||||
|
||||
for path in libs:
|
||||
if os.path.isfile(path):
|
||||
binary.RelinkIfNewer(path)
|
||||
binary['POSTLINKFLAGS'].extend([path])
|
||||
for path in libs:
|
||||
if os.path.isfile(path):
|
||||
binary.RelinkIfNewer(path)
|
||||
binary['POSTLINKFLAGS'].extend([path])
|
||||
|
||||
SM.AutoVersion('extension', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
SM.AutoVersion('extension', binary)
|
||||
SM.ExtractDebugInfo(extension, binary)
|
||||
|
||||
binary.SendToJob()
|
||||
binary.SendToJob()
|
||||
|
||||
BuildEverything()
|
||||
|
||||
Reference in New Issue
Block a user