gamemode: Fix overcomplications and @import with symlinks

This commit is contained in:
PiergiorgioZagaria 2022-07-28 10:38:17 +02:00 committed by Stephen Gutekanst
parent 38a44ea3b3
commit 4ee9ba1000
6 changed files with 13 additions and 102 deletions

View file

@ -1,20 +1,6 @@
#!/usr/bin/env bash
rm ./c/*
cd ./c
rm ./gamemode_client.h
wget "https://github.com/FeralInteractive/gamemode/raw/master/lib/gamemode_client.h"
wget "https://github.com/FeralInteractive/gamemode/raw/master/lib/client_impl.c"
wget "https://github.com/FeralInteractive/gamemode/raw/master/lib/client_loader.c"
cd ./common
wget "https://github.com/FeralInteractive/gamemode/raw/b11d2912e280acb87d9ad114d6c7cd8846c4ef02/common/common-helpers.c"
wget "https://github.com/FeralInteractive/gamemode/raw/b11d2912e280acb87d9ad114d6c7cd8846c4ef02/common/common-pidfds.c"
wget "https://github.com/FeralInteractive/gamemode/raw/b11d2912e280acb87d9ad114d6c7cd8846c4ef02/common/common-helpers.h"
wget "https://github.com/FeralInteractive/gamemode/raw/b11d2912e280acb87d9ad114d6c7cd8846c4ef02/common/common-pidfds.h"
cd ../..
# The output from translate-c isn't perfect, so we need this fix
zig translate-c ./c/gamemode_client.h -lc | sed "s#functor\(.*\)@alignCast\(.*\),\(.*\))#functor\1\3#" > ./src/gamemode_client.zig
rm -r ./zig-cache
zig translate-c ./gamemode_client.h -lc | sed "s#functor\(.*\)@alignCast\(.*\),\(.*\))#functor\1\3#" > ./gamemode_client.zig