diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml new file mode 100644 index 00000000..c604ea4c --- /dev/null +++ b/.github/workflows/make.yml @@ -0,0 +1,30 @@ +name: make + +on: + push: + branches: ["master"] + pull_request: + branches: ["master"] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + # The Steam Runtime platform (sniper) uses Python 3.9 + python-version: "3.9" + - name: Install dependencies + run: | + sudo apt-get install podman + - name: Initialize submodules + run: | + git submodule update --init --recursive + - name: Build protonfixes in Steam Runtime + run: | + podman run --rm -v $(pwd):/workspace -w /workspace registry.gitlab.steamos.cloud/steamrt/sniper/sdk /bin/sh -c "make install" diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..8d9be349 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "subprojects/x11-xserver-utils"] + path = subprojects/x11-xserver-utils + url = https://salsa.debian.org/xorg-team/app/x11-xserver-utils.git +[submodule "subprojects/libmspack"] + path = subprojects/libmspack + url = https://github.com/kyz/libmspack.git diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index d2045472..00000000 --- a/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: python -python: - - "3.6" # Ubuntu 18.04, Fedora 28 -install: - - pip install pylint -script: pylint protonfixes/* diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..27217522 --- /dev/null +++ b/Makefile @@ -0,0 +1,103 @@ +OBJDIR := builddir + +PREFIX ?= /usr +DESTDIR ?= +INSTALL_DIR ?= $(shell pwd)/dist/protonfixes + +.PHONY: all + +all: xrandr-dist cabextract-dist libmspack-dist + +.PHONY: install + +install: protonfixes-install xrandr-install cabextract-install libmspack-install + +# +# protonfixes +# + +.PHONY: protonfixes + +protonfixes-install: protonfixes + $(info :: Installing protonfixes ) + install -d $(INSTALL_DIR) + cp -r gamefixes-* $(INSTALL_DIR) + cp -r verbs $(INSTALL_DIR) + cp *.py $(INSTALL_DIR) + cp winetricks $(INSTALL_DIR) + rm $(INSTALL_DIR)/protonfixes_test.py + +# +# xrandr +# + +$(OBJDIR)/.build-xrandr-dist: | $(OBJDIR) + $(info :: Building xrandr ) + cd subprojects/x11-xserver-utils/xrandr && \ + ./configure --prefix=/usr && \ + make + touch $(@) + +.PHONY: xrandr-dist + +xrandr-dist: $(OBJDIR)/.build-xrandr-dist + +xrandr-install: xrandr-dist + $(info :: Installing xrandr ) + # Install + cd subprojects/x11-xserver-utils/xrandr && \ + make DESTDIR=$(INSTALL_DIR) install + # Post install + cp $(INSTALL_DIR)/usr/bin/xrandr $(INSTALL_DIR) + rm -r $(INSTALL_DIR)/usr + +# +# cabextract +# + +$(OBJDIR)/.build-cabextract-dist: | $(OBJDIR) + $(info :: Building cabextract ) + cd subprojects/libmspack/cabextract && \ + ./autogen.sh && \ + ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man && \ + make + touch $(@) + +.PHONY: cabextract-dist + +cabextract-dist: $(OBJDIR)/.build-cabextract-dist + +cabextract-install: cabextract-dist + $(info :: Installing cabextract ) + cd subprojects/libmspack/cabextract && \ + make DESTDIR=$(INSTALL_DIR) install + cp $(INSTALL_DIR)/usr/bin/cabextract $(INSTALL_DIR) + rm -r $(INSTALL_DIR)/usr + +# +# libmspack +# + +$(OBJDIR)/.build-libmspack-dist: | $(OBJDIR) + $(info :: Building libmspack ) + cd subprojects/libmspack/libmspack && \ + autoreconf -vfi && \ + ./configure --prefix=/usr --disable-static --sysconfdir=/etc --localstatedir=/var && \ + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool && \ + make + touch $(@) + +.PHONY: libmspack-dist + +libmspack-dist: $(OBJDIR)/.build-libmspack-dist + +libmspack-install: libmspack-dist + $(info :: Installing libmspack ) + cd subprojects/libmspack/libmspack && \ + make DESTDIR=$(INSTALL_DIR) install + cp -d $(INSTALL_DIR)/usr/lib/libmspack* $(INSTALL_DIR) + rm -r $(INSTALL_DIR)/usr + rm $(INSTALL_DIR)/libmspack.la + +$(OBJDIR): + @mkdir -p $(@) diff --git a/__init__.py b/__init__.py old mode 100755 new mode 100644 diff --git a/cabextract b/cabextract deleted file mode 100755 index 6be533fa..00000000 Binary files a/cabextract and /dev/null differ diff --git a/cabextract_1.9-1.debian.tar.xz b/cabextract_1.9-1.debian.tar.xz deleted file mode 100755 index a4d12393..00000000 Binary files a/cabextract_1.9-1.debian.tar.xz and /dev/null differ diff --git a/checks.py b/checks.py old mode 100755 new mode 100644 diff --git a/config.py b/config.py old mode 100755 new mode 100644 diff --git a/debug.py b/debug.py old mode 100755 new mode 100644 diff --git a/download.py b/download.py old mode 100755 new mode 100644 diff --git a/engine.py b/engine.py old mode 100755 new mode 100644 diff --git a/fix.py b/fix.py old mode 100755 new mode 100644 diff --git a/libmspack.so.0 b/libmspack.so.0 deleted file mode 120000 index fe0a7a1a..00000000 --- a/libmspack.so.0 +++ /dev/null @@ -1 +0,0 @@ -libmspack.so.0.1.0 \ No newline at end of file diff --git a/libmspack.so.0.1.0 b/libmspack.so.0.1.0 deleted file mode 100755 index eff910bc..00000000 Binary files a/libmspack.so.0.1.0 and /dev/null differ diff --git a/libmspack_0.10.1-1.debian.tar.xz b/libmspack_0.10.1-1.debian.tar.xz deleted file mode 100755 index 15d88373..00000000 Binary files a/libmspack_0.10.1-1.debian.tar.xz and /dev/null differ diff --git a/logger.py b/logger.py old mode 100755 new mode 100644 diff --git a/subprojects/libmspack b/subprojects/libmspack new file mode 160000 index 00000000..30590772 --- /dev/null +++ b/subprojects/libmspack @@ -0,0 +1 @@ +Subproject commit 305907723a4e7ab2018e58040059ffb5e77db837 diff --git a/subprojects/x11-xserver-utils b/subprojects/x11-xserver-utils new file mode 160000 index 00000000..a3ecab8b --- /dev/null +++ b/subprojects/x11-xserver-utils @@ -0,0 +1 @@ +Subproject commit a3ecab8b1b8b24faf1a3a4237258d608022f7a31 diff --git a/symlinkfix.sh b/tools/symlinkfix.sh similarity index 83% rename from symlinkfix.sh rename to tools/symlinkfix.sh index e31f8e8d..3921f6f4 100755 --- a/symlinkfix.sh +++ b/tools/symlinkfix.sh @@ -1,4 +1,12 @@ #!/bin/bash + +if [[ $(basename "$PWD") != "tools" ]]; then + echo "Not executing within subdirectory 'tools', exiting" + exit 1 +fi + +cd .. + # change symlink targets to lower case if they aren't already find . -type l | while read symlink; do target=$(readlink "$symlink") diff --git a/tools/vcrunfix b/tools/vcrunfix new file mode 100755 index 00000000..e92bee3f --- /dev/null +++ b/tools/vcrunfix @@ -0,0 +1,10 @@ +#!/bin/bash + +if [[ $(basename "$PWD") != "tools" ]]; then + echo "Not executing within subdirectory 'tools', exiting" + exit 1 +fi + +cd .. + +find ./ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/vcrun2019/vcrun2019/g' diff --git a/util.py b/util.py old mode 100755 new mode 100644 diff --git a/vcrunfix b/vcrunfix deleted file mode 100755 index 180c87c1..00000000 --- a/vcrunfix +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash -find ./ \( -type d -name .git -prune \) -o -type f -print0 | xargs -0 sed -i 's/vcrun2019/vcrun2019/g' - diff --git a/x11-xserver-utils_7.7+10.tar.xz b/x11-xserver-utils_7.7+10.tar.xz deleted file mode 100644 index 5e39296c..00000000 Binary files a/x11-xserver-utils_7.7+10.tar.xz and /dev/null differ diff --git a/xrandr b/xrandr deleted file mode 100755 index c01747d0..00000000 Binary files a/xrandr and /dev/null differ