Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/actions/soluna/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,33 +42,6 @@ runs:
run: |
git submodule update --init --recursive
shell: bash
- uses: actions/checkout@v5
if: steps.cache.outputs.cache-hit != 'true'
with:
repository: floooh/sokol-tools-bin
ref: "a06f19929ff8f9824ec6dd87c21329b1f205809e"
path: sokol-tools-bin
fetch-depth: 1
- name: Setup sokol-shdc
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
if [[ "$RUNNER_OS" == "Windows" ]]; then
TARGET_DIR="C:/Windows/System32"
SHDC_BINARY="sokol-shdc.exe"
FIND_PATH="bin/win32"
elif [[ "$RUNNER_OS" == "macOS" ]]; then
TARGET_DIR="/usr/local/bin"
SHDC_BINARY="sokol-shdc"
FIND_PATH="bin/osx_arm64"
else # Linux
TARGET_DIR="/usr/local/bin"
SHDC_BINARY="sokol-shdc"
FIND_PATH="bin/linux"
fi
echo "Setting up sokol-tools from sokol-tools-bin/$FIND_PATH"
find sokol-tools-bin/$FIND_PATH -name $SHDC_BINARY -exec cp {} $TARGET_DIR \;
$SHDC_BINARY -h
- uses: yuchanns/actions-luamake@v1
if: steps.cache.outputs.cache-hit != 'true'
with:
Expand Down
10 changes: 9 additions & 1 deletion clibs/soluna/compile_shader.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
local lm = require "luamake"
local fs = require "bee.filesystem"

local shdc<const> = lm.shdc or ""
local paths = {
windows = "$PATH/win32/$NAME.exe",
macos = "$PATH/osx_arm64/$NAME",
linux = "$PATH/linux/$NAME",
}
local shdc = assert(paths[lm.os]):gsub("%$(%u+)", {
PATH = tostring(lm.basedir / "bin/sokol-tools-bin/bin"),
NAME = "sokol-shdc",
})

local function compile_shader(src, name, lang)
local dep = name .. "_shader"
Expand Down
1 change: 0 additions & 1 deletion clibs/soluna/make.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ if ok then
local output = process.stdout:read "a"
commit = output:match "^%s*(.-)%s*$"
process:wait()
print("Hash version: " .. commit)
end
end

Expand Down
17 changes: 0 additions & 17 deletions clibs/soluna/shader2c.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
local subprocess = require "bee.subprocess"
local platform = require "bee.platform"
local shdcexe, src, target, lang = ...

local function find_executable(name)
local handle = io.popen("where " .. name .. " 2>nul")
if handle then
local path = handle:read("*line")
local success = handle:close()
if success and path and path ~= "" then
return path:gsub("%s+$", "")
end
end
return name
end

if shdcexe == "" then
shdcexe = platform.os == "windows" and find_executable("sokol-shdc.exe") or "sokol-shdc"
end

local process = assert(subprocess.spawn {
shdcexe,
"--input",
Expand Down
Loading