Skip to content

Commit

Permalink
Bump LiteLoaderQQNT to 1.2.2
Browse files Browse the repository at this point in the history
No need to extract preloads manually now.
So all contents related to preloads-extracting are removed.
Hope we will not need to add them back in the future.
  • Loading branch information
arenekosreal committed Sep 30, 2024
1 parent 45d8fef commit 97f2a67
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 203 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,34 +32,6 @@ jobs:
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Install missing depends to get QQ version
run: dnf -y install jq
- name: Get QQ version in manifest
id: qq-version
shell: bash
run: |
_arch=$(flatpak --default-arch)
_manifest=$(flatpak-builder --show-manifest com.qq.QQ.yaml)
_extra_datas=$(echo "$_manifest" | jq -r ".modules[].sources | map(select(.type == \"extra-data\")) | select(length > 0)")
_qq=$(echo "$_extra_datas" | jq -r "map(select(.\"only-arches\" | contains([\"$_arch\"])))")
_url=$(echo "$_qq" | jq -r ".[0].url")
_version=$(echo "${_url##*/}" | cut -d _ -f 2,3)
echo "version=$_version" >> $GITHUB_OUTPUT
- name: Cache preloads-${{ steps.qq-version.outputs.version }}.tar.gz
uses: actions/cache@v4
id: cache
with:
path: preloads-${{ steps.qq-version.outputs.version }}.tar.gz
key: ${{ matrix.arch }}-${{ steps.qq-version.outputs.version }}
- name: Install missing depends to run QQ
if: steps.cache.outputs.cache-hit != 'true'
run: dnf -y install bsdtar nss at-spi2-atk cups-libs gtk3 mesa-libgbm
- name: Generate preloads
if: steps.cache.outputs.cache-hit != 'true'
run: bash extract-preloads.sh
- name: Link preloads
if: steps.cache.outputs.cache-hit == 'true'
run: ln -srfv preloads-${{ steps.qq-version.outputs.version }}.tar.gz preloads.tar.gz
- uses: flatpak/flatpak-github-actions/flatpak-builder@v6
with:
bundle: com.qq.QQ.flatpak
Expand Down
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,6 @@ This package enables the flags to run on Wayland and it should work out-of-the-b

This package also can fallback to X11 when Wayland is not available.

## For NixOS Users

As NixOS not obey FHS(Filesystem Hierarchy Standard), and this project require a FHS enviroment to finish some process.

A simple way is install a Steam (*unfree software*).

```nix
# configuration.nix
{
pkgs,
config,
...
}: {
programs.steam = {
enable = true;
package = pkgs.steam;
};
}
```

After rebuild, Steam provide `steam-run` that run a program in FHS enviroment.
Therefore, you could use `steam-run bash` to use this project.
Also, you could use another way to achieve this if you don't like unfree.

## Legality

The QQ app itself is **proprietary** (closed source).
Expand Down
19 changes: 4 additions & 15 deletions com.qq.QQ.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,11 @@ modules:
- install -Dm644 README.md $FLATPAK_DEST/lib/LiteLoaderQQNT/README.md
- cp -r src $FLATPAK_DEST/lib/LiteLoaderQQNT/src
- install -Dm755 patch_qq $FLATPAK_DEST/bin/patch_qq
- bsdtar -xf preloads.tar.gz
- cp -rv --no-preserve=ownership preloads $FLATPAK_DEST/lib/LiteLoaderQQNT/preloads-origin
sources:
- type: git
url: https://github.com/LiteLoaderQQNT/LiteLoaderQQNT.git
commit: bd5a9fb16ecfd25adc9d2b760f943582dbb7f531
tag: 1.2.1
commit: 3e8bcb3aa3af4532c52eb5a77626d8573980e7b1
tag: 1.2.2
x-checker-data:
type: git
tag-pattern: "^([\\d.]+)$"
Expand All @@ -189,15 +187,6 @@ modules:
- type: script
commands:
- echo Applying modifications to QQ...
- sed -i '1 i require("/app/lib/LiteLoaderQQNT");' QQ/resources/app/app_launcher/index.js
- for file in /app/lib/LiteLoaderQQNT/preloads-origin/*preload*.js
- do
- preload=/app/lib/LiteLoaderQQNT/src/preload.js
- target="./QQ/resources/app/application/$(basename $file)"
- echo "Injecting $preload into $target..."
- printf "%s\n{%s}" "$(< $preload)" "$( <$file)" > "$target"
- done
- echo 'require("/app/lib/LiteLoaderQQNT");' > QQ/resources/app/app_launcher/loader.js
- sed -i 's|./application/app_launcher/index.js|./app_launcher/loader.js|' QQ/resources/app/package.json
dest-filename: patch_qq

- type: file
path: preloads.tar.gz
106 changes: 0 additions & 106 deletions extract-preloads.sh

This file was deleted.

29 changes: 0 additions & 29 deletions patch/extractor.js

This file was deleted.

0 comments on commit 97f2a67

Please sign in to comment.