Skip to content

Commit

Permalink
Reduce the size of the lwrun installer
Browse files Browse the repository at this point in the history
  • Loading branch information
VHSgunzo committed Jan 3, 2024
1 parent faf5ee3 commit 9952e9b
Show file tree
Hide file tree
Showing 13 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v0.78.2.3

* Update [lwrun](https://huggingface.co/lux-wine/lwrun/tree/main/releases/v0.39.1) packages
* Reduce the size of the `lwrun` installer
* Revert/replace `mesa-tkg-git` with `mesa` in `lwrun`
* Fix prefix restore on first run with `-init`

Expand Down
Empty file added lwpkg/RunDir/Run
Empty file.
14 changes: 14 additions & 0 deletions lwpkg/RunDir/Run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

[ ! -d "$RUNDIR" ] && \
RUNDIR="$(dirname "$(realpath "$0" 2>/dev/null)" 2>/dev/null)"
export PATH="$RUNDIR/static:$PATH"

LW_DIR="$HOME/.local/share/LuxWine"
LWBIN_DIR="$LW_DIR/bin"
LWRUN="$LWBIN_DIR/lwrun"

mkdir -p "$LWBIN_DIR"
tar -I 'zstd -T0 --progress' -xf "$RUNDIR/lwrun.tar.zst" -C "$LWBIN_DIR"

exec "$LWRUN" -init
Empty file added lwpkg/RunDir/lwrun.tar.zst
Empty file.
6 changes: 6 additions & 0 deletions lwpkg/RunDir/static/.binaries_version
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[coreutils](https://github.com/VHSgunzo/coreutils-static) 9.3 (musl):
mkdir
(musl):
[tar](https://github.com/VHSgunzo/tar-static) 1.34
[bash](https://github.com/robxu9/bash-static) 5.2.015-1.2.3-2
[zstd](https://github.com/VHSgunzo/zstd-static) 1.4.7.r1914
1 change: 1 addition & 0 deletions lwpkg/RunDir/static/.version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.0.1
Empty file added lwpkg/RunDir/static/bash
Empty file.
Empty file added lwpkg/RunDir/static/mkdir
Empty file.
Empty file added lwpkg/RunDir/static/tar
Empty file.
Empty file added lwpkg/RunDir/static/zstd
Empty file.
21 changes: 21 additions & 0 deletions lwpkg/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -e

# https://github.com/VHSgunzo/runimage-runtime-static
RUNTIME='runtime-fuse2-all'
RUNTIMESIZE=($(du -sb "$RUNTIME" 2>/dev/null))

# RunDir/static
# bash # https://github.com/robxu9/bash-static
# mkdir # https://github.com/VHSgunzo/coreutils-static
# tar # https://github.com/VHSgunzo/tar-static
# zstd # https://github.com/VHSgunzo/zstd-static

# https://github.com/VHSgunzo/Run-wrapper
# RunDir/Run

# https://github.com/VHSgunzo/lwrun
tar -I 'zstd -T0 --ultra -22 --progress' -cf RunDir/lwrun.tar.zst lwrun
mksquashfs RunDir lwrun -offset "$RUNTIMESIZE" -root-owned -no-xattrs -quiet -mkfs-time 0 -noappend -b 1M -comp lz4 -Xhc
dd if="$RUNTIME" bs="$RUNTIMESIZE" count=1 of=lwrun conv=notrunc
chmod +x lwrun
Empty file added lwpkg/lwrun
Empty file.
Empty file added lwpkg/runtime-fuse2-all
Empty file.

0 comments on commit 9952e9b

Please sign in to comment.