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:
		
							parent
							
								
									ab34d8a17b
								
							
						
					
					
						commit
						083abd125e
					
				@ -81,9 +81,9 @@ class SM:
 | 
				
			|||||||
				self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
 | 
									self.compiler.AddToListVar('CFLAGS', '-Wno-unused')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
 | 
									self.compiler.AddToListVar('CFLAGS', '-Wno-switch')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-Wno-implicit-exception-spec-mismatch')
 | 
									self.compiler.AddToListVar('CFLAGS', '-Wno-implicit-exception-spec-mismatch')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-Wno-builtin-declaration-mismatch')
 | 
									#self.compiler.AddToListVar('CFLAGS', '-Wno-builtin-declaration-mismatch')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-Wno-unused-result')
 | 
									self.compiler.AddToListVar('CFLAGS', '-Wno-unused-result')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-Wno-stringop-truncation')
 | 
									#self.compiler.AddToListVar('CFLAGS', '-Wno-stringop-truncation')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-msse')
 | 
									self.compiler.AddToListVar('CFLAGS', '-msse')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-g3')
 | 
									self.compiler.AddToListVar('CFLAGS', '-g3')
 | 
				
			||||||
				self.compiler.AddToListVar('CFLAGS', '-m32')
 | 
									self.compiler.AddToListVar('CFLAGS', '-m32')
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										62
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					There are no real changes to this compared to the version from boss over at https://github.com/srcdslab/sm-ext-accelerator/tree/master
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The difference just being some basic environment settings for different paths and disabling some CFLAGS probably not available in clang14.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Unlike boss i prefer building this without having to rely on docker and an entire continous integration workflow.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The following is a rough list of steps to reproduce the build manually. I build it some hours ago so i probably forgot some commands by now. Basically you just have to replicate some build steps from https://github.com/srcdslab/sm-ext-accelerator/blob/master/.github/workflows/ci.yml
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo $SOURCEMOD 
 | 
				
			||||||
 | 
					this has to return the path to the folder where your intended sourcemod installation is.
 | 
				
			||||||
 | 
					export SOURCEMOD=/home/gameservers/automate/sourcemod\_2023\_accelerator
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export CC=clang
 | 
				
			||||||
 | 
					export CXX=clang++
 | 
				
			||||||
 | 
					export PATH="/usr/lib/jvm/jdk-17/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:/usr/X11/bin:/home/gameservers/.local/bin":/sbin:/bin:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					the path is not exactly required like this, generally you just want /home/gameservers/.local/bin: because its where ambuild is installed atm on the OVH machine.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					step 1:
 | 
				
			||||||
 | 
					directory: /home/gameservers/automate/sourcemod\_2023\_accelerator/extensions/sm-ext-accelerator/extension
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					mkdir breakpad && cd breakpad
 | 
				
			||||||
 | 
					git clone --recursive --branch=main https://chromium.googlesource.com/chromium/tools/depot_tools.git depot_tools
 | 
				
			||||||
 | 
					cd depot_tools 
 | 
				
			||||||
 | 
					git checkout 08bb5c487f80147a236360ea50f4544890530779
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					step 2:
 | 
				
			||||||
 | 
					directory: /home/gameservers/automate/sourcemod_2023_accelerator/extensions/sm-ext-accelerator/extension/breakpad
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cp depot_tools/.vpython3 .
 | 
				
			||||||
 | 
					PYTHONDONTWRITEBYTECODE=1 ./depot_tools/vpython3 ./depot_tools/fetch.py --nohooks breakpad
 | 
				
			||||||
 | 
					cd src
 | 
				
			||||||
 | 
					git config user.name patches
 | 
				
			||||||
 | 
					git config user.email patches@localhost
 | 
				
			||||||
 | 
					git checkout e3af4457b8355fcf1814e6dfb6073a848b44a282
 | 
				
			||||||
 | 
					git am -3 --keep-cr ../../patches/*.patch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					cd ..
 | 
				
			||||||
 | 
					mkdir build && cd build
 | 
				
			||||||
 | 
					env ac_cv_header_a_out_h=yes ../src/configure --enable-m32 CFLAGS="-Wno-error=deprecated" CXXFLAGS="-Wno-error=deprecated -g -O2 -D_GLIBCXX_USE_CXX11_ABI=0" CPPFLAGS=-m32
 | 
				
			||||||
 | 
					make src/tools/linux/dump_syms/dump_syms 
 | 
				
			||||||
 | 
					make src/client/linux/libbreakpad_client.a
 | 
				
			||||||
 | 
					make src/libbreakpad.a src/third_party/libdisasm/libdisasm.a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					the make commands just have to point towards /home/gameservers/automate/sourcemod_2023_accelerator/extensions/sm-ext-accelerator/extension/breakpad/src/src directory
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					step 3:
 | 
				
			||||||
 | 
					directory: /home/gameservers/automate/sourcemod_2023_accelerator/extensions/sm-ext-accelerator/extension
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export PATH=$PATH:$PWD/breakpad/build/src/tools/linux/dump_syms/
 | 
				
			||||||
 | 
					mkdir build && cd build
 | 
				
			||||||
 | 
					python ../../configure.py --enable-optimize
 | 
				
			||||||
 | 
					python ./build.py
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The only 3 files where you might have to edit environment variables should be:
 | 
				
			||||||
 | 
					AMBuildScript
 | 
				
			||||||
 | 
					extension/AMBuilder
 | 
				
			||||||
 | 
					test/AMBuilder
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -25,9 +25,9 @@ def BuildEverything():
 | 
				
			|||||||
        compiler['POSTLINKFLAGS'].append('-pthread')
 | 
					        compiler['POSTLINKFLAGS'].append('-pthread')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        compiler['CDEFINES'].append('HAVE_CONFIG_H')
 | 
					        compiler['CDEFINES'].append('HAVE_CONFIG_H')
 | 
				
			||||||
		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'breakpad', 'build', 'src'))
 | 
					        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'
 | 
					    name = 'accelerator.ext'
 | 
				
			||||||
    extension = AMBuild.AddJob(name)
 | 
					    extension = AMBuild.AddJob(name)
 | 
				
			||||||
@ -49,7 +49,7 @@ def BuildEverything():
 | 
				
			|||||||
    ])
 | 
					    ])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if AMBuild.target['platform'] in ['linux']:
 | 
					    if AMBuild.target['platform'] in ['linux']:
 | 
				
			||||||
		binary.AddSourceFiles(os.path.join('breakpad', 'src', 'src', 'common'), [
 | 
					        binary.AddSourceFiles(os.path.join('extension', 'breakpad', 'src', 'src', 'common'), [
 | 
				
			||||||
            'dwarf_cfi_to_module.cc',
 | 
					            'dwarf_cfi_to_module.cc',
 | 
				
			||||||
            'dwarf_cu_to_module.cc',
 | 
					            'dwarf_cu_to_module.cc',
 | 
				
			||||||
            'dwarf_line_to_module.cc',
 | 
					            'dwarf_line_to_module.cc',
 | 
				
			||||||
@ -71,9 +71,9 @@ def BuildEverything():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    if AMBuild.target['platform'] in ['linux']:
 | 
					    if AMBuild.target['platform'] in ['linux']:
 | 
				
			||||||
        libs = [
 | 
					        libs = [
 | 
				
			||||||
			('libbreakpad_client.a', os.path.join('breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')),
 | 
					            ('libbreakpad_client.a', os.path.join('extension', 'breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')),
 | 
				
			||||||
			('libbreakpad.a', os.path.join('breakpad', 'build', 'src', 'libbreakpad.a')),
 | 
					            ('libbreakpad.a', os.path.join('extension', 'breakpad', 'build', 'src', 'libbreakpad.a')),
 | 
				
			||||||
			('libdisasm.a', os.path.join('breakpad', 'build', 'src', 'third_party', 'libdisasm', 'libdisasm.a')),
 | 
					            ('libdisasm.a', os.path.join('extension', 'breakpad', 'build', 'src', 'third_party', 'libdisasm', 'libdisasm.a')),
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for lib, target in libs:
 | 
					        for lib, target in libs:
 | 
				
			||||||
 | 
				
			|||||||
@ -17,12 +17,12 @@ def BuildEverything():
 | 
				
			|||||||
		compiler['POSTLINKFLAGS'].append('-pthread')
 | 
							compiler['POSTLINKFLAGS'].append('-pthread')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		compiler['CDEFINES'].append('HAVE_CONFIG_H')
 | 
							compiler['CDEFINES'].append('HAVE_CONFIG_H')
 | 
				
			||||||
		compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'breakpad', 'build', 'src'))
 | 
							compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'extension', 'breakpad', 'build', 'src'))
 | 
				
			||||||
	elif compiler.cc.name == 'msvc':
 | 
						elif compiler.cc.name == 'msvc':
 | 
				
			||||||
		compiler['POSTLINKFLAGS'].remove('/SUBSYSTEM:WINDOWS')
 | 
							compiler['POSTLINKFLAGS'].remove('/SUBSYSTEM:WINDOWS')
 | 
				
			||||||
		compiler['POSTLINKFLAGS'].append('/SUBSYSTEM:CONSOLE')
 | 
							compiler['POSTLINKFLAGS'].append('/SUBSYSTEM:CONSOLE')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src'))
 | 
						compiler['CXXINCLUDES'].append(os.path.join(AMBuild.sourceFolder, 'extension', 'breakpad', 'src', 'src'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	name = 'test-crash-dump-generation'
 | 
						name = 'test-crash-dump-generation'
 | 
				
			||||||
	extension = AMBuild.AddJob(name)
 | 
						extension = AMBuild.AddJob(name)
 | 
				
			||||||
@ -33,7 +33,7 @@ def BuildEverything():
 | 
				
			|||||||
	]);
 | 
						]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if AMBuild.target['platform'] in ['linux']:
 | 
						if AMBuild.target['platform'] in ['linux']:
 | 
				
			||||||
		binary.AddSourceFiles(os.path.join('breakpad', 'src', 'src', 'common'), [
 | 
							binary.AddSourceFiles(os.path.join('extension', 'breakpad', 'src', 'src', 'common'), [
 | 
				
			||||||
			'dwarf_cfi_to_module.cc',
 | 
								'dwarf_cfi_to_module.cc',
 | 
				
			||||||
			'dwarf_cu_to_module.cc',
 | 
								'dwarf_cu_to_module.cc',
 | 
				
			||||||
			'dwarf_line_to_module.cc',
 | 
								'dwarf_line_to_module.cc',
 | 
				
			||||||
@ -55,9 +55,9 @@ def BuildEverything():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	if AMBuild.target['platform'] in ['linux']:
 | 
						if AMBuild.target['platform'] in ['linux']:
 | 
				
			||||||
		libs = [
 | 
							libs = [
 | 
				
			||||||
			('libbreakpad_client.a', os.path.join('breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')),
 | 
								('libbreakpad_client.a', os.path.join('extension', 'breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')),
 | 
				
			||||||
			('libbreakpad.a', os.path.join('breakpad', 'build', 'src', 'libbreakpad.a')),
 | 
								('libbreakpad.a', os.path.join('extension', 'breakpad', 'build', 'src', 'libbreakpad.a')),
 | 
				
			||||||
			('libdisasm.a', os.path.join('breakpad', 'build', 'src', 'third_party', 'libdisasm', 'libdisasm.a')),
 | 
								('libdisasm.a', os.path.join('extension', 'breakpad', 'build', 'src', 'third_party', 'libdisasm', 'libdisasm.a')),
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		for lib, target in libs:
 | 
							for lib, target in libs:
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user