Skip to content

Commit e5e26cd

Browse files
authored
Merge pull request #65 from samoyedsun/master
add shdc path for Mac x86
2 parents 645e756 + 4204a77 commit e5e26cd

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

clibs/soluna/compile_shader.lua

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,26 @@
11
local lm = require "luamake"
22
local fs = require "bee.filesystem"
3+
local platform = require "bee.platform"
34

5+
local function shdc_plat()
6+
if lm.os == "windows" then
7+
return "win32"
8+
end
9+
if lm.os == "linux" then
10+
return "linux"
11+
end
12+
if lm.os == "macos" then
13+
return platform.Arch == "arm64" and "osx_arm64" or "osx"
14+
end
15+
return "unknown"
16+
end
417
local paths = {
5-
windows = "$PATH/win32/$NAME.exe",
6-
macos = "$PATH/osx_arm64/$NAME",
7-
linux = "$PATH/linux/$NAME",
18+
windows = "$PATH/$NAME.exe",
19+
macos = "$PATH/$NAME",
20+
linux = "$PATH/$NAME",
821
}
922
local shdc = assert(paths[lm.os]):gsub("%$(%u+)", {
10-
PATH = tostring(lm.basedir / "bin/sokol-tools-bin/bin"),
23+
PATH = tostring(lm.basedir / "bin/sokol-tools-bin/bin" / shdc_plat()),
1124
NAME = "sokol-shdc",
1225
})
1326

0 commit comments

Comments
 (0)