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