Skip to content

Commit

Permalink
Add mwcceppc 1.3.2r & update AC preset (#810)
Browse files Browse the repository at this point in the history
* Implement GC 1.3.2r changes properly

* Remove shutil.rmtree, fix formatting

* Add missing comma
  • Loading branch information
Cuyler36 authored Aug 6, 2023
1 parent 95df5dd commit aa8e3bd
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
34 changes: 34 additions & 0 deletions backend/compilers/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,6 +803,13 @@ def download_wii_gc():
},
}

single_compilers = {
"1.3.2r": [
"mwcc_242_81r",
"https://cdn.discordapp.com/attachments/598600200084258822/1136883349642825728/MWCCEPPC_1.3.2r.zip",
]
}

download_zip(
url="https://cdn.discordapp.com/attachments/727918646525165659/1129759991696457728/GC_WII_COMPILERS.zip"
)
Expand All @@ -828,6 +835,33 @@ def download_wii_gc():

shutil.rmtree(COMPILERS_DIR / group_id)

# copy single compilers over
for ver, info in single_compilers.items():
compiler_id = info[0]
url = info[1]

# download zip to COMPILERS_DIR
download_zip(url=url)

compiler_dir = COMPILERS_DIR / compiler_id

# move version dir to compiler dir
if not compiler_dir.exists():
shutil.move(COMPILERS_DIR / ver, compiler_dir)

# Rename dll to uppercase - WSL is case sensitive without wine
lowercase_lmgr = compiler_dir / "lmgr326b.dll"
if lowercase_lmgr.exists():
shutil.move(lowercase_lmgr, compiler_dir / "LMGR326B.dll")

lowercase_lmgr = compiler_dir / "lmgr8c.dll"
if lowercase_lmgr.exists():
shutil.move(lowercase_lmgr, compiler_dir / "LMGR8C.dll")

set_x(compiler_dir / "mwcceppc.exe")

(compiler_dir / "license.dat").touch()

# copy in clean 1.2.5 for frank
shutil.copy(
COMPILERS_DIR / "mwcc_233_163" / "mwcceppc.exe",
Expand Down
12 changes: 9 additions & 3 deletions backend/coreapp/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,12 @@ def preset_from_name(name: str) -> Optional[Preset]:
cc=MWCCEPPC_CC,
)

MWCC_242_81R = MWCCCompiler(
id="mwcc_242_81r",
platform=GC_WII,
cc=MWCCEPPC_CC,
)

MWCC_247_92 = MWCCCompiler(
id="mwcc_247_92",
platform=GC_WII,
Expand Down Expand Up @@ -1613,13 +1619,13 @@ def preset_from_name(name: str) -> Optional[Preset]:
),
Preset(
"Animal Crossing (REL)",
MWCC_242_81,
"-O4 -fp hard -sdata 0 -sdata2 0 -Cpp_exceptions off -pool off, -enum int",
MWCC_242_81R,
"-O4 -fp hard -sdata 0 -sdata2 0 -Cpp_exceptions off -enum int -sym on",
),
Preset(
"Animal Crossing (DOL)",
MWCC_242_81,
"-O4 -fp hard -sdata 8 -sdata2 8 -Cpp_exceptions off, -char unsigned, -enum int",
"-O4 -fp hard -sdata 8 -sdata2 8 -Cpp_exceptions off -char unsigned -enum int",
),
# NDS
Preset(
Expand Down
1 change: 1 addition & 0 deletions frontend/src/lib/i18n/locales/en/compilers.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
"mwcc_233_163e": "2.3.3 build 163 (GC MW 1.2.5e)",
"mwcc_233_163n": "2.3.3 build 163 (GC MW 1.2.5n)",
"mwcc_242_81": "2.4.2 build 81 (GC MW 1.3.2)",
"mwcc_242_81r": "2.4.2 build 81 (GC MW 1.3.2r)",
"mwcc_247_105": "2.4.7 build 105 (GC MW 2.5)",
"mwcc_247_107": "2.4.7 build 107 (GC MW 2.6)",
"mwcc_247_108": "2.4.7 build 108 (GC MW 2.7)",
Expand Down

0 comments on commit aa8e3bd

Please sign in to comment.