mirror of
https://github.com/xenia-project/xenia.git
synced 2026-01-01 14:20:13 +01:00
Add .py file extension to Python
This commit is contained in:
parent
03c0e70f8b
commit
4a5f63650d
10
.github/workflows/Linux_build.yml
vendored
10
.github/workflows/Linux_build.yml
vendored
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
sudo apt-get -y update
|
||||
sudo apt-get -y install clang-format-$LLVM_VERSION
|
||||
- name: Lint
|
||||
run: ./xenia-build lint --all
|
||||
run: ./xenia-build.py lint --all
|
||||
|
||||
build-clang:
|
||||
name: Build (Clang ${{ matrix.LLVM_VERSION }})
|
||||
|
|
@ -85,12 +85,12 @@ jobs:
|
|||
sudo apt-add-repository "deb http://apt.llvm.org/${UBUNTU_BASE}/ llvm-toolchain-${UBUNTU_BASE}-${{ matrix.LLVM_VERSION }} main"
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-xcb-dev clang-${{ matrix.LLVM_VERSION }} ninja-build
|
||||
./xenia-build setup
|
||||
./xenia-build.py setup
|
||||
- name: Build
|
||||
env:
|
||||
CC: clang-${{ matrix.LLVM_VERSION }}
|
||||
CXX: clang++-${{ matrix.LLVM_VERSION }}
|
||||
run: ./xenia-build build --config=Release
|
||||
run: ./xenia-build.py build --config=Release
|
||||
- name: Prepare artifacts
|
||||
id: prepare_artifacts
|
||||
run: |
|
||||
|
|
@ -123,13 +123,13 @@ jobs:
|
|||
# run: |
|
||||
# sudo apt-get -y update
|
||||
# sudo apt-get -y install mesa-vulkan-drivers valgrind libc++-dev libc++abi-dev libgtk-3-dev libsdl2-dev libvulkan-dev libx11-xcb-dev g++-${{ matrix.GCC_VERSION }}
|
||||
# ./xenia-build setup
|
||||
# ./xenia-build.py setup
|
||||
# - name: Build
|
||||
# env:
|
||||
# CC: gcc-${{ matrix.GCC_VERSION }}
|
||||
# CXX: g++-${{ matrix.GCC_VERSION }}
|
||||
# # AR: ar
|
||||
# run: ./xenia-build build --config=Release
|
||||
# run: ./xenia-build.py build --config=Release
|
||||
# - name: Prepare artifacts
|
||||
# id: prepare_artifacts
|
||||
# run: |
|
||||
|
|
|
|||
6
.github/workflows/Windows_build.yml
vendored
6
.github/workflows/Windows_build.yml
vendored
|
|
@ -56,7 +56,7 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@main
|
||||
- name: Lint
|
||||
run: .\xb lint --all
|
||||
run: .\xenia-build.py lint --all
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
|
@ -69,9 +69,9 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup
|
||||
run: .\xb setup
|
||||
run: .\xenia-build.py setup
|
||||
- name: Build
|
||||
run: .\xb build --no_premake --config=Release --target=src\xenia-app
|
||||
run: .\xenia-build.py build --no_premake --config=Release --target=src\xenia-app
|
||||
- name: Prepare artifacts
|
||||
id: prepare_artifacts
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
|
||||
// This code was autogenerated by ./tools/ppc-table-gen.py. Do not modify!
|
||||
// clang-format off
|
||||
#ifndef XENIA_CPU_PPC_PPC_OPCODE_H_
|
||||
#define XENIA_CPU_PPC_PPC_OPCODE_H_
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
|
||||
// This code was autogenerated by ./tools/ppc-table-gen.py. Do not modify!
|
||||
// clang-format off
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
|
@ -5407,7 +5407,7 @@ static constexpr PPCOpcodeDisasmInfo ppc_opcode_disasm_table[] = {
|
|||
INSTRUCTION(0x7c000278, "xorx" , kX , kI, kGeneral, "XOR" , (PPCOpcodeField::kRS,PPCOpcodeField::kRB), (PPCOpcodeField::kRA,PPCOpcodeField::kCRcond), PrintDisasm_xorx),
|
||||
};
|
||||
#undef INSTRUCTION
|
||||
static_assert(sizeof(ppc_opcode_disasm_table) / sizeof(PPCOpcodeDisasmInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen");
|
||||
static_assert(sizeof(ppc_opcode_disasm_table) / sizeof(PPCOpcodeDisasmInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen.py");
|
||||
|
||||
const PPCOpcodeDisasmInfo& GetOpcodeDisasmInfo(PPCOpcode opcode) {
|
||||
return ppc_opcode_disasm_table[static_cast<int>(opcode)];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
|
||||
// This code was autogenerated by ./tools/ppc-table-gen.py. Do not modify!
|
||||
// clang-format off
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// This code was autogenerated by ./tools/ppc-table-gen. Do not modify!
|
||||
// This code was autogenerated by ./tools/ppc-table-gen.py. Do not modify!
|
||||
// clang-format off
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
|
|
@ -471,7 +471,7 @@ PPCOpcodeInfo ppc_opcode_table[] = {
|
|||
INSTRUCTION(0x7c000278, "xorx" , kX , kI, kGeneral),
|
||||
};
|
||||
#undef INSTRUCTION
|
||||
static_assert(sizeof(ppc_opcode_table) / sizeof(PPCOpcodeInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen");
|
||||
static_assert(sizeof(ppc_opcode_table) / sizeof(PPCOpcodeInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen.py");
|
||||
|
||||
const PPCOpcodeInfo& GetOpcodeInfo(PPCOpcode opcode) {
|
||||
return ppc_opcode_table[static_cast<int>(opcode)];
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@ runner.
|
|||
|
||||
Each test is structured as a source `[name].s` PPC assembly file and the
|
||||
generated outputs. The outputs are made using the custom build of binutils
|
||||
setup when `xenia-build gentests` is called and are checked in to make it easier
|
||||
setup when `xb gentests` is called and are checked in to make it easier
|
||||
to run the tests on Windows.
|
||||
|
||||
Tests are run using the `xenia-test` app or via `xenia-build test`.
|
||||
Tests are run using the `xenia-test` app or via `xb test`.
|
||||
|
||||
## Execution
|
||||
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ def setup_premake_path_override():
|
|||
# its repository.
|
||||
# On Termux, the home directory is in the internal storage - use it for
|
||||
# executing.
|
||||
# If xenia-build doesn't have execute permissions, Xenia is in the external
|
||||
# If xenia-build.py doesn't have execute permissions, Xenia is in the external
|
||||
# storage now.
|
||||
try:
|
||||
popen = subprocess.Popen(
|
||||
['uname', '-o'], stdout=subprocess.PIPE, stderr=subprocess.DEVNULL,
|
||||
universal_newlines=True)
|
||||
if popen.communicate()[0] == 'Android\n':
|
||||
xb_file = os.path.join(root_path, 'xenia-build')
|
||||
xb_file = os.path.join(root_path, 'xenia-build.py')
|
||||
if (os.path.isfile(xb_file) and not os.access(xb_file, os.X_OK) and
|
||||
'HOME' in os.environ):
|
||||
premake_path = os.path.join(
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2015 Ben Vanik. All Rights Reserved.
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ def main():
|
|||
return
|
||||
|
||||
# Setup main argument parser and common arguments.
|
||||
parser = argparse.ArgumentParser(prog='gpu-trace-diff',
|
||||
parser = argparse.ArgumentParser(prog='gpu-trace-diff.py',
|
||||
description='Run and diff GPU traces.')
|
||||
parser.add_argument(
|
||||
'-x', '--executable',
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright 2015 Ben Vanik & shuffle2. All Rights Reserved.
|
||||
|
||||
|
|
@ -217,7 +217,7 @@ def generate_table(insns):
|
|||
for i in insns:
|
||||
w1(fmt % (i.opcode, i.mnem, i.form, i.group, i.type))
|
||||
w0('};')
|
||||
w0('static_assert(sizeof(ppc_opcode_table) / sizeof(PPCOpcodeInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen");')
|
||||
w0('static_assert(sizeof(ppc_opcode_table) / sizeof(PPCOpcodeInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen.py");')
|
||||
w0('')
|
||||
w0('const PPCOpcodeInfo& GetOpcodeInfo(PPCOpcode opcode) {')
|
||||
w1('return ppc_opcode_table[static_cast<int>(opcode)];')
|
||||
|
|
@ -379,7 +379,7 @@ def generate_disasm(insns):
|
|||
('PrintDisasm_' + literal_mnem(i.mnem)) if i.disasm_str else 'nullptr',
|
||||
))
|
||||
w0('};')
|
||||
w0('static_assert(sizeof(ppc_opcode_disasm_table) / sizeof(PPCOpcodeDisasmInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen");')
|
||||
w0('static_assert(sizeof(ppc_opcode_disasm_table) / sizeof(PPCOpcodeDisasmInfo) == static_cast<int>(PPCOpcode::kInvalid), "PPC table mismatch - rerun ppc-table-gen.py");')
|
||||
w0('')
|
||||
w0('const PPCOpcodeDisasmInfo& GetOpcodeDisasmInfo(PPCOpcode opcode) {')
|
||||
w1('return ppc_opcode_disasm_table[static_cast<int>(opcode)];')
|
||||
6
xb.bat
6
xb.bat
|
|
@ -1,5 +1,5 @@
|
|||
@ECHO OFF
|
||||
REM Copyright 2022 Ben Vanik. All Rights Reserved.
|
||||
REM Copyright 2025 Ben Vanik. All Rights Reserved.
|
||||
|
||||
SET "DIR=%~dp0"
|
||||
|
||||
|
|
@ -17,10 +17,10 @@ IF %_RESULT% NEQ 0 (
|
|||
|
||||
|
||||
REM ============================================================================
|
||||
REM Trampoline into xenia-build
|
||||
REM Trampoline into xenia-build.py
|
||||
REM ============================================================================
|
||||
|
||||
"%PYTHON_EXE%" "%DIR%\xenia-build" %*
|
||||
"%PYTHON_EXE%" "%DIR%\xenia-build.py" %*
|
||||
EXIT /b %ERRORLEVEL%
|
||||
|
||||
|
||||
|
|
|
|||
2
xb.ps1
2
xb.ps1
|
|
@ -12,4 +12,4 @@ if (!$pythonPath) {
|
|||
Throw "ERROR: Python 3.9+ 64-bit must be installed and on PATH:`nhttps://www.python.org/"
|
||||
}
|
||||
|
||||
& $pythonPath "$($PSScriptRoot)/xenia-build" $args
|
||||
& $pythonPath "$($PSScriptRoot)/xenia-build.py" $args
|
||||
|
|
|
|||
6
xenia-build → xenia-build.py
Executable file → Normal file
6
xenia-build → xenia-build.py
Executable file → Normal file
|
|
@ -151,7 +151,7 @@ def main():
|
|||
f"https://github.com/xenia-canary/xenia-canary/blob/{default_branch}/docs/building.md")
|
||||
|
||||
# Setup main argument parser and common arguments.
|
||||
parser = ArgumentParser(prog="xenia-build")
|
||||
parser = ArgumentParser(prog="xenia-build.py")
|
||||
|
||||
# Grab all commands and populate the argument parser for each.
|
||||
subparsers = parser.add_subparsers(title="subcommands",
|
||||
|
|
@ -504,7 +504,7 @@ def run_premake(target_os, action, cc=None):
|
|||
"""
|
||||
args = [
|
||||
sys.executable,
|
||||
os.path.join("tools", "build", "premake"),
|
||||
os.path.join("tools", "build", "premake.py"),
|
||||
"--file=premake5.lua",
|
||||
f"--os={target_os}",
|
||||
#"--test-suite-mode=combined",
|
||||
|
|
@ -1386,7 +1386,7 @@ class GpuTestCommand(BaseBuildCommand):
|
|||
any_failed = False
|
||||
result = shell_call([
|
||||
sys.executable,
|
||||
os.path.join(self_path, "tools", "gpu-trace-diff"),
|
||||
os.path.join(self_path, "tools", "gpu-trace-diff.py"),
|
||||
f"--executable={test_executables[0]}",
|
||||
f"--trace_path={os.path.join(reference_trace_root, 'traces')}",
|
||||
f"--output_path={output_path}",
|
||||
Loading…
Reference in a new issue