Skip to content

Commit

Permalink
Merge branch 'develop' into pr/458
Browse files Browse the repository at this point in the history
  • Loading branch information
jnackmclain committed Oct 31, 2023
2 parents c246c18 + 3078eee commit 809997e
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 29 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ jobs:
run: |
echo "GITHUB_SHA_SHORT=$(echo $GITHUB_SHA | cut -c 1-7)" >> $GITHUB_ENV
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Print build info
- name: Pull commit hash for locale
run: |
echo $GITHUB_SHA_SHORT
python dependencies/dev_scripts/add_devbuild.py $GITHUB_SHA_SHORT
python dependencies/dev_scripts/add_devbuild.py
- name: Build ARK
run: |
dependencies/python/configure_build.py xbox
Expand All @@ -66,10 +65,10 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Print build info
- name: Pull commit hash for locale
run: |
$GITHUB_SHA_SHORT="$(git rev-parse --short HEAD)".ToUpper()
python dependencies/dev_scripts/add_devbuild.py $GITHUB_SHA_SHORT
python dependencies/dev_scripts/add_devbuild.py
- name: Build ARK
run: |
python dependencies/python/configure_build.py ps3
Expand Down
5 changes: 5 additions & 0 deletions _ark/dx/locale/dx_locale_credits.dta
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"A MILOHAX TEAM PROJECT")
()
()
(heading2
"PROJECT LEAD")
(title_name
""
"jnack")
(heading2
"CONTRIBUTORS")
(title_name
Expand Down
2 changes: 2 additions & 0 deletions _ark/dx/locale/dx_locale_sources.dta
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
(ham3 "Dance Central 3")

; Third-Party games
(jamband "Jam Band")
(jd1 "Just Dance")
(jd2 "Just Dance 2")
(jd3 "Just Dance 3")
Expand Down Expand Up @@ -212,6 +213,7 @@
(helvian "helvianalects")
(thehero "The Hero")
(french "HexaNation")
(iasg14 "IaSg14's Charts")
(igniter "Igniter")
(indoproject "I'M INDONESIA")
(imetal "Instru-Metal")
Expand Down
8 changes: 4 additions & 4 deletions _ark/dx/locale/dx_version.dta
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(message_motd "Rock Band 3 Deluxe v1.0b Release Loaded! Thanks for playing!")
(message_motd_signin "Rock Band 3 Deluxe v1.0b Release Loaded! Thanks for playing!")
(message_motd_noconnection "Rock Band 3 Deluxe v1.0b Release Loaded! Thanks for playing!")
(rb3e_mod_string "RB3DX v1.0b Release")
(message_motd "Rock Band 3 Deluxe v1.0b (devbuild) Loaded! Thanks for playing!")
(message_motd_signin "Rock Band 3 Deluxe v1.0b (devbuild) Loaded! Thanks for playing!")
(message_motd_noconnection "Rock Band 3 Deluxe v1.0b (devbuild) Loaded! Thanks for playing!")
(rb3e_mod_string "RB3DX v1.0b (devbuild)")
1 change: 1 addition & 0 deletions _ark/ui/splash/splash.dta
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
{{{{sv8_panel find sv8_a} find cityscape_ao} find logo.tex} set_bitmap "dx/custom_textures/_additional_textures/rb3dx_logo.png"}
#endif
{rb3.lbl set_showing TRUE} ; dx - this is an unused label i found, we're using it to print version info
{rb3.lbl set caps_mode kCapsModeNone} ; dx - make label lowercase
{rb3.lbl set_token_fmt rb3e_mod_string} ; dx - show version info
{rb3.lbl set_local_scale 0.35 0.35 0.35} {rb3.lbl set_local_pos 225 0 -175} ; dx - set the size and position of the version info
{loading.grp set_showing FALSE}
Expand Down
39 changes: 19 additions & 20 deletions dependencies/dev_scripts/add_devbuild.py
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
# add_devbuild.py
from pathlib import Path
import subprocess
import sys

def main():
if len(sys.argv) != 2:
print("no devbuild provided")
else:
commit = sys.argv[1]
print(f"Commit: {commit}")
# get the current working directory (where this script resides)
cwd = Path().absolute()
# get the root directory of the repo
root_dir = Path(__file__).parents[2]
print(root_dir)
# sed -i -e "s/devbuild/"$GITHUB_SHA_SHORT"/g" _ark/ui/locale/locale_dx_keep.dta
for locale in root_dir.joinpath("_ark/dx/locale").glob("dx_version.dta"):
print(locale)
with open(locale, "r", encoding="ISO-8859=1") as f:
the_locale = [line for line in f.readlines()]
# get the current working directory (where this script resides)
cwd = Path().absolute()
# get the root directory of the repo
root_dir = Path(__file__).parents[2]
#print(root_dir)
# sed -i -e "s/devbuild/"$GITHUB_SHA_SHORT"/g" _ark/ui/locale/locale_dx_keep.dta
commit = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"],text=True).strip("\n")
print(f"Commit: {commit}\n")
print("Injecting devbuild into locale...\n")

for i in range(len(the_locale)):
if "devbuild" in the_locale[i]:
the_locale[i] = the_locale[i].replace("devbuild", f"{commit}")
for locale in root_dir.joinpath("_ark/dx/locale").glob("dx_version.dta"):
#print(locale)
with open(locale, "r", encoding="ISO-8859=1") as f:
the_locale = [line for line in f.readlines()]

with open(locale, "w", encoding="ISO-8859=1") as ff:
ff.writelines(the_locale)
for i in range(len(the_locale)):
if "devbuild" in the_locale[i]:
the_locale[i] = the_locale[i].replace("devbuild", f"{commit}")

with open(locale, "w", encoding="ISO-8859=1") as ff:
ff.writelines(the_locale)

if __name__ == "__main__":
main()
28 changes: 28 additions & 0 deletions dependencies/dev_scripts/remove_devbuild.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# add_devbuild.py
from pathlib import Path
import subprocess
import sys

def main():
# get the current working directory (where this script resides)
cwd = Path().absolute()
# get the root directory of the repo
root_dir = Path(__file__).parents[2]
#print(root_dir)
# sed -i -e "s/devbuild/"$GITHUB_SHA_SHORT"/g" _ark/ui/locale/locale_dx_keep.dta
commit = subprocess.check_output(["git", "rev-parse", "--short", "HEAD"],text=True).strip("\n")
print("Resetting devbuild in locale...\n")
for locale in root_dir.joinpath("_ark/dx/locale").glob("dx_version.dta"):
#print(locale)
with open(locale, "r", encoding="ISO-8859=1") as f:
the_locale = [line for line in f.readlines()]

for i in range(len(the_locale)):
if f"{commit}" in the_locale[i]:
the_locale[i] = the_locale[i].replace(f"{commit}", "devbuild")

with open(locale, "w", encoding="ISO-8859=1") as ff:
ff.writelines(the_locale)

if __name__ == "__main__":
main()
2 changes: 2 additions & 0 deletions scripts/build_ps3.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ cd "%~dp0.."
echo Deleting old PS3 DTBs, if present...
del >nul 2>&1 /s /q obj\ps3\*.dtb
echo.
python dependencies\dev_scripts\add_devbuild.py
python dependencies\python\configure_build.py ps3
dependencies\windows\ninja
python dependencies\dev_scripts\remove_devbuild.py
PAUSE
2 changes: 2 additions & 0 deletions scripts/build_xbox.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ cd "%~dp0.."
echo Deleting old Xbox DTBs, if present...
del >nul 2>&1 /s /q obj\xbox\*.dtb
echo.
python dependencies\dev_scripts\add_devbuild.py
python dependencies\python\configure_build.py xbox
dependencies\windows\ninja
python dependencies\dev_scripts\remove_devbuild.py
PAUSE

0 comments on commit 809997e

Please sign in to comment.