mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-24 07:53:30 +08:00
added linux prefab builds
This commit is contained in:
parent
66693c11d1
commit
85df97b4b7
33
Makefile
33
Makefile
@ -121,7 +121,7 @@ cleanlist:
|
||||
# Prebuilt binaries for various platforms.
|
||||
|
||||
# Download/assemble/run a debug build for this platform.
|
||||
prefab:
|
||||
prefab-debug:
|
||||
@tools/snippets make_prefab debug
|
||||
|
||||
# Download/assemble/run a release build for this platform.
|
||||
@ -129,7 +129,7 @@ prefab-release:
|
||||
@tools/snippets make_prefab release
|
||||
|
||||
# Download/assemble a debug build for this platform.
|
||||
prefab-build:
|
||||
prefab-debug-build:
|
||||
@tools/snippets make_prefab debug-build
|
||||
|
||||
# Download/assemble a release build for this platform.
|
||||
@ -138,10 +138,10 @@ prefab-release-build:
|
||||
|
||||
# Specific platform prefab targets:
|
||||
|
||||
prefab-mac: prefab-mac-build
|
||||
prefab-mac-debug: prefab-mac-build
|
||||
@cd build/prefab/mac/debug && ./ballisticacore
|
||||
|
||||
prefab-mac-build: assets-cmake build/prefab/mac/debug/ballisticacore
|
||||
prefab-mac-debug-build: assets-cmake build/prefab/mac/debug/ballisticacore
|
||||
@${STAGE_ASSETS} -cmake build/prefab/mac/debug
|
||||
|
||||
build/prefab/mac/debug/ballisticacore: .efrocachemap
|
||||
@ -156,8 +156,31 @@ prefab-mac-release-build: assets-cmake build/prefab/mac/release/ballisticacore
|
||||
build/prefab/mac/release/ballisticacore: .efrocachemap
|
||||
@tools/snippets efrocache_get $@
|
||||
|
||||
PREFAB_LINUX_FLAVOR ?= linux64-u19s
|
||||
|
||||
prefab-linux-debug: prefab-linux-build
|
||||
@cd build/prefab/linux/debug && ./ballisticacore
|
||||
|
||||
prefab-linux-debug-build: assets-cmake build/prefab/linux/debug/ballisticacore
|
||||
@${STAGE_ASSETS} -cmake build/prefab/linux/debug
|
||||
|
||||
build/prefab/linux/debug/ballisticacore: .efrocachemap
|
||||
@tools/snippets efrocache_get $@
|
||||
|
||||
prefab-linux-release: prefab-linux-release-build
|
||||
@cd build/prefab/linux/release && ./ballisticacore
|
||||
|
||||
prefab-linux-release-build: assets-cmake \
|
||||
build/prefab/linux/release/ballisticacore
|
||||
@${STAGE_ASSETS} -cmake build/prefab/linux/release
|
||||
|
||||
build/prefab/linux/release/ballisticacore: .efrocachemap
|
||||
@tools/snippets efrocache_get $@
|
||||
|
||||
# Tell make which of these targets don't represent files.
|
||||
.PHONY: prefab-mac prefab-mac-build prefab-mac-release prefab-mac-release-build
|
||||
.PHONY: prefab-mac prefab-mac-build prefab-mac-release \
|
||||
prefab-mac-release-build prefab-linux prefab-linux-build prefab-linux-release \
|
||||
prefab-linux-release-build\
|
||||
|
||||
|
||||
################################################################################
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
# -----------------------------------------------------------------------------
|
||||
"""A dummy stub module for the real _bs.
|
||||
"""A dummy stub module for the real _ba.
|
||||
|
||||
The real _bs is a compiled extension module and only available
|
||||
The real _ba is a compiled extension module and only available
|
||||
in the live game. This dummy module allows Pylint/Mypy/etc. to
|
||||
function reasonably well outside of the game.
|
||||
|
||||
|
||||
@ -212,7 +212,7 @@ class DirectoryScan:
|
||||
|
||||
def _process_module_meta_tags(self, subpath: pathlib.Path,
|
||||
flines: List[str],
|
||||
meta_lines: Dict[int, str]) -> None:
|
||||
meta_lines: Dict[int, List[str]]) -> None:
|
||||
"""Pull data from a module based on its bs_meta tags."""
|
||||
for lindex, mline in meta_lines.items():
|
||||
# meta_lines is just anything containing 'bs_meta'; make sure
|
||||
@ -278,7 +278,7 @@ class DirectoryScan:
|
||||
return classname
|
||||
|
||||
def get_api_requirement(self, subpath: pathlib.Path,
|
||||
meta_lines: Dict[int, str],
|
||||
meta_lines: Dict[int, List[str]],
|
||||
toplevel: bool) -> Optional[int]:
|
||||
"""Return an API requirement integer or None if none present.
|
||||
|
||||
|
||||
@ -124,14 +124,12 @@ def _trim_docstring(docstring: str) -> str:
|
||||
return '\n'.join(trimmed)
|
||||
|
||||
|
||||
def spelling() -> None:
|
||||
"""Add words to the PyCharm dictionary."""
|
||||
def _spelling(words: List[str]) -> None:
|
||||
fname = '.idea/dictionaries/ericf.xml'
|
||||
with open(fname) as infile:
|
||||
lines = infile.read().splitlines()
|
||||
if lines[2] != ' <words>':
|
||||
raise RuntimeError('Unexpected dictionary format.')
|
||||
words = sys.argv[2:]
|
||||
added_count = 0
|
||||
for word in words:
|
||||
line = f' <w>{word.lower()}</w>'
|
||||
@ -146,6 +144,28 @@ def spelling() -> None:
|
||||
print('Added', added_count, 'words to the dictionary.')
|
||||
|
||||
|
||||
def spelling_all() -> None:
|
||||
"""Add all misspellings from a pycharscripts run."""
|
||||
|
||||
print('Running "make pycharmscriptsfull"...')
|
||||
lines = [
|
||||
line for line in subprocess.run(
|
||||
['make', 'pycharmscriptsfull'], check=False,
|
||||
capture_output=True).stdout.decode().splitlines()
|
||||
if 'Typo: In word' in line
|
||||
]
|
||||
words = [
|
||||
line.split('Typo: In word')[1].strip().replace("'", "")
|
||||
for line in lines
|
||||
]
|
||||
_spelling(words)
|
||||
|
||||
|
||||
def spelling() -> None:
|
||||
"""Add words to the PyCharm dictionary."""
|
||||
_spelling(sys.argv[2:])
|
||||
|
||||
|
||||
def check_clean_safety() -> None:
|
||||
"""Ensure all files are are added to git or in gitignore.
|
||||
|
||||
@ -380,14 +400,12 @@ def compile_python_files() -> None:
|
||||
"""
|
||||
import py_compile
|
||||
for arg in sys.argv[2:]:
|
||||
# Hmm; seems mypy doesn't know about invalidation_mode yet.
|
||||
mode = py_compile.PycInvalidationMode.UNCHECKED_HASH # type: ignore
|
||||
py_compile.compile( # type: ignore
|
||||
arg,
|
||||
dfile=os.path.basename(arg),
|
||||
doraise=True,
|
||||
optimize=1,
|
||||
invalidation_mode=mode)
|
||||
mode = py_compile.PycInvalidationMode.UNCHECKED_HASH
|
||||
py_compile.compile(arg,
|
||||
dfile=os.path.basename(arg),
|
||||
doraise=True,
|
||||
optimize=1,
|
||||
invalidation_mode=mode)
|
||||
|
||||
|
||||
def makefile_target_list() -> None:
|
||||
|
||||
@ -45,7 +45,7 @@ from efrotools.snippets import ( # pylint: disable=unused-import
|
||||
PROJROOT, snippets_main, formatcode, formatscripts, formatmakefile,
|
||||
cpplintcode, pylintscripts, mypyscripts, tool_config_install, sync,
|
||||
sync_all, scriptfiles, pycharmscripts, clioncode, androidstudiocode,
|
||||
makefile_target_list, spelling, compile_python_files)
|
||||
makefile_target_list, spelling, spelling_all, compile_python_files)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from typing import Optional, List
|
||||
@ -55,17 +55,17 @@ if TYPE_CHECKING:
|
||||
# clustering similar tests too much)
|
||||
SPARSE_TESTS: List[List[str]] = [
|
||||
['ios.pylibs.debug', 'android.pylibs.arm'],
|
||||
['linux.package.64', 'android.pylibs.arm64'],
|
||||
['linux.package', 'android.pylibs.arm64'],
|
||||
['windows.package', 'mac.pylibs'],
|
||||
['tvos.pylibs', 'android.pylibs.x86'],
|
||||
['linux.package.server.64', 'android.pylibs.arm.debug'],
|
||||
['android.pylibs.arm.debug'],
|
||||
['windows.package.server'],
|
||||
['ios.pylibs', 'android.pylibs.arm64.debug'],
|
||||
['linux.package.server.32'],
|
||||
['linux.package.server'],
|
||||
['android.pylibs.x86.debug', 'mac.package'],
|
||||
['mac.package.server', 'android.pylibs.x86_64'],
|
||||
['windows.package.oculus'],
|
||||
['linux.package.32', 'android.pylibs.x86_64.debug'],
|
||||
['android.pylibs.x86_64.debug'],
|
||||
['mac.pylibs.debug', 'android.package'],
|
||||
]
|
||||
|
||||
@ -290,32 +290,22 @@ def gen_fulltest_buildfile_linux() -> None:
|
||||
"""
|
||||
import datetime
|
||||
|
||||
# Its a bit of a waste of time doing both 32 and 64 bit builds
|
||||
# for everything, so let's do one of each and alternate the architecture.
|
||||
dayoffset = datetime.datetime.now().timetuple().tm_yday
|
||||
|
||||
targets = ['build', 'server-build']
|
||||
lin32flav = 'LINUX32_FLAVOR=linux32-u16s'
|
||||
lin64flav = 'LINUX64_FLAVOR=linux64-u18s'
|
||||
linflav = 'LINUX_FLAVOR=linux64-u19s'
|
||||
lines = []
|
||||
for i, target in enumerate(targets):
|
||||
if (i + dayoffset) % 2 == 0:
|
||||
lines.append(f'{lin32flav} make linux32-{target}')
|
||||
else:
|
||||
lines.append(f'{lin64flav} make linux64-{target}')
|
||||
for target in targets:
|
||||
lines.append(f'{linflav} make linux-{target}')
|
||||
|
||||
if DO_SPARSE_TESTS:
|
||||
extras = SPARSE_TESTS[dayoffset % len(SPARSE_TESTS)]
|
||||
extras = [e for e in extras if e.startswith('linux.')]
|
||||
for extra in extras:
|
||||
if extra == 'linux.package.32':
|
||||
lines.append(f'{lin32flav} make linux32-package')
|
||||
elif extra == 'linux.package.server.32':
|
||||
lines.append(f'{lin32flav} make linux32-server-package')
|
||||
elif extra == 'linux.package.64':
|
||||
lines.append(f'{lin64flav} make linux64-package')
|
||||
elif extra == 'linux.package.server.64':
|
||||
lines.append(f'{lin64flav} make linux64-server-package')
|
||||
if extra == 'linux.package':
|
||||
lines.append(f'{linflav} make linux-package')
|
||||
elif extra == 'linux.package.server':
|
||||
lines.append(f'{linflav} make linux-server-package')
|
||||
else:
|
||||
raise RuntimeError(f'Unknown extra: {extra}')
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user