diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4f53a90..8f90886 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,7 +176,7 @@ jobs: - name: Install dependencies (apt) run: | sudo apt update - sudo apt install -y build-essential cmake autoconf automake libtool pkg-config zstd + sudo apt install -y build-essential cmake autoconf automake libtool pkg-config zstd jq - name: Build run: | @@ -432,6 +432,7 @@ jobs: mingw-w64-x86_64-libusb mingw-w64-x86_64-rust mingw-w64-x86_64-nsis + mingw-w64-x86_64-jq libtool openssl openssl-devel diff --git a/.gitignore b/.gitignore index 296abe0..6bdf1f9 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ embedded/Pongo.bin embedded/checkra1n-kpf-pongo embedded/ramdisk.dmg embedded/binpack.dmg +embedded/DFUHelperDeviceInfo-minified.json apple-include-* libusbK/ diff --git a/Makefile b/Makefile index ec76c9c..70e1a6b 100644 --- a/Makefile +++ b/Makefile @@ -117,8 +117,9 @@ apple-include: payloads: mkdir -p src/gen/embedded - xz --format=lzma -vfc6ekT 0 embedded/ramdisk.dmg > embedded/ramdisk-compressed.dmg.lzma + xz --format=lzma -vfc6ekT 0 embedded/ramdisk.dmg > embedded/ramdisk-compressed.lzma xz --format=lzma -vfc6ekT 0 embedded/checkra1n-kpf-pongo > embedded/checkra1n-kpf-pongo-compressed.lzma + jq -c . embedded/DFUHelperDeviceInfo.json > embedded/DFUHelperDeviceInfo-minified.json @for file in embedded/*; do \ name=$$(basename "$$file"); \ diff --git a/src/globals.c b/src/globals.c index 527a1d7..b71f6ab 100644 --- a/src/globals.c +++ b/src/globals.c @@ -39,7 +39,7 @@ #endif #if WITH_RAMDISK # include "gen/embedded/ramdisk.h" -# include "gen/embedded/ramdisk-compressed.dmg.h" +# include "gen/embedded/ramdisk-compressed.h" #endif #include "gen/embedded/Pongo.h" #include "gen/embedded/checkra1n-kpf-pongo.h" @@ -64,8 +64,8 @@ payload_t g_payload_overlay = { #if WITH_RAMDISK payload_t g_payload_ramdisk = { - .data = embedded_ramdisk_compressed_dmg_lzma, - .data_len = embedded_ramdisk_compressed_dmg_lzma_len, + .data = embedded_ramdisk_compressed_lzma, + .data_len = embedded_ramdisk_compressed_lzma_len, .uncompressed_data_len = embedded_ramdisk_dmg_len, }; #else diff --git a/src/sequence.cpp b/src/sequence.cpp index 02998e0..cf1f468 100644 --- a/src/sequence.cpp +++ b/src/sequence.cpp @@ -28,7 +28,7 @@ #if defined(WITH_GUI) || defined(WITH_TUI) #include -#include "gen/embedded/DFUHelperDeviceInfo.h" +#include "gen/embedded/DFUHelperDeviceInfo-minified.h" #include "sequence.hpp" DfuSequence ParseSequence(const std::string& deviceKey) @@ -36,9 +36,9 @@ DfuSequence ParseSequence(const std::string& deviceKey) DfuSequence seq; static nlohmann::json j = nlohmann::json::parse( - embedded_DFUHelperDeviceInfo_json, - embedded_DFUHelperDeviceInfo_json + - embedded_DFUHelperDeviceInfo_json_len + embedded_DFUHelperDeviceInfo_minified_json, + embedded_DFUHelperDeviceInfo_minified_json + + embedded_DFUHelperDeviceInfo_minified_json_len ); auto itMap = j["devicemap"].find(deviceKey);