mirror of
https://github.com/encounter/dtk-template.git
synced 2025-12-17 17:05:38 +00:00
Update tools & use wibo for macOS (no more wine-crossover)
This commit is contained in:
@@ -51,24 +51,14 @@ macOS
|
||||
brew install ninja
|
||||
```
|
||||
|
||||
- Install [wine-crossover](https://github.com/Gcenx/homebrew-wine):
|
||||
|
||||
```sh
|
||||
brew install --cask --no-quarantine gcenx/wine/wine-crossover
|
||||
```
|
||||
|
||||
After OS upgrades, if macOS complains about `Wine Crossover.app` being unverified, you can unquarantine it using:
|
||||
|
||||
```sh
|
||||
sudo xattr -rd com.apple.quarantine '/Applications/Wine Crossover.app'
|
||||
```
|
||||
[wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
Linux
|
||||
------
|
||||
|
||||
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages).
|
||||
- For non-x86(_64) platforms: Install wine from your package manager.
|
||||
- For x86(_64), [wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
[wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
Building
|
||||
========
|
||||
|
||||
@@ -159,9 +159,9 @@ if not config.non_matching:
|
||||
config.binutils_tag = "2.42-1"
|
||||
config.compilers_tag = "20250812"
|
||||
config.dtk_tag = "v1.6.2"
|
||||
config.objdiff_tag = "v3.0.0-beta.14"
|
||||
config.sjiswrap_tag = "v1.2.1"
|
||||
config.wibo_tag = "0.7.0"
|
||||
config.objdiff_tag = "v3.3.1"
|
||||
config.sjiswrap_tag = "v1.2.2"
|
||||
config.wibo_tag = "1.0.0-beta.3"
|
||||
|
||||
# Project
|
||||
config.config_path = Path("config") / config.version / "config.yml"
|
||||
|
||||
@@ -21,21 +21,11 @@ macOS
|
||||
brew install ninja
|
||||
```
|
||||
|
||||
- Install [wine-crossover](https://github.com/Gcenx/homebrew-wine):
|
||||
|
||||
```sh
|
||||
brew install --cask --no-quarantine gcenx/wine/wine-crossover
|
||||
```
|
||||
|
||||
After OS upgrades, if macOS complains about `Wine Crossover.app` being unverified, you can unquarantine it using:
|
||||
|
||||
```sh
|
||||
sudo xattr -rd com.apple.quarantine '/Applications/Wine Crossover.app'
|
||||
```
|
||||
[wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
Linux
|
||||
------
|
||||
|
||||
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages).
|
||||
- For non-x86(_64) platforms: Install wine from your package manager.
|
||||
- For x86(_64), [wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
[wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
@@ -78,8 +78,14 @@ def sjiswrap_url(tag: str) -> str:
|
||||
|
||||
|
||||
def wibo_url(tag: str) -> str:
|
||||
uname = platform.uname()
|
||||
arch = uname.machine.lower()
|
||||
system = uname.system.lower()
|
||||
if system == "darwin":
|
||||
arch = "macos"
|
||||
|
||||
repo = "https://github.com/decompals/wibo"
|
||||
return f"{repo}/releases/download/{tag}/wibo"
|
||||
return f"{repo}/releases/download/{tag}/wibo-{arch}"
|
||||
|
||||
|
||||
TOOLS: Dict[str, Callable[[str], str]] = {
|
||||
|
||||
@@ -283,8 +283,8 @@ class ProjectConfig:
|
||||
def use_wibo(self) -> bool:
|
||||
return (
|
||||
self.wibo_tag is not None
|
||||
and sys.platform == "linux"
|
||||
and platform.machine() in ("i386", "x86_64")
|
||||
and (sys.platform == "linux" or sys.platform == "darwin")
|
||||
and platform.machine() in ("i386", "x86_64", "aarch64", "arm64")
|
||||
and self.wrapper is None
|
||||
)
|
||||
|
||||
@@ -595,10 +595,7 @@ def generate_build_ninja(
|
||||
sys.exit("ProjectConfig.sjiswrap_tag missing")
|
||||
|
||||
wrapper = config.compiler_wrapper()
|
||||
# Only add an implicit dependency on wibo if we download it
|
||||
wrapper_implicit: Optional[Path] = None
|
||||
if wrapper is not None and config.use_wibo():
|
||||
wrapper_implicit = wrapper
|
||||
n.build(
|
||||
outputs=wrapper,
|
||||
rule="download_tool",
|
||||
@@ -608,6 +605,11 @@ def generate_build_ninja(
|
||||
"tag": config.wibo_tag,
|
||||
},
|
||||
)
|
||||
|
||||
wrapper_implicit: Optional[Path] = None
|
||||
if wrapper is not None and (wrapper.exists() or config.use_wibo()):
|
||||
wrapper_implicit = wrapper
|
||||
|
||||
wrapper_cmd = f"{wrapper} " if wrapper else ""
|
||||
|
||||
compilers = config.compilers()
|
||||
|
||||
Reference in New Issue
Block a user