mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 19:19:48 +02:00
chore: minify dfuhelperinfo
This commit is contained in:
5 files changed
+12
-9
No files matched your search
@@ -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
|
||||
|
||||
@@ -8,6 +8,7 @@ embedded/Pongo.bin
|
||||
embedded/checkra1n-kpf-pongo
|
||||
embedded/ramdisk.dmg
|
||||
embedded/binpack.dmg
|
||||
embedded/DFUHelperDeviceInfo-minified.json
|
||||
|
||||
apple-include-*
|
||||
libusbK/
|
||||
|
||||
@@ -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"); \
|
||||
|
||||
+3
-3
@@ -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
|
||||
|
||||
+4
-4
@@ -28,7 +28,7 @@
|
||||
#if defined(WITH_GUI) || defined(WITH_TUI)
|
||||
|
||||
#include <nlohmann/json.hpp>
|
||||
#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);
|
||||
|
||||
Reference in new issue
Block a user