mirror of
https://github.com/palera1n/palera1n.git
synced 2026-11-28 12:23:19 +01: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)
|
- name: Install dependencies (apt)
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
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
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
@@ -432,6 +432,7 @@ jobs:
|
|||||||
mingw-w64-x86_64-libusb
|
mingw-w64-x86_64-libusb
|
||||||
mingw-w64-x86_64-rust
|
mingw-w64-x86_64-rust
|
||||||
mingw-w64-x86_64-nsis
|
mingw-w64-x86_64-nsis
|
||||||
|
mingw-w64-x86_64-jq
|
||||||
libtool
|
libtool
|
||||||
openssl
|
openssl
|
||||||
openssl-devel
|
openssl-devel
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ embedded/Pongo.bin
|
|||||||
embedded/checkra1n-kpf-pongo
|
embedded/checkra1n-kpf-pongo
|
||||||
embedded/ramdisk.dmg
|
embedded/ramdisk.dmg
|
||||||
embedded/binpack.dmg
|
embedded/binpack.dmg
|
||||||
|
embedded/DFUHelperDeviceInfo-minified.json
|
||||||
|
|
||||||
apple-include-*
|
apple-include-*
|
||||||
libusbK/
|
libusbK/
|
||||||
|
|||||||
@@ -117,8 +117,9 @@ apple-include:
|
|||||||
payloads:
|
payloads:
|
||||||
mkdir -p src/gen/embedded
|
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
|
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 \
|
@for file in embedded/*; do \
|
||||||
name=$$(basename "$$file"); \
|
name=$$(basename "$$file"); \
|
||||||
|
|||||||
+3
-3
@@ -39,7 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#if WITH_RAMDISK
|
#if WITH_RAMDISK
|
||||||
# include "gen/embedded/ramdisk.h"
|
# include "gen/embedded/ramdisk.h"
|
||||||
# include "gen/embedded/ramdisk-compressed.dmg.h"
|
# include "gen/embedded/ramdisk-compressed.h"
|
||||||
#endif
|
#endif
|
||||||
#include "gen/embedded/Pongo.h"
|
#include "gen/embedded/Pongo.h"
|
||||||
#include "gen/embedded/checkra1n-kpf-pongo.h"
|
#include "gen/embedded/checkra1n-kpf-pongo.h"
|
||||||
@@ -64,8 +64,8 @@ payload_t g_payload_overlay = {
|
|||||||
|
|
||||||
#if WITH_RAMDISK
|
#if WITH_RAMDISK
|
||||||
payload_t g_payload_ramdisk = {
|
payload_t g_payload_ramdisk = {
|
||||||
.data = embedded_ramdisk_compressed_dmg_lzma,
|
.data = embedded_ramdisk_compressed_lzma,
|
||||||
.data_len = embedded_ramdisk_compressed_dmg_lzma_len,
|
.data_len = embedded_ramdisk_compressed_lzma_len,
|
||||||
.uncompressed_data_len = embedded_ramdisk_dmg_len,
|
.uncompressed_data_len = embedded_ramdisk_dmg_len,
|
||||||
};
|
};
|
||||||
#else
|
#else
|
||||||
|
|||||||
+4
-4
@@ -28,7 +28,7 @@
|
|||||||
#if defined(WITH_GUI) || defined(WITH_TUI)
|
#if defined(WITH_GUI) || defined(WITH_TUI)
|
||||||
|
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
#include "gen/embedded/DFUHelperDeviceInfo.h"
|
#include "gen/embedded/DFUHelperDeviceInfo-minified.h"
|
||||||
#include "sequence.hpp"
|
#include "sequence.hpp"
|
||||||
|
|
||||||
DfuSequence ParseSequence(const std::string& deviceKey)
|
DfuSequence ParseSequence(const std::string& deviceKey)
|
||||||
@@ -36,9 +36,9 @@ DfuSequence ParseSequence(const std::string& deviceKey)
|
|||||||
DfuSequence seq;
|
DfuSequence seq;
|
||||||
|
|
||||||
static nlohmann::json j = nlohmann::json::parse(
|
static nlohmann::json j = nlohmann::json::parse(
|
||||||
embedded_DFUHelperDeviceInfo_json,
|
embedded_DFUHelperDeviceInfo_minified_json,
|
||||||
embedded_DFUHelperDeviceInfo_json +
|
embedded_DFUHelperDeviceInfo_minified_json +
|
||||||
embedded_DFUHelperDeviceInfo_json_len
|
embedded_DFUHelperDeviceInfo_minified_json_len
|
||||||
);
|
);
|
||||||
|
|
||||||
auto itMap = j["devicemap"].find(deviceKey);
|
auto itMap = j["devicemap"].find(deviceKey);
|
||||||
|
|||||||
Reference in new issue
Block a user