From ff50a61a1b37219c93ff0bba9e4931143c5497e3 Mon Sep 17 00:00:00 2001 From: CLARATION Date: Sat, 20 Jun 2026 21:14:11 -0700 Subject: [PATCH] fix: dont use unvalid unicode chars --- .github/workflows/build.yml | 66 +++++++++++++++++++ .../0001-include-windows-header.patch | 12 ++++ resources/DFUHelperDeviceInfo.json | 32 ++++----- src/wx/AppFrame.cpp | 7 +- 4 files changed, 100 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 patches/libimobiledevice/0001-include-windows-header.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..40faa4b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,66 @@ +name: "Build" + +on: + workflow_dispatch: + +jobs: + linux: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: "Install dependencies" + run: | + sudo apt update + sudo apt install -y build-essential cmake autoconf automake libtool pkg-config ninja-build + + - name: "Build palera1n" + run: | + make palera1n WITH_STATIC=1 WITH_GUI=1 + + macos: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v4 + + - name: "Install dependencies" + run: | + brew update + brew install cmake autoconf automake libtool pkg-config + + - name: "Build palera1n" + run: | + make palera1n WITH_STATIC=1 WITH_GUI=1 + + windows: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + install: > + git + mingw-w64-x86_64-gcc + mingw-w64-x86_64-curl + mingw-w64-x86_64-cmake + libtool + openssl + openssl-devel + python-devel + pkgconf + autoconf + automake + make + zip + update: true + + - name: "Build palera1n" + run: | + make palera1n_mingw WITH_STATIC=1 WITH_GUI=1 + \ No newline at end of file diff --git a/patches/libimobiledevice/0001-include-windows-header.patch b/patches/libimobiledevice/0001-include-windows-header.patch new file mode 100644 index 0000000..8746f12 --- /dev/null +++ b/patches/libimobiledevice/0001-include-windows-header.patch @@ -0,0 +1,12 @@ +--- a/src/notification_proxy.c 2026-06-19 21:43:36 ++++ b/src/notification_proxy.c 2026-06-20 16:44:12 +@@ -31,7 +31,8 @@ + #include "property_list_service.h" + #include "common/debug.h" + +-#ifdef WIN32 ++#ifdef _WIN32 ++#include + #define sleep(x) Sleep(x*1000) + #endif + diff --git a/resources/DFUHelperDeviceInfo.json b/resources/DFUHelperDeviceInfo.json index dcf9666..e852978 100644 --- a/resources/DFUHelperDeviceInfo.json +++ b/resources/DFUHelperDeviceInfo.json @@ -85,12 +85,12 @@ "image_offset_x":100, "buttons":{ "top":{ - "name":"– Top button", + "name":"- Top button", "x":192, "y":-4 }, "vol_down":{ - "name":"Volume down –", + "name":"Volume down -", "x":8, "y":62 } @@ -104,12 +104,12 @@ "image_offset_x":100, "buttons":{ "top":{ - "name":"– Top button", + "name":"- Top button", "x":196, "y":-4 }, "home":{ - "name":"Home button –", + "name":"Home button -", "x":50, "y":210 } @@ -123,12 +123,12 @@ "image_offset_x":100, "buttons":{ "top":{ - "name":"– Top button", + "name":"- Top button", "x":200, "y":-4 }, "home":{ - "name":"Home button –", + "name":"Home button -", "x":56, "y":210 } @@ -142,12 +142,12 @@ "image_offset_x":100, "buttons":{ "side":{ - "name":"– Side button", + "name":"- Side button", "x":224, "y":58 }, "home":{ - "name":"Home button –", + "name":"Home button -", "x":60, "y":210 } @@ -161,12 +161,12 @@ "image_offset_x":100, "buttons":{ "side":{ - "name":"– Side button", + "name":"- Side button", "x":224, "y":58 }, "vol_down":{ - "name":"Volume down –", + "name":"Volume down -", "x":14, "y":78 } @@ -180,12 +180,12 @@ "image_offset_x":100, "buttons":{ "side":{ - "name":"– Side button", + "name":"- Side button", "x":220, "y":58 }, "vol_down":{ - "name":"Volume down –", + "name":"Volume down -", "x":10, "y":78 } @@ -199,12 +199,12 @@ "image_offset_x":100, "buttons":{ "side":{ - "name":"– Side button", + "name":"- Side button", "x":220, "y":68 }, "vol_down":{ - "name":"Volume down –", + "name":"Volume down -", "x":10, "y":75 } @@ -254,12 +254,12 @@ "image_offset_x":120, "buttons":{ "menu":{ - "name":"Menu –", + "name":"Menu -", "x":84, "y":84 }, "playpause":{ - "name":"Play/Pause –", + "name":"Play/Pause -", "x":52, "y":146 } diff --git a/src/wx/AppFrame.cpp b/src/wx/AppFrame.cpp index 2fb590a..d17c367 100644 --- a/src/wx/AppFrame.cpp +++ b/src/wx/AppFrame.cpp @@ -12,6 +12,11 @@ #include #include +#ifdef _WIN32 +# include +# define sleep(x) Sleep(x*1000) +#endif + wxDEFINE_EVENT(EVT_DEVICE_STATE_UPDATE, wxCommandEvent); void send_device_state(MainFrame* frame, const DeviceState& state) @@ -26,7 +31,7 @@ void send_device_state(MainFrame* frame, const DeviceState& state) MainFrame::MainFrame() : wxFrame(nullptr, wxID_ANY, - "palera1n – Version beta " + wxString(PALERAIN_VERSION), + "palera1n - Version beta " + wxString(PALERAIN_VERSION), wxDefaultPosition, wxSize(480, 360), wxDEFAULT_FRAME_STYLE & ~(wxMAXIMIZE_BOX | wxRESIZE_BORDER))