Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
HIllya51 committed Nov 2, 2024
1 parent 619c5f8 commit ea0bdf3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 23 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
path: src/build/${{ matrix.fname }}
build_cpp:
runs-on: windows-latest
strategy:
matrix:
arch: [32,64]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -44,10 +47,10 @@ jobs:
with:
sdk-version: 22621

- run: python src/build.py cpp
- run: python src/build.py cpp ${{ matrix.arch }}
- uses: actions/upload-artifact@v4
with:
name: cpp
name: cpp_${{ matrix.arch }}
path: src/plugins/builds


Expand Down
62 changes: 41 additions & 21 deletions src/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,23 +220,25 @@ def downLunaHook():
)


def buildPlugins():
def buildPlugins(arch):
os.chdir(rootDir + "\\plugins\\scripts")
subprocess.run("python fetchwebview2.py")
subprocess.run(
f'cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86 -DCMAKE_SYSTEM_VERSION=10.0.26621.0'
)
subprocess.run(
f"cmake --build ../build/x86 --config Release --target ALL_BUILD -j 14"
)
if arch == "32":
subprocess.run(
f'cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ../build/x86 -DCMAKE_SYSTEM_VERSION=10.0.26621.0'
)
subprocess.run(
f"cmake --build ../build/x86 --config Release --target ALL_BUILD -j 14"
)
# subprocess.run(f"python copytarget.py 1")
subprocess.run(
f'cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64 -DCMAKE_SYSTEM_VERSION=10.0.26621.0'
)
subprocess.run(
f"cmake --build ../build/x64 --config Release --target ALL_BUILD -j 14"
)
# subprocess.run(f"python copytarget.py 0")
else:
subprocess.run(
f'cmake ../CMakeLists.txt -G "Visual Studio 17 2022" -A x64 -T host=x64 -B ../build/x64 -DCMAKE_SYSTEM_VERSION=10.0.26621.0'
)
subprocess.run(
f"cmake --build ../build/x64 --config Release --target ALL_BUILD -j 14"
)
# subprocess.run(f"python copytarget.py 0")


def downloadsomething():
Expand All @@ -263,12 +265,12 @@ def downloadbass():

if __name__ == "__main__":
os.chdir(rootDir)
arch = sys.argv[2]
os.makedirs("temp", exist_ok=True)
if sys.argv[1] == "cpp":
installVCLTL()
buildPlugins()
buildPlugins(arch)
elif sys.argv[1] == "pyrt":
arch = sys.argv[2]
version = sys.argv[3]
if arch == "x86":
py37Path = (
Expand Down Expand Up @@ -298,15 +300,33 @@ def downloadbass():
downloadbass()
downLunaHook()
os.chdir(rootDir)
shutil.copytree(f'{rootDir}/../build/cpp', f'{rootDir}/plugins/builds',dirs_exist_ok=True)
shutil.copytree(
f"{rootDir}/../build/cpp_32",
f"{rootDir}/plugins/builds",
dirs_exist_ok=True,
)
shutil.copytree(
f"{rootDir}/../build/cpp_64",
f"{rootDir}/plugins/builds",
dirs_exist_ok=True,
)
os.chdir(rootDir + "\\plugins\\scripts")
subprocess.run(f"python copytarget.py 1")
subprocess.run(f"python copytarget.py 0")
shutil.copytree(f'{rootDir}/../build/LunaTranslator', f'{rootDir}/plugins/builds',dirs_exist_ok=True)
shutil.copytree(f'{rootDir}/../build/LunaTranslator_x86', f'{rootDir}/plugins/builds',dirs_exist_ok=True)
shutil.copytree(
f"{rootDir}/../build/LunaTranslator",
f"{rootDir}/plugins/builds",
dirs_exist_ok=True,
)
shutil.copytree(
f"{rootDir}/../build/LunaTranslator_x86",
f"{rootDir}/plugins/builds",
dirs_exist_ok=True,
)
os.chdir(rootDir)
for f in os.walk("."):
_dir, _, _fs = f
for _f in _fs:
print(os.path.abspath(os.path.join(_dir, _f)))
os.system('python collectall.py 32')
os.system('python collectall.py 64')
os.system("python collectall.py 32")
os.system("python collectall.py 64")

0 comments on commit ea0bdf3

Please sign in to comment.