Skip to content

Commit

Permalink
fexpeec
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreRH committed Oct 13, 2024
1 parent 7deb26e commit 8619684
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 3 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,60 @@ jobs:
path: hangover-libwow64fex_${{ env.HOVERSION }}_arm64.deb


fex-pe-ec:
needs: foundations
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt clean
df -h
- name: Cache docker image
id: cache-foundation
uses: actions/cache@v4
env:
cache-name: cache-foundation
with:
path: foundationubuntu2204.tgz
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('.packaging/ubuntu2204/Dockerfile') }}

- name: Import docker image
run: docker image load -i foundationubuntu2204.tgz

- name: get version
run: git describe --tags | sed "s/hangover-/HOVERSION=/" >> "$GITHUB_ENV"; git describe --tags | sed "s/hangover-/HOVERSION=/"

- name: get shallow submodule
run: git submodule update --init --recursive --depth 1 fex

- name: Setup packaging
run: |
cp -r .packaging/ubuntu2204/fexpeec/* fex
cp fex/LICENSE fex/DEBIAN/copyright
sed -i "s/HOVERSION/${HOVERSION}/g" fex/Dockerfile
sed -i "s/HOVERSION/${HOVERSION}/g" fex/DEBIAN/control
sed -i "s/starting FEX based/starting FEX (Hangover ${HOVERSION}) based/g" fex/Source/Windows/ARM64EC/Module.cpp
sed -i "s/starting FEX based/starting FEX (Hangover ${HOVERSION}) based/g" fex/Source/Windows/WOW64/Module.cpp
nproc
- name: Build package
run: cd fex; docker build -t fexpeec .

- name: Extract package
run: docker run --rm fexpeec cat /opt/deb/hangover-libarm64ecfex_${{ env.HOVERSION }}_arm64.deb > hangover-libarm64ecfex_${{ env.HOVERSION }}_arm64.deb

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: hangover-libarm64ecfex_${{ env.HOVERSION }}_arm64.deb
path: hangover-libarm64ecfex_${{ env.HOVERSION }}_arm64.deb


qemu:
if: false
needs: foundations
Expand Down
1 change: 1 addition & 0 deletions .packaging/ubuntu2204/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
libwayland-dev:arm64

RUN cd /opt; wget https://github.com/mstorsjo/llvm-mingw/releases/download/20241001/llvm-mingw-20241001-ucrt-ubuntu-20.04-x86_64.tar.xz; tar -xJf llvm-mingw-20241001-ucrt-ubuntu-20.04-x86_64.tar.xz; rm *.tar.xz
RUN cd /opt; wget https://github.com/bylaws/llvm-mingw/releases/download/20240929/llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64.tar.xz; tar -xJf llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64.tar.xz; rm *.tar.xz; mv llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64 bylaws-llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64
4 changes: 1 addition & 3 deletions .packaging/ubuntu2204/fexpe/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
FROM foundationubuntu2204

RUN cd /opt; wget https://github.com/bylaws/llvm-mingw/releases/download/20240929/llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64.tar.xz; tar -xJf llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64.tar.xz; rm *.tar.xz

RUN rm -rf /opt/fex; mkdir -p /opt/fex/
COPY ./ /opt/fex/
RUN ls -la /opt/fex/
ENV PATH="/opt/llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64/bin:$PATH"
ENV PATH="/opt/bylaws-llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64/bin:$PATH"
RUN cd /opt/fex; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=../toolchain_mingw.cmake -DENABLE_LTO=False -DMINGW_TRIPLE=aarch64-w64-mingw32 -DBUILD_TESTS=False ..; make -j `nproc` wow64fex
RUN ls -la /opt/fex/build/Bin
RUN aarch64-w64-mingw32-strip --strip-unneeded /opt/fex/build/Bin/libwow64fex.dll
Expand Down
5 changes: 5 additions & 0 deletions .packaging/ubuntu2204/fexpeec/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Package: hangover-libarm64ecfex
Version: HOVERSION
Architecture: arm64
Maintainer: André Zwing <nerv@dawncrow.de>
Description: FEX based x86-64 emulator library for Hangover
1 change: 1 addition & 0 deletions .packaging/ubuntu2204/fexpeec/DEBIAN/triggers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
activate-noawait ldconfig
15 changes: 15 additions & 0 deletions .packaging/ubuntu2204/fexpeec/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM foundationubuntu2204

RUN rm -rf /opt/fex; mkdir -p /opt/fex/
COPY ./ /opt/fex/
RUN ls -la /opt/fex/
ENV PATH="/opt/bylaws-llvm-mingw-20240929-ucrt-ubuntu-20.04-x86_64/bin:$PATH"
RUN cd /opt/fex; mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=../toolchain_mingw.cmake -DENABLE_LTO=False -DMINGW_TRIPLE=arm64ec-w64-mingw32 -DBUILD_TESTS=False ..; make -j `nproc` arm64ecfex
RUN ls -la /opt/fex/build/Bin
RUN arm64ec-w64-mingw32-strip --strip-unneeded /opt/fex/build/Bin/libarm64ecfex.dll
RUN mkdir -p /opt/deb/hangover-libarm64ecfex/DEBIAN /opt/deb/hangover-libarm64ecfex/usr/lib/wine/aarch64-windows /opt/deb/hangover-libarm64ecfex/usr/share/doc/hangover-libarm64ecfex
COPY DEBIAN /opt/deb/hangover-libarm64ecfex/DEBIAN/
RUN cp /opt/deb/hangover-libarm64ecfex/DEBIAN/copyright /opt/deb/hangover-libarm64ecfex/usr/share/doc/hangover-libarm64ecfex/; \
cp /opt/fex/build/Bin/libarm64ecfex.dll /opt/deb/hangover-libarm64ecfex/usr/lib/wine/aarch64-windows/; \
cd /opt/deb; mv hangover-libarm64ecfex hangover-libarm64ecfex_HOVERSION_arm64; \
dpkg-deb --build --root-owner-group hangover-libarm64ecfex_HOVERSION_arm64

0 comments on commit 8619684

Please sign in to comment.