Beispiel #1
0
def _patch_map_tools_core(patches, root):
	for title, patch_file in patches.items():
		patch_set = patch.fromfile(patch_file)
		if not patch_set.apply(root=root):
			die(
				f'Patch "{patch_file.name}" failed (try cleaning the '
				'giants/Quake-Tools submodule)')
Beispiel #2
0
def compile_gamecode():
	try:
		os.chdir(Build.dir_qc)
	except:  # noqa E727
		die("can't change to QuakeC directory: " + Build.dir_qc)
	make_gamecode('progs.src')
	make_gamecode('spprogs.src')
Beispiel #3
0
def compile_zqcc_windows():  # FIXME DRY
	path = Build.dir_make_zqcc
	try:
		os.chdir(path)
	except:  # noqa E727
		die("can't change directory to: " + path)
	try_to_run(
		['msbuild', 'zqcc.sln', '/p:Configuration=Release', '/p:Platform=Win32'],
		'ZQCC compilation')
Beispiel #4
0
def compile_zquake_windows():
	path = Build.dir_zquake_source
	try:
		os.chdir(path)
	except:  # noqa E727
		die("can't change directory to: " + path)
	try_to_run(
		['msbuild', 'zquake.sln', '/p:Configuration=GLRelease', '/p:Platform=Win32'],
		'ZQuake compilation')
Beispiel #5
0
def compile_map_tools_windows():  # FIXME DRY
	for prog in ['qbsp', 'vis', 'light', 'bspinfo']:
		path = os.path.join(Build.dir_qutils, prog)
		try:
			os.chdir(path)
		except:  # noqa E727
			die("can't change directory to: " + path)
		try_to_run([
			'nmake',
			'/f', prog + '.mak',
			'CFG=' + prog + ' - Win32 Release'],
			prog + ' compilation')
Beispiel #6
0
def run_pyinstaller():
    # TODO DRY all these chdirs
    path = Path(__file__).parent
    try:
        chdir(path)
    except:  # noqa E727
        die("can't change directory to: " + path)

    for spec in ['AudioQuake.spec', 'rcon.spec']:
        print('Running PyInstaller on ' + spec)
        try_to_run(('pyinstaller', '-y', spec),
                   'failed to run PyInstaller on ' + spec)