From 2643625c68f23286761814db9a95b3e8f7cc2206 Mon Sep 17 00:00:00 2001 From: Mark Street Date: Wed, 18 Jun 2025 11:25:18 +0100 Subject: [PATCH 1/2] Replace wine with wibo --- backend/coreapp/compiler_wrapper.py | 2 -- backend/coreapp/compilers.py | 2 +- docs/CONTRIBUTING.md | 1 - docs/WINE.md | 10 ---------- 4 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 docs/WINE.md diff --git a/backend/coreapp/compiler_wrapper.py b/backend/coreapp/compiler_wrapper.py index 0df193421..d1f9c89e5 100644 --- a/backend/coreapp/compiler_wrapper.py +++ b/backend/coreapp/compiler_wrapper.py @@ -49,7 +49,6 @@ def lru_cache(maxsize: int = 128, typed: bool = False) -> Callable[[F], F]: else: PATH = os.environ["PATH"] -WINE = "wine" WIBO = "wibo" @@ -204,7 +203,6 @@ def compile_code( shell=True, env={ "PATH": PATH, - "WINE": WINE, "WIBO": WIBO, "WIBO_PATH": sandbox.rewrite_path(wibo_path), "INPUT": sandbox.rewrite_path(code_path), diff --git a/backend/coreapp/compilers.py b/backend/coreapp/compilers.py index 7cc6c2c85..a909ed91c 100644 --- a/backend/coreapp/compilers.py +++ b/backend/coreapp/compilers.py @@ -613,7 +613,7 @@ def available_platforms() -> List[Platform]: EE_GCC32_030210_BETA2 = GCCPS2Compiler( id="ee-gcc3.2-030210-beta2", - cc='WINEPATH="${COMPILER_DIR}"/dll/ ${WINE} "${COMPILER_DIR}"/bin/ee-gcc.exe -c -B "${COMPILER_DIR}"/bin/ee- $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"', + cc='WIBOPATH="${COMPILER_DIR}"/dll/ ${WIBO} "${COMPILER_DIR}"/bin/ee-gcc.exe -c -B "${COMPILER_DIR}"/bin/ee- $COMPILER_FLAGS "$INPUT" -o "$OUTPUT"', ) EE_GCC32_030926 = GCCPS2Compiler( diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 1c7f86764..a3a201a2f 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -86,7 +86,6 @@ yarn dev ### Optional steps - [Configure vscode for development](VSCODE.md) -- [Configure wine for Windows compiler on Linux](WINE.md) - [Set up GitHub authentication](GITHUB.md) - [Install nsjail to run the compiler sandbox](SANDBOX.md) - [Configure an nginx reverse proxy](NGINX.md) diff --git a/docs/WINE.md b/docs/WINE.md deleted file mode 100644 index 4cfe86b83..000000000 --- a/docs/WINE.md +++ /dev/null @@ -1,10 +0,0 @@ -### Wine setup (for local development, running Windows compilers) -- Create a wineprefix dir -```shell -WINEPREFIX=$HOME/.wine WINEARCH=win32 wineboot --init -``` - -- Add the WINEPREFIX setting to your .local.env file in the root of the repo -```shell -echo "WINEPREFIX=$HOME/.wine" >> .local.env -``` From 96defa8f50df0adf665080ee7be0973e7ed28532 Mon Sep 17 00:00:00 2001 From: Mark Street Date: Wed, 22 Oct 2025 11:37:14 +0100 Subject: [PATCH 2/2] More de-wine-ing --- backend/coreapp/compiler_wrapper.py | 2 -- backend/coreapp/sandbox.py | 8 -------- 2 files changed, 10 deletions(-) diff --git a/backend/coreapp/compiler_wrapper.py b/backend/coreapp/compiler_wrapper.py index d1f9c89e5..ea8cffa71 100644 --- a/backend/coreapp/compiler_wrapper.py +++ b/backend/coreapp/compiler_wrapper.py @@ -107,8 +107,6 @@ def filter_compiler_flags(compiler_flags: str) -> str: @staticmethod def filter_compile_errors(input: str) -> str: filter_strings = [ - r"wine: could not load .*\.dll.*\n?", - r"wineserver: could not save registry .*\n?", r"### .*\.exe Driver Error:.*\n?", r"# Cannot find my executable .*\n?", r"### MWCPPC\.exe Driver Error:.*\n?", diff --git a/backend/coreapp/sandbox.py b/backend/coreapp/sandbox.py index 8e1d4fb2d..c4b0c8142 100644 --- a/backend/coreapp/sandbox.py +++ b/backend/coreapp/sandbox.py @@ -47,13 +47,10 @@ def sandbox_command(self, mounts: List[Path], env: Dict[str, str]) -> List[str]: return [] settings.SANDBOX_CHROOT_PATH.mkdir(parents=True, exist_ok=True) - settings.WINEPREFIX.mkdir(parents=True, exist_ok=True) assert ":" not in str(self.path) - assert ":" not in str(settings.WINEPREFIX) # wine-specific hacks - user = getpass.getuser() (self.path / "Temp").mkdir(parents=True, exist_ok=True) # fmt: off @@ -81,11 +78,6 @@ def sandbox_command(self, mounts: List[Path], env: Dict[str, str]) -> List[str]: "--cwd", "/tmp", "--rlimit_fsize", "soft", "--rlimit_nofile", "soft", - # the following are settings that can be removed once we are done with wine - "--bindmount_ro", f"{settings.WINEPREFIX}:/wine", - "--bindmount", f"{self.path}/Temp:/wine/drive_c/users/{user}/Temp", - "--env", "WINEDEBUG=-all", - "--env", "WINEPREFIX=/wine", ] # fmt: on if settings.SANDBOX_DISABLE_PROC: