Skip to content

Commit b60a253

Browse files
committed
Replace wine with wibo
1 parent 0763d5c commit b60a253

File tree

4 files changed

+15
-35
lines changed

4 files changed

+15
-35
lines changed

backend/coreapp/compiler_wrapper.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,6 @@ def lru_cache(maxsize: int = 128, typed: bool = False) -> Callable[[F], F]:
4949
else:
5050
PATH = os.environ["PATH"]
5151

52-
WINE: str
53-
if "microsoft" in uname().release.lower() and not settings.USE_SANDBOX_JAIL:
54-
logger.info("WSL detected & nsjail disabled: wine not required.")
55-
WINE = ""
56-
else:
57-
WINE = "wine"
58-
5952
WIBO: str
6053
if "microsoft" in uname().release.lower() and not settings.USE_SANDBOX_JAIL:
6154
logger.info("WSL detected & nsjail disabled: wibo not required.")
@@ -207,7 +200,6 @@ def compile_code(
207200
shell=True,
208201
env={
209202
"PATH": PATH,
210-
"WINE": WINE,
211203
"WIBO": WIBO,
212204
"INPUT": sandbox.rewrite_path(code_path),
213205
"OUTPUT": sandbox.rewrite_path(object_path),

backend/coreapp/compilers.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ class Compiler:
5959
is_gcc: ClassVar[bool] = False
6060
is_ido: ClassVar[bool] = False
6161
is_mwcc: ClassVar[bool] = False
62-
needs_wine = False
6362
language: Language = Language.C
6463

6564
@property
@@ -225,7 +224,7 @@ def preset_from_name(name: str) -> Optional[Preset]:
225224
cc='cc -E -I "${COMPILER_DIR}"/include -iquote include -nostdinc -undef "$INPUT" | "${COMPILER_DIR}"/bin/agbcp -quiet $COMPILER_FLAGS -o - | arm-none-eabi-as -mcpu=arm7tdmi -o "$OUTPUT"',
226225
)
227226
# N3DS
228-
ARMCC_CC = '${WINE} "${COMPILER_DIR}"/bin/armcc.exe -c --cpu=MPCore --fpmode=fast --apcs=/interwork -I "${COMPILER_DIR}"/include $COMPILER_FLAGS -o "${OUTPUT}" "${INPUT}"'
227+
ARMCC_CC = '${WIBO} "${COMPILER_DIR}"/bin/armcc.exe -c --cpu=MPCore --fpmode=fast --apcs=/interwork -I "${COMPILER_DIR}"/include $COMPILER_FLAGS -o "${OUTPUT}" "${INPUT}"'
229228

230229
ARMCC_40_771 = ArmccCompiler(
231230
id="armcc_40_771",
@@ -508,31 +507,31 @@ def preset_from_name(name: str) -> Optional[Preset]:
508507
EE_GCC2952_273A = GCCCompiler(
509508
id="ee-gcc2.95.2-273a",
510509
platform=PS2,
511-
cc='${WINE} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.2/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
510+
cc='${WIBO} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.2/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
512511
)
513512

514513
EE_GCC2952_274 = GCCCompiler(
515514
id="ee-gcc2.95.2-274",
516515
platform=PS2,
517-
cc='${WINE} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.2/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
516+
cc='${WIBO} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.2/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
518517
)
519518

520519
EE_GCC2953_107 = GCCCompiler(
521520
id="ee-gcc2.95.3-107",
522521
platform=PS2,
523-
cc='${WINE} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.3/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
522+
cc='${WIBO} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.3/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
524523
)
525524

526525
EE_GCC2953_114 = GCCCompiler(
527526
id="ee-gcc2.95.3-114",
528527
platform=PS2,
529-
cc='${WINE} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.3/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
528+
cc='${WIBO} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.3/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
530529
)
531530

532531
EE_GCC2953_136 = GCCCompiler(
533532
id="ee-gcc2.95.3-136",
534533
platform=PS2,
535-
cc='${WINE} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.3/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
534+
cc='${WIBO} "${COMPILER_DIR}/bin/ee-gcc.exe" -c -B "${COMPILER_DIR}"/lib/gcc-lib/ee/2.95.3/ $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"',
536535
)
537536

538537
EE_GCC296 = GCCCompiler(
@@ -550,31 +549,31 @@ def preset_from_name(name: str) -> Optional[Preset]:
550549
MWCPS2_23_991202 = MWCCCompiler(
551550
id="mwcps2-2.3-991202",
552551
platform=PS2,
553-
cc='${WINE} "${COMPILER_DIR}/mwccmips.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
552+
cc='${WIBO} "${COMPILER_DIR}/mwccmips.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
554553
)
555554

556555
MWCPS2_30B22_011126 = MWCCCompiler(
557556
id="mwcps2-3.0b22-011126",
558557
platform=PS2,
559-
cc='${WINE} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
558+
cc='${WIBO} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
560559
)
561560

562561
MWCPS2_30B22_020123 = MWCCCompiler(
563562
id="mwcps2-3.0b22-020123",
564563
platform=PS2,
565-
cc='${WINE} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
564+
cc='${WIBO} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
566565
)
567566

568567
MWCPS2_30B22_020716 = MWCCCompiler(
569568
id="mwcps2-3.0b22-020716",
570569
platform=PS2,
571-
cc='${WINE} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
570+
cc='${WIBO} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
572571
)
573572

574573
MWCPS2_30B22_020926 = MWCCCompiler(
575574
id="mwcps2-3.0b22-020926",
576575
platform=PS2,
577-
cc='${WINE} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
576+
cc='${WIBO} "${COMPILER_DIR}/mwccps2.exe" -c $COMPILER_FLAGS -nostdinc -stderr "$INPUT" -o "$OUTPUT"',
578577
)
579578

580579

@@ -890,7 +889,7 @@ def preset_from_name(name: str) -> Optional[Preset]:
890889
)
891890

892891
# NDS_ARM9
893-
MWCCARM_CC = '${WINE} "${COMPILER_DIR}/mwccarm.exe" -pragma "msg_show_realref off" -c -proc arm946e -nostdinc -stderr ${COMPILER_FLAGS} -o "${OUTPUT}" "${INPUT}"'
892+
MWCCARM_CC = '${WIBO} "${COMPILER_DIR}/mwccarm.exe" -pragma "msg_show_realref off" -c -proc arm946e -nostdinc -stderr ${COMPILER_FLAGS} -o "${OUTPUT}" "${INPUT}"'
894893

895894
MWCC_20_72 = MWCCCompiler(
896895
id="mwcc_20_72",
@@ -1030,7 +1029,7 @@ def preset_from_name(name: str) -> Optional[Preset]:
10301029
cc=MWCCARM_CC,
10311030
)
10321031

1033-
CL_WIN = '${WINE} "${COMPILER_DIR}"/Bin/CL.EXE /c /nologo /IZ:"${COMPILER_DIR}"/Include/ ${COMPILER_FLAGS} /Fd"Z:/tmp/" /Bk"Z:/tmp/" /Fo"Z:${OUTPUT}" "Z:${INPUT}"'
1032+
CL_WIN = '${WIBO} "${COMPILER_DIR}"/Bin/CL.EXE /c /nologo /IZ:"${COMPILER_DIR}"/Include/ ${COMPILER_FLAGS} /Fd"Z:/tmp/" /Bk"Z:/tmp/" /Fo"Z:${OUTPUT}" "Z:${INPUT}"'
10341033

10351034
MSVC40 = MSVCCompiler(
10361035
id="msvc4.0",
@@ -1094,12 +1093,12 @@ def preset_from_name(name: str) -> Optional[Preset]:
10941093
# Watcom doesn't like '/' in paths passed to it so we need to replace them.
10951094
WATCOM_ARGS = ' -zq -i="Z:${COMPILER_DIR}/h" -i="Z:${COMPILER_DIR}/h/nt" ${COMPILER_FLAGS} -fo"Z:${OUTPUT}" "Z:${INPUT}"'
10961095
WATCOM_CC = (
1097-
'${WINE} "${COMPILER_DIR}/binnt/wcc386.exe" $(echo "'
1096+
'${WIBO} "${COMPILER_DIR}/binnt/wcc386.exe" $(echo "'
10981097
+ WATCOM_ARGS
10991098
+ "\" | sed 's:/:\\\\:g')"
11001099
)
11011100
WATCOM_CXX = (
1102-
'${WINE} "${COMPILER_DIR}/binnt/wpp386.exe" $(echo "'
1101+
'${WIBO} "${COMPILER_DIR}/binnt/wpp386.exe" $(echo "'
11031102
+ WATCOM_ARGS
11041103
+ "\" | sed 's:/:\\\\:g')"
11051104
)

docs/CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ yarn dev
8585

8686
### Optional steps
8787
- [Configure vscode for development](VSCODE.md)
88-
- [Configure wine for Windows compiler on Linux](WINE.md)
8988
- [Set up GitHub authentication](GITHUB.md)
9089
- [Install nsjail to run the compiler sandbox](SANDBOX.md)
9190
- [Configure an nginx reverse proxy](NGINX.md)

docs/WINE.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)