Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42d6506f38 | ||
|
|
3b34c2bbac | ||
|
|
18ba8fb35f | ||
|
|
00a223a5bc | ||
|
|
f4dc9127c7 | ||
|
|
dfa033f366 | ||
|
|
8a47c8ce8a | ||
|
|
af06958989 | ||
|
|
9a04802afb | ||
|
|
d8f473e204 | ||
|
|
bdbf37c55b | ||
|
|
9326867936 | ||
|
|
493cf0ca42 | ||
|
|
bd0ed7a600 | ||
|
|
4cec4b0d4a | ||
|
|
1cd33432d9 | ||
|
|
2bd56599e7 | ||
|
|
6b9789ca3a | ||
|
|
042d3c4f8b | ||
|
|
cc0e8d5af7 | ||
|
|
ba4b75362e | ||
|
|
9126bc5f7e | ||
|
|
b335aadce8 | ||
|
|
4a9a2f68f1 |
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
* text=auto eol=lf
|
||||||
@@ -13,12 +13,15 @@ on:
|
|||||||
- CMakeLists.txt
|
- CMakeLists.txt
|
||||||
- Makefile
|
- Makefile
|
||||||
|
|
||||||
|
env:
|
||||||
|
TAG: ${{ github.ref_name }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-loader:
|
build-loader:
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
ref: 9faf50968854aa47de65231e2985d60f6944d627
|
ref: 9faf50968854aa47de65231e2985d60f6944d627
|
||||||
repository: palera1n/loader
|
repository: palera1n/loader
|
||||||
@@ -28,7 +31,7 @@ jobs:
|
|||||||
brew install gnu-sed
|
brew install gnu-sed
|
||||||
|
|
||||||
- name: Select correct Xcode
|
- name: Select correct Xcode
|
||||||
uses: mobiledevops/xcode-select-version-action@7b50160de7c8bd6a8c4ee2c2e6b5ee0983886c0b
|
uses: mobiledevops/xcode-select-version-action@7b50160de7c8bd6a8c4ee2c2e6b5ee0983886c0b # v1.1.0
|
||||||
with:
|
with:
|
||||||
xcode-select-version: 16.4
|
xcode-select-version: 16.4
|
||||||
|
|
||||||
@@ -39,9 +42,9 @@ jobs:
|
|||||||
make package PLATFORM=appletvos PACKAGE_NAME=palera1nLoaderTV
|
make package PLATFORM=appletvos PACKAGE_NAME=palera1nLoaderTV
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: loader
|
name: _loader
|
||||||
path: |
|
path: |
|
||||||
packages/*
|
packages/*
|
||||||
|
|
||||||
@@ -50,19 +53,19 @@ jobs:
|
|||||||
needs: [build-loader]
|
needs: [build-loader]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
ref: 7e1f6e122c3a45fc45e939293c7e2eaa1889731f
|
ref: 7e1f6e122c3a45fc45e939293c7e2eaa1889731f
|
||||||
repository: palera1n/jbinit
|
repository: palera1n/jbinit
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Download loader artifacts
|
- name: Download loader artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: loader
|
name: _loader
|
||||||
|
|
||||||
- name: Select correct Xcode
|
- name: Select correct Xcode
|
||||||
uses: mobiledevops/xcode-select-version-action@7b50160de7c8bd6a8c4ee2c2e6b5ee0983886c0b
|
uses: mobiledevops/xcode-select-version-action@7b50160de7c8bd6a8c4ee2c2e6b5ee0983886c0b # v1.1.0
|
||||||
with:
|
with:
|
||||||
xcode-select-version: 16.4
|
xcode-select-version: 16.4
|
||||||
|
|
||||||
@@ -87,9 +90,9 @@ jobs:
|
|||||||
mv src/binpack.dmg upload/
|
mv src/binpack.dmg upload/
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: embedded
|
name: _embedded
|
||||||
path: |
|
path: |
|
||||||
upload/*
|
upload/*
|
||||||
|
|
||||||
@@ -97,7 +100,7 @@ jobs:
|
|||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
ref: e98323f8a09abd80fc4cbcd74dee023b91a1ec22
|
ref: e98323f8a09abd80fc4cbcd74dee023b91a1ec22
|
||||||
repository: palera1n/PongoOS
|
repository: palera1n/PongoOS
|
||||||
@@ -117,9 +120,9 @@ jobs:
|
|||||||
mv build/checkra1n-kpf-pongo upload/
|
mv build/checkra1n-kpf-pongo upload/
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: pongo
|
name: _pongo
|
||||||
path: |
|
path: |
|
||||||
upload/*
|
upload/*
|
||||||
|
|
||||||
@@ -136,21 +139,21 @@ jobs:
|
|||||||
- aarch64-linux-musl
|
- aarch64-linux-musl
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Download Pongo
|
- name: Download Pongo
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: pongo
|
name: _pongo
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name: Download embedded artifacts
|
- name: Download embedded artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: embedded
|
name: _embedded
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name: Download musl toolchain
|
- name: Download musl toolchain
|
||||||
@@ -220,12 +223,59 @@ jobs:
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-${{ matrix.triple }}
|
name: palera1n-${{ matrix.triple }}
|
||||||
path: |
|
path: |
|
||||||
build/*.tar.gz
|
build/*.tar.gz
|
||||||
|
|
||||||
|
build-linux-appimage:
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
needs: [build-pongo, build-ramdisk]
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
fail-fast: true
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: ubuntu-24.04
|
||||||
|
arch: x86_64
|
||||||
|
- os: ubuntu-24.04-arm
|
||||||
|
arch: aarch64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
- name: Download Pongo
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
|
with:
|
||||||
|
name: _pongo
|
||||||
|
path: embedded/
|
||||||
|
|
||||||
|
- name: Download embedded artifacts
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
|
with:
|
||||||
|
name: _embedded
|
||||||
|
path: embedded/
|
||||||
|
|
||||||
|
- name: Install dependencies (apt)
|
||||||
|
run: |
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y build-essential cmake autoconf automake libtool pkg-config zstd jq libwxgtk3.2-dev
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
make package WITH_GUI=1 WITH_TUI=1 WITH_CIDERRAIN=1 BUILD_TYPE=Release JOBS=$(nproc)
|
||||||
|
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
|
with:
|
||||||
|
name: palera1n-${{ matrix.arch }}-linux-gui
|
||||||
|
path: |
|
||||||
|
build/*.AppImage
|
||||||
|
|
||||||
build-macos:
|
build-macos:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: [build-pongo, build-ramdisk]
|
needs: [build-pongo, build-ramdisk]
|
||||||
@@ -239,21 +289,21 @@ jobs:
|
|||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Download Pongo
|
- name: Download Pongo
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: pongo
|
name: _pongo
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name : Download embedded artifacts
|
- name : Download embedded artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: embedded
|
name: _embedded
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name: Install dependencies (brew)
|
- name: Install dependencies (brew)
|
||||||
@@ -271,7 +321,7 @@ jobs:
|
|||||||
cd build && zip -r palera1n-macos-${{ matrix.arch }}.zip palera1n.app
|
cd build && zip -r palera1n-macos-${{ matrix.arch }}.zip palera1n.app
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-macos-${{ matrix.arch }}
|
name: palera1n-macos-${{ matrix.arch }}
|
||||||
path: |
|
path: |
|
||||||
@@ -282,27 +332,27 @@ jobs:
|
|||||||
needs: [build-pongo, build-ramdisk]
|
needs: [build-pongo, build-ramdisk]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
token: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
- name: Setup Procursus
|
- name: Setup Procursus
|
||||||
uses: beerpiss/[email protected]
|
uses: beerpiss/procursus-action@fbd8e4db6742ffc2c300b4995587a57bcb66654b # v2.0.2
|
||||||
with:
|
with:
|
||||||
cache: true
|
cache: true
|
||||||
mirror: 'https://apt.procurs.us/'
|
mirror: 'https://apt.procurs.us/'
|
||||||
|
|
||||||
- name: Download Pongo
|
- name: Download Pongo
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: pongo
|
name: _pongo
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name : Download embedded artifacts
|
- name : Download embedded artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: embedded
|
name: _embedded
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name: Install dependencies (brew)
|
- name: Install dependencies (brew)
|
||||||
@@ -312,9 +362,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
gmake palera1n_xcode PLATFORM=iphoneos WITH_STATIC=1 WITH_CIDERRAIN=1 BUILD_TYPE=Release JOBS=$(sysctl -n hw.ncpu)
|
gmake palera1n PLATFORM=iphoneos WITH_STATIC=1 WITH_CIDERRAIN=1 BUILD_TYPE=Release JOBS=$(sysctl -n hw.ncpu)
|
||||||
cmake --build build
|
|
||||||
codesign --force --sign - --entitlements resources/entitlements.xml build/Debug-iphoneos/palera1n.app/palera1n
|
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: |
|
run: |
|
||||||
@@ -328,8 +376,8 @@ jobs:
|
|||||||
mkdir -p palera1n-iphoneos-arm/DEBIAN
|
mkdir -p palera1n-iphoneos-arm/DEBIAN
|
||||||
tar -xf palera1n-iphoneos-arm64.tar.gz -C palera1n-iphoneos-arm64
|
tar -xf palera1n-iphoneos-arm64.tar.gz -C palera1n-iphoneos-arm64
|
||||||
tar -xf palera1n-iphoneos-arm.tar.gz -C palera1n-iphoneos-arm
|
tar -xf palera1n-iphoneos-arm.tar.gz -C palera1n-iphoneos-arm
|
||||||
cp ../packaging/control palera1n-iphoneos-arm64/DEBIAN/control
|
cp ../resources/control palera1n-iphoneos-arm64/DEBIAN/control
|
||||||
cp ../packaging/control palera1n-iphoneos-arm/DEBIAN/control
|
cp ../resources/control palera1n-iphoneos-arm/DEBIAN/control
|
||||||
|
|
||||||
VERSION=$(grep '^#define PALERAIN_VERSION' ../src/globals.h | cut -d'"' -f2 | tr -cd '0-9.')
|
VERSION=$(grep '^#define PALERAIN_VERSION' ../src/globals.h | cut -d'"' -f2 | tr -cd '0-9.')
|
||||||
|
|
||||||
@@ -342,7 +390,7 @@ jobs:
|
|||||||
dpkg-deb --build palera1n-iphoneos-arm
|
dpkg-deb --build palera1n-iphoneos-arm
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-iphoneos-arm64
|
name: palera1n-iphoneos-arm64
|
||||||
path: |
|
path: |
|
||||||
@@ -353,15 +401,15 @@ jobs:
|
|||||||
needs: [build-macos]
|
needs: [build-macos]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: Download arm64 artifacts
|
- name: Download arm64 artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-macos-arm64
|
name: palera1n-macos-arm64
|
||||||
|
|
||||||
- name: Download x86_64 artifacts
|
- name: Download x86_64 artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-macos-x86_64
|
name: palera1n-macos-x86_64
|
||||||
|
|
||||||
@@ -387,8 +435,8 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
create-dmg \
|
create-dmg \
|
||||||
--volname "palera1n-macos-universal" \
|
--volname "palera1n-macos-universal" \
|
||||||
--volicon "packaging/drive.icns" \
|
--volicon "resources/drive.icns" \
|
||||||
--background "packaging/background.png" \
|
--background "resources/background.png" \
|
||||||
--window-pos 200 120 \
|
--window-pos 200 120 \
|
||||||
--window-size 510 350 \
|
--window-size 510 350 \
|
||||||
--icon-size 100 \
|
--icon-size 100 \
|
||||||
@@ -398,131 +446,150 @@ jobs:
|
|||||||
dist/palera1n-macos-universal.dmg dist/palera1n-macos-universal
|
dist/palera1n-macos-universal.dmg dist/palera1n-macos-universal
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-macos-universal
|
name: palera1n-macos-universal
|
||||||
path: |
|
path: |
|
||||||
dist/palera1n-macos-universal.dmg
|
dist/palera1n-macos-universal.dmg
|
||||||
|
|
||||||
build-windows:
|
# build-windows:
|
||||||
runs-on: windows-latest
|
# runs-on: windows-latest
|
||||||
needs: [build-pongo, build-ramdisk]
|
# needs: [build-pongo, build-ramdisk]
|
||||||
|
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v4
|
# - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||||
|
|
||||||
- name: Download Pongo
|
# - name: Download Pongo
|
||||||
uses: actions/download-artifact@v4
|
# uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
# with:
|
||||||
name: pongo
|
# name: _pongo
|
||||||
path: embedded/
|
# path: embedded/
|
||||||
|
|
||||||
- name: Download embedded artifacts
|
# - name: Download embedded artifacts
|
||||||
uses: actions/download-artifact@v4
|
# uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
# with:
|
||||||
name: embedded
|
# name: _embedded
|
||||||
path: embedded/
|
# path: embedded/
|
||||||
|
|
||||||
- name: Install dependencies (choco)
|
# - name: Install dependencies (choco)
|
||||||
run: choco install nsis.portable
|
# run: choco install nsis.portable
|
||||||
|
|
||||||
- name: Install dependencies (msys2)
|
# - name: Install dependencies (msys2)
|
||||||
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884
|
# uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
|
||||||
with:
|
# with:
|
||||||
msystem: MINGW64
|
# msystem: MINGW64
|
||||||
install: >
|
# install: >
|
||||||
git
|
# git
|
||||||
mingw-w64-x86_64-toolchain
|
# mingw-w64-x86_64-toolchain
|
||||||
mingw-w64-x86_64-cmake
|
# mingw-w64-x86_64-cmake
|
||||||
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
|
# mingw-w64-x86_64-jq
|
||||||
libtool
|
# libtool
|
||||||
openssl
|
# openssl
|
||||||
openssl-devel
|
# openssl-devel
|
||||||
python-devel
|
# python-devel
|
||||||
autoconf
|
# autoconf
|
||||||
automake
|
# automake
|
||||||
zip
|
# zip
|
||||||
vim
|
# vim
|
||||||
make
|
# make
|
||||||
patch
|
# patch
|
||||||
update: true
|
# update: true
|
||||||
|
|
||||||
- name: Build
|
# - name: Build
|
||||||
shell: msys2 {0}
|
# shell: msys2 {0}
|
||||||
run: |
|
# run: |
|
||||||
make palera1n_mingw WITH_STATIC=1 WITH_GUI=1 BUILD_TYPE=Release JOBS=$(nproc)
|
# make palera1n_mingw WITH_STATIC=1 WITH_GUI=1 BUILD_TYPE=Release JOBS=$(nproc)
|
||||||
strip -s build/palera1n.exe
|
# strip -s build/palera1n.exe
|
||||||
|
|
||||||
- name: Package
|
# - name: Package
|
||||||
run: |
|
# run: |
|
||||||
cd build && cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-windows-x86_64-setup"
|
# cd build && cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-windows-x86_64-setup"
|
||||||
|
|
||||||
- name: Upload
|
# - name: Upload
|
||||||
uses: actions/upload-artifact@v4
|
# uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
with:
|
# with:
|
||||||
name: palera1n-windows-x86_64
|
# name: palera1n-windows-x86_64
|
||||||
path: |
|
# path: |
|
||||||
build/palera1n-windows-x86_64-setup.exe
|
# build/palera1n-windows-x86_64-setup.exe
|
||||||
|
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
||||||
needs: [build-ramdisk, build-pongo, build-linux, build-macos-universal, build-windows, build-ios]
|
needs: [
|
||||||
|
build-ramdisk,
|
||||||
|
build-pongo,
|
||||||
|
build-linux,
|
||||||
|
build-macos-universal,
|
||||||
|
# build-windows,
|
||||||
|
build-ios
|
||||||
|
]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download embedded artifacts
|
- name: Download embedded artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: embedded
|
name: _embedded
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name: Download Pongo
|
- name: Download Pongo
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: pongo
|
name: _pongo
|
||||||
path: embedded/
|
path: embedded/
|
||||||
|
|
||||||
- name: Download Linux i486 Artifact
|
- name: Download Linux i486 Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-i486-linux-musl
|
name: palera1n-i486-linux-musl
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
- name: Download Linux x86_64 Artifact
|
- name: Download Linux x86_64 Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-x86_64-linux-musl
|
name: palera1n-x86_64-linux-musl
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
- name: Download Linux armel Artifact
|
- name: Download Linux armel Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-armel-linux-musleabi
|
name: palera1n-armel-linux-musleabi
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
|
- name: Download Linux x86_64 AppImage Artifact
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
|
with:
|
||||||
|
name: palera1n-x86_64-linux-gui
|
||||||
|
path: dist/
|
||||||
|
|
||||||
|
- name: Download Linux aarch64 AppImage Artifact
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
|
with:
|
||||||
|
name: palera1n-aarch64-linux-gui
|
||||||
|
path: dist/
|
||||||
|
|
||||||
- name: Download Linux aarch64 Artifact
|
- name: Download Linux aarch64 Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-aarch64-linux-musl
|
name: palera1n-aarch64-linux-musl
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
- name: Download macOS Universal Artifact
|
- name: Download macOS Universal Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-macos-universal
|
name: palera1n-macos-universal
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
# - name: Download Windows Artifact
|
# - name: Download Windows Artifact
|
||||||
# uses: actions/download-artifact@v4
|
# uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
# with:
|
# with:
|
||||||
# name: palera1n-windows-x86_64
|
# name: palera1n-windows-x86_64
|
||||||
# path: dist/
|
# path: dist/
|
||||||
|
|
||||||
- name: Download iOS Artifact
|
- name: Download iOS Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 8.0.1
|
||||||
with:
|
with:
|
||||||
name: palera1n-iphoneos-arm64
|
name: palera1n-iphoneos-arm64
|
||||||
path: dist/
|
path: dist/
|
||||||
@@ -532,18 +599,24 @@ jobs:
|
|||||||
find . -maxdepth 1 -type f -print0 | tar --null -czf ../dist/resource.tar.gz --files-from=-
|
find . -maxdepth 1 -type f -print0 | tar --null -czf ../dist/resource.tar.gz --files-from=-
|
||||||
working-directory: embedded
|
working-directory: embedded
|
||||||
|
|
||||||
- name: Extract Version
|
|
||||||
id: get_version
|
|
||||||
run: |
|
|
||||||
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65
|
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v3.0.2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.get_version.outputs.version }}
|
name: ${{ env.TAG }}
|
||||||
tag_name: ${{ steps.get_version.outputs.version }}
|
tag_name: ${{ env.TAG }}
|
||||||
files: |
|
files: |
|
||||||
dist/*
|
dist/*
|
||||||
|
body: |
|
||||||
|
## What's Changed
|
||||||
|
|
||||||
|
<!-- auto generated -->
|
||||||
|
|
||||||
|
## Files
|
||||||
|
|
||||||
|
- `palera1n-iphoneos-${arch}.deb`: Palera1n for iOS jailbroken environments.
|
||||||
|
- `palera1n-linux-${arch}.tar.gz`: Palera1n for Linux on CPU architecture `${arch}`.
|
||||||
|
- `palera1n-macos-universal.dmg`: Palera1n for macOS 10.11+.
|
||||||
|
- `resources.tar.gz`: Precompiled embedded artifacts used for compiling this tool.
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
draft: true
|
draft: true
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ on:
|
|||||||
description: "palera1n tag"
|
description: "palera1n tag"
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
|
||||||
@@ -25,12 +24,6 @@ jobs:
|
|||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
gh release download "${{ env.TAG }}"
|
gh release download "${{ env.TAG }}"
|
||||||
|
|
||||||
if [ ! -f "palera1n-iphoneos-arm64.deb" ] || [ ! -f "palera1n-iphoneos-arm.deb" ]; then
|
|
||||||
echo "Debs not found :/"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p cdn-upload
|
mkdir -p cdn-upload
|
||||||
cp *.tar.gz cdn-upload/
|
cp *.tar.gz cdn-upload/
|
||||||
cp *.deb cdn-upload/
|
cp *.deb cdn-upload/
|
||||||
@@ -45,10 +38,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git clone https://$USERNAME:[email protected]/$GH_REPO.git repo-upload
|
git clone https://$USERNAME:[email protected]/$GH_REPO.git repo-upload
|
||||||
|
|
||||||
ARM64_HASH=$(sha256sum palera1n-iphoneos-arm64.deb | cut -c1-8)
|
rm -rf repo-upload/dists/stable/main/binary-iphoneos-arm{,64}/palera1n*.deb
|
||||||
ARM_HASH=$(sha256sum palera1n-iphoneos-arm.deb | cut -c1-8)
|
cp palera1n-iphoneos-arm64.deb repo-upload/pool/iphoneos-arm64/palera1n-iphoneos-arm64.deb
|
||||||
cp palera1n-iphoneos-arm64.deb repo-upload/pool/iphoneos-arm64/palera1n_${{ env.TAG }}_${ARM64_HASH}_iphoneos-arm64.deb
|
cp palera1n-iphoneos-arm.deb repo-upload/pool/iphoneos-arm/palera1n-iphoneos-arm.deb
|
||||||
cp palera1n-iphoneos-arm.deb repo-upload/pool/iphoneos-arm/palera1n_${{ env.TAG }}_${ARM_HASH}_iphoneos-arm.deb
|
|
||||||
|
|
||||||
cd repo-upload
|
cd repo-upload
|
||||||
|
|
||||||
@@ -78,6 +70,7 @@ jobs:
|
|||||||
USERNAME: GitHub-Actions
|
USERNAME: GitHub-Actions
|
||||||
API_TOKEN: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
API_TOKEN: ${{ secrets.BUILD_GITHUB_TOKEN }}
|
||||||
GH_REPO: palera1n/palen1x
|
GH_REPO: palera1n/palen1x
|
||||||
|
BRANCH: Alpine
|
||||||
run: |
|
run: |
|
||||||
git clone https://$USERNAME:[email protected]/$GH_REPO.git tag
|
git clone https://$USERNAME:[email protected]/$GH_REPO.git tag
|
||||||
cd tag
|
cd tag
|
||||||
@@ -86,7 +79,7 @@ jobs:
|
|||||||
git config --global user.email "[email protected]"
|
git config --global user.email "[email protected]"
|
||||||
|
|
||||||
git commit --allow-empty -m "bump to ${{ env.TAG }}"
|
git commit --allow-empty -m "bump to ${{ env.TAG }}"
|
||||||
git push https://$USERNAME:[email protected]/$GH_REPO.git Alpine
|
git push https://$USERNAME:[email protected]/$GH_REPO.git "$BRANCH"
|
||||||
|
|
||||||
git tag "${{ env.TAG }}"
|
git tag "${{ env.TAG }}"
|
||||||
git push https://$USERNAME:[email protected]/$GH_REPO.git "${{ env.TAG }}"
|
git push https://$USERNAME:[email protected]/$GH_REPO.git "${{ env.TAG }}"
|
||||||
@@ -11,6 +11,7 @@ embedded/binpack.dmg
|
|||||||
embedded/DFUHelperDeviceInfo-minified.json
|
embedded/DFUHelperDeviceInfo-minified.json
|
||||||
|
|
||||||
apple-include-*
|
apple-include-*
|
||||||
|
*-unknown-*
|
||||||
libusbK/
|
libusbK/
|
||||||
libusbK-tmp/
|
libusbK-tmp/
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,14 @@ FetchContent_MakeAvailable(nlohmann_json)
|
|||||||
# MARK: TARGET
|
# MARK: TARGET
|
||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
|
message(STATUS "========================")
|
||||||
|
message(STATUS "Using XXD on this shit!!!")
|
||||||
|
message(STATUS "========================")
|
||||||
|
include(cmake/Xxd.cmake)
|
||||||
|
if(IOS)
|
||||||
|
include(cmake/AppleHeaders.cmake)
|
||||||
|
endif()
|
||||||
|
|
||||||
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
|
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
|
||||||
"src/*.cpp"
|
"src/*.cpp"
|
||||||
"src/*.c"
|
"src/*.c"
|
||||||
@@ -93,13 +101,14 @@ file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
|
|||||||
)
|
)
|
||||||
|
|
||||||
if((APPLE AND NOT IOS) AND WITH_GUI)
|
if((APPLE AND NOT IOS) AND WITH_GUI)
|
||||||
set(APP_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/palera1n.icns")
|
set(APP_ICON "${CMAKE_CURRENT_SOURCE_DIR}/resources/AppIcon.icns")
|
||||||
|
set(APP_ICON_CAR "${CMAKE_CURRENT_SOURCE_DIR}/resources/Assets.car")
|
||||||
add_executable(palera1n MACOSX_BUNDLE ${SOURCES})
|
add_executable(palera1n MACOSX_BUNDLE ${SOURCES})
|
||||||
target_sources(palera1n PRIVATE ${APP_ICON})
|
target_sources(palera1n PRIVATE ${APP_ICON} ${APP_ICON_CAR})
|
||||||
set_source_files_properties(${APP_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
set_source_files_properties(${APP_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||||
|
set_source_files_properties(${APP_ICON_CAR} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||||
set_target_properties(palera1n PROPERTIES
|
set_target_properties(palera1n PROPERTIES
|
||||||
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist"
|
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/resources/Info.plist"
|
||||||
MACOSX_BUNDLE_ICON_FILE palera1n.icns
|
|
||||||
)
|
)
|
||||||
elseif(IOS)
|
elseif(IOS)
|
||||||
add_executable(palera1n MACOSX_BUNDLE ${SOURCES})
|
add_executable(palera1n MACOSX_BUNDLE ${SOURCES})
|
||||||
@@ -336,7 +345,7 @@ else()
|
|||||||
target_link_libraries(palera1n PRIVATE ${CURSES_LIBRARIES})
|
target_link_libraries(palera1n PRIVATE ${CURSES_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE AND NOT CIDERRAIN)
|
if(NOT APPLE AND NOT WITH_CIDERRAIN)
|
||||||
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
pkg_check_modules(LIBUSB REQUIRED libusb-1.0)
|
||||||
target_include_directories(palera1n PRIVATE ${LIBUSB_INCLUDE_DIRS})
|
target_include_directories(palera1n PRIVATE ${LIBUSB_INCLUDE_DIRS})
|
||||||
target_link_libraries(palera1n PRIVATE ${LIBUSB_LIBRARIES})
|
target_link_libraries(palera1n PRIVATE ${LIBUSB_LIBRARIES})
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
.PHONY: apple-include payloads palera1n palera1n_xcode palera1n_mingw clean
|
.PHONY: all clean
|
||||||
|
|
||||||
# TODO: get rid of this makefile, this is too complicated
|
|
||||||
|
|
||||||
WITH_GUI ?= 0
|
WITH_GUI ?= 0
|
||||||
WITH_TUI ?= 0
|
WITH_TUI ?= 0
|
||||||
@@ -12,148 +10,63 @@ BUILD_TYPE ?= Debug
|
|||||||
|
|
||||||
CMAKE_SYSROOT ?=
|
CMAKE_SYSROOT ?=
|
||||||
CROSS_HOST_TRIPLE ?=
|
CROSS_HOST_TRIPLE ?=
|
||||||
JOBS ?=
|
JOBS ?= 1
|
||||||
|
|
||||||
PLATFORM ?= host
|
PLATFORM ?= host
|
||||||
|
|
||||||
UNAME_S := $(shell uname -s)
|
UNAME_S := $(shell uname -s)
|
||||||
|
|
||||||
BUILD_ARGS :=
|
|
||||||
ifneq ($(strip $(JOBS)),)
|
|
||||||
BUILD_ARGS += --parallel $(JOBS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),ios)
|
|
||||||
PLATFORM := iphoneos
|
|
||||||
endif
|
|
||||||
TARGET_SYSROOT :=
|
|
||||||
MACOSX_SYSROOT := $(shell xcrun --sdk macosx --show-sdk-path)
|
|
||||||
CUSTOM_INCLUDE_PATH := apple-include-$(PLATFORM)
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),iphoneos)
|
ifeq ($(PLATFORM),iphoneos)
|
||||||
ifneq ($(UNAME_S),Darwin)
|
ifneq ($(UNAME_S),Darwin)
|
||||||
$(error iOS builds require macOS/Xcode)
|
$(error iOS targets are only supported on macOS)
|
||||||
endif
|
|
||||||
EXTRA_TARGETS = apple-include
|
|
||||||
TARGET_SYSROOT := $(shell xcrun --sdk iphoneos --show-sdk-path)
|
|
||||||
else ifeq ($(PLATFORM),macos)
|
|
||||||
ifneq ($(UNAME_S),Darwin)
|
|
||||||
$(error macOS SDK builds require macOS/Xcode)
|
|
||||||
endif
|
|
||||||
TARGET_SYSROOT := $(shell xcrun --sdk macosx --show-sdk-path)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CMAKE_COMMON_ARGS := \
|
CMAKE_GENERATOR := -G Xcode
|
||||||
|
APPLE_SYSROOT := $(shell xcrun --sdk iphoneos --show-sdk-path)
|
||||||
|
|
||||||
|
CMAKE_PLATFORM_ARGS := \
|
||||||
|
-DCMAKE_SYSTEM_NAME=iOS \
|
||||||
|
-DCMAKE_OSX_SYSROOT="$(APPLE_SYSROOT)" \
|
||||||
|
-DCMAKE_OSX_ARCHITECTURES=arm64
|
||||||
|
|
||||||
|
else ifeq ($(UNAME_S),Windows_NT)
|
||||||
|
CMAKE_GENERATOR := -G "MinGW Makefiles"
|
||||||
|
else
|
||||||
|
CMAKE_GENERATOR :=
|
||||||
|
endif
|
||||||
|
|
||||||
|
CMAKE_ARGS := \
|
||||||
|
$(CMAKE_GENERATOR) \
|
||||||
-DCMAKE_SYSROOT="$(CMAKE_SYSROOT)" \
|
-DCMAKE_SYSROOT="$(CMAKE_SYSROOT)" \
|
||||||
-DCROSS_HOST_TRIPLE="$(CROSS_HOST_TRIPLE)" \
|
-DCROSS_HOST_TRIPLE="$(CROSS_HOST_TRIPLE)" \
|
||||||
-DCMAKE_BUILD_TYPE=$(BUILD_TYPE) \
|
-DCMAKE_BUILD_TYPE="$(BUILD_TYPE)" \
|
||||||
-DWITH_GUI=$(WITH_GUI) \
|
-DWITH_GUI=$(WITH_GUI) \
|
||||||
-DWITH_TUI=$(WITH_TUI) \
|
-DWITH_TUI=$(WITH_TUI) \
|
||||||
-DWITH_RAMDISK=$(WITH_RAMDISK) \
|
-DWITH_RAMDISK=$(WITH_RAMDISK) \
|
||||||
-DWITH_BINPACK=$(WITH_BINPACK) \
|
-DWITH_BINPACK=$(WITH_BINPACK) \
|
||||||
|
-DWITH_STATIC=$(WITH_STATIC) \
|
||||||
-DWITH_CIDERRAIN=$(WITH_CIDERRAIN) \
|
-DWITH_CIDERRAIN=$(WITH_CIDERRAIN) \
|
||||||
-DWITH_STATIC=$(WITH_STATIC)
|
$(CMAKE_PLATFORM_ARGS)
|
||||||
|
|
||||||
CMAKE_APPLE_ARGS :=
|
ifneq ($(strip $(JOBS)),)
|
||||||
|
BUILD_ARGS := --parallel $(JOBS)
|
||||||
ifeq ($(PLATFORM),iphoneos)
|
|
||||||
|
|
||||||
CMAKE_APPLE_ARGS := \
|
|
||||||
-DCMAKE_SYSTEM_NAME=iOS \
|
|
||||||
-DCMAKE_OSX_SYSROOT="$(TARGET_SYSROOT)" \
|
|
||||||
-DCMAKE_OSX_ARCHITECTURES=arm64 \
|
|
||||||
-DCMAKE_OSX_DEPLOYMENT_TARGET=15.0
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),macos)
|
|
||||||
|
|
||||||
CMAKE_APPLE_ARGS := \
|
|
||||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
|
||||||
-DCMAKE_OSX_SYSROOT="$(TARGET_SYSROOT)"
|
|
||||||
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(PLATFORM),iphoneos)
|
|
||||||
APPLE_INCLUDE_DEP := apple-include
|
|
||||||
else
|
|
||||||
APPLE_INCLUDE_DEP :=
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
all: palera1n
|
all: palera1n
|
||||||
|
|
||||||
apple-include:
|
palera1n:
|
||||||
mkdir -p $(CUSTOM_INCLUDE_PATH)/{bsm,objc,os/internal,sys,firehose,CoreFoundation,FSEvents,IOSurface,IOKit/kext,libkern,kern,arm,{mach/,}machine,CommonCrypto,Security,CoreSymbolication,Kernel/{kern,IOKit,libkern},rpc,rpcsvc,xpc/private,ktrace,mach-o,dispatch}
|
@cmake -S . -B build $(CMAKE_ARGS)
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/{arpa,bsm,hfs,net,xpc,netinet,servers,timeconv.h,launch.h} $(CUSTOM_INCLUDE_PATH)
|
@cmake --build build $(BUILD_ARGS)
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/objc/objc-runtime.h $(CUSTOM_INCLUDE_PATH)/objc
|
ifeq ($(PLATFORM),iphoneos)
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/libkern/{OSDebug.h,OSKextLib.h,OSReturn.h,OSThermalNotification.h,OSTypes.h,machine} $(CUSTOM_INCLUDE_PATH)/libkern
|
@codesign --force --sign - --entitlements resources/entitlements.xml build/Debug-iphoneos/palera1n.app/palera1n
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/kern $(CUSTOM_INCLUDE_PATH)
|
endif
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/sys/{tty*,ptrace,kern*,random,reboot,user,vnode,disk,vmmeter,conf}.h $(CUSTOM_INCLUDE_PATH)/sys
|
|
||||||
cp -af $(MACOSX_SYSROOT)/System/Library/Frameworks/Kernel.framework/Versions/Current/Headers/sys/disklabel.h $(CUSTOM_INCLUDE_PATH)/sys
|
|
||||||
cp -af $(MACOSX_SYSROOT)/System/Library/Frameworks/IOKit.framework/Headers/{AppleConvergedIPCKeys.h,IOBSD.h,IOCFBundle.h,IOCFPlugIn.h,IOCFURLAccess.h,IOKitServer.h,IORPC.h,IOSharedLock.h,IOUserServer.h,audio,avc,firewire,graphics,hid,hidsystem,i2c,iokitmig.h,kext,ndrvsupport,network,ps,pwr_mgt,sbp2,scsi,serial,storage,stream,usb,video} $(CUSTOM_INCLUDE_PATH)/IOKit
|
|
||||||
cp -af $(MACOSX_SYSROOT)/System/Library/Frameworks/Security.framework/Headers/{mds_schema,oidsalg,SecKeychainSearch,certextensions,Authorization,eisl,SecDigestTransform,SecKeychainItem,oidscrl,cssmcspi,CSCommon,cssmaci,SecCode,CMSDecoder,oidscert,SecRequirement,AuthSession,SecReadTransform,oids,cssmconfig,cssmkrapi,SecPolicySearch,SecAccess,cssmtpi,SecACL,SecEncryptTransform,cssmapi,cssmcli,mds,x509defs,oidsbase,SecSignVerifyTransform,cssmspi,cssmkrspi,SecTask,cssmdli,SecAsn1Coder,cssm,SecTrustedApplication,SecCodeHost,SecCustomTransform,oidsattr,SecIdentitySearch,cssmtype,SecAsn1Types,emmtype,SecTransform,SecTrustSettings,SecStaticCode,emmspi,SecTransformReadTransform,SecKeychain,SecDecodeTransform,CodeSigning,AuthorizationPlugin,cssmerr,AuthorizationTags,CMSEncoder,SecEncodeTransform,SecureDownload,SecAsn1Templates,AuthorizationDB,SecCertificateOIDs,cssmapple}.h $(CUSTOM_INCLUDE_PATH)/Security
|
|
||||||
# cp -af $(MACOSX_SYSROOT)/usr/include/{ar,bootstrap,launch,libc,libcharset,localcharset,nlist,NSSystemDirectories,tzfile,vproc}.h $(CUSTOM_INCLUDE_PATH)
|
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/mach/{*.defs,{mach_vm,shared_region}.h} $(CUSTOM_INCLUDE_PATH)/mach
|
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/mach/machine/*.defs $(CUSTOM_INCLUDE_PATH)/mach/machine
|
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/rpc/pmap_clnt.h $(CUSTOM_INCLUDE_PATH)/rpc
|
|
||||||
cp -af $(MACOSX_SYSROOT)/usr/include/rpcsvc/yp{_prot,clnt}.h $(CUSTOM_INCLUDE_PATH)/rpcsvc
|
|
||||||
cp -af $(TARGET_SYSROOT)/usr/include/mach/machine/thread_state.h $(CUSTOM_INCLUDE_PATH)/mach/machine
|
|
||||||
cp -af $(TARGET_SYSROOT)/usr/include/mach/arm $(CUSTOM_INCLUDE_PATH)/mach
|
|
||||||
cp -af $(MACOSX_SYSROOT)/System/Library/Frameworks/IOKit.framework/Headers/* $(CUSTOM_INCLUDE_PATH)/IOKit
|
|
||||||
# gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/stdlib.h > $(CUSTOM_INCLUDE_PATH)/stdlib.h
|
|
||||||
gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/time.h > $(CUSTOM_INCLUDE_PATH)/time.h
|
|
||||||
gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/unistd.h > $(CUSTOM_INCLUDE_PATH)/unistd.h
|
|
||||||
gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/mach/task.h > $(CUSTOM_INCLUDE_PATH)/mach/task.h
|
|
||||||
gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/mach/mach_host.h > $(CUSTOM_INCLUDE_PATH)/mach/mach_host.h
|
|
||||||
gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/ucontext.h > $(CUSTOM_INCLUDE_PATH)/ucontext.h
|
|
||||||
# gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/signal.h > $(CUSTOM_INCLUDE_PATH)/signal.h
|
|
||||||
gsed -E s/'__IOS_PROHIBITED|__TVOS_PROHIBITED|__WATCHOS_PROHIBITED'//g < $(TARGET_SYSROOT)/usr/include/spawn.h > $(CUSTOM_INCLUDE_PATH)/spawn.h
|
|
||||||
gsed -E /'__API_UNAVAILABLE'/d < $(TARGET_SYSROOT)/usr/include/pthread.h > $(CUSTOM_INCLUDE_PATH)/pthread.h
|
|
||||||
gsed -i -E s/'__API_UNAVAILABLE\(.*\)'// $(CUSTOM_INCLUDE_PATH)/IOKit/IOKitLib.h
|
|
||||||
gsed -i -E s/'__API_UNAVAILABLE\(.*\)'// $(CUSTOM_INCLUDE_PATH)/spawn.h
|
|
||||||
gsed -i -E s/'API_UNAVAILABLE\(.*\)'// $(CUSTOM_INCLUDE_PATH)/xpc/*.h
|
|
||||||
gsed -i 's|// __XPC_INDIRECT__|\n#include "$(TARGET_SYSROOT)/usr/include/bsm/audit.h"\n|' $(CUSTOM_INCLUDE_PATH)/xpc/connection.h
|
|
||||||
|
|
||||||
payloads:
|
package: palera1n
|
||||||
mkdir -p src/gen/embedded
|
cpack --config build/CPackConfig.cmake -C $(BUILD_TYPE)
|
||||||
|
|
||||||
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"); \
|
|
||||||
name=$${name%.*}; \
|
|
||||||
echo " XXD $$file"; \
|
|
||||||
echo "#pragma once" > "src/gen/embedded/$$name.h"; \
|
|
||||||
xxd -i "$$file" \
|
|
||||||
| sed 's/unsigned char/static const unsigned char/g' \
|
|
||||||
| sed 's/unsigned int/static const size_t/g' \
|
|
||||||
>> "src/gen/embedded/$$name.h"; \
|
|
||||||
done
|
|
||||||
|
|
||||||
palera1n: payloads $(EXTRA_TARGETS)
|
|
||||||
@cmake -S . -B build \
|
|
||||||
$(CMAKE_COMMON_ARGS) \
|
|
||||||
$(CMAKE_APPLE_ARGS) && \
|
|
||||||
cmake --build build $(BUILD_ARGS)
|
|
||||||
|
|
||||||
palera1n_xcode: $(APPLE_INCLUDE_DEP) payloads
|
|
||||||
@cmake -S . -B build \
|
|
||||||
-G Xcode \
|
|
||||||
$(CMAKE_COMMON_ARGS) \
|
|
||||||
$(CMAKE_APPLE_ARGS)
|
|
||||||
|
|
||||||
palera1n_mingw: payloads
|
|
||||||
@cmake -S . -B build \
|
|
||||||
-G "MinGW Makefiles" \
|
|
||||||
$(CMAKE_COMMON_ARGS) && \
|
|
||||||
cmake --build build $(BUILD_ARGS)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf build src/gen
|
@rm -rf build src/gen apple-include-*
|
||||||
@rm -rf apple-include-*
|
@if [ -d 1stparty/libciderra1n ]; then \
|
||||||
@if [ -d 1stparty/libciderra1n ]; then $(MAKE) -C 1stparty/libciderra1n clean; fi
|
$(MAKE) -C 1stparty/libciderra1n clean; \
|
||||||
|
fi
|
||||||
@$(MAKE) -C 1stparty/libopenra1n clean
|
@$(MAKE) -C 1stparty/libopenra1n clean
|
||||||
|
|
||||||
.PHONY: palera1n palera1n_xcode palera1n_mingw payloads clean
|
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
find_program(BASH_EXECUTABLE bash REQUIRED)
|
||||||
|
find_program(_GSED gsed REQUIRED)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${BASH_EXECUTABLE}"
|
||||||
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/apple-headers.sh"
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
COMMAND_ERROR_IS_FATAL ANY
|
||||||
|
)
|
||||||
@@ -3,7 +3,11 @@
|
|||||||
# =========================
|
# =========================
|
||||||
|
|
||||||
if(LINUX AND NOT MINGW)
|
if(LINUX AND NOT MINGW)
|
||||||
|
if(WITH_GUI)
|
||||||
|
install(TARGETS palera1n RUNTIME DESTINATION usr/bin)
|
||||||
|
else()
|
||||||
install(TARGETS palera1n RUNTIME DESTINATION bin)
|
install(TARGETS palera1n RUNTIME DESTINATION bin)
|
||||||
|
endif()
|
||||||
elseif(IOS)
|
elseif(IOS)
|
||||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Debug-iphoneos/palera1n.app/palera1n" DESTINATION bin)
|
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Debug-iphoneos/palera1n.app/palera1n" DESTINATION bin)
|
||||||
elseif(APPLE AND WITH_GUI)
|
elseif(APPLE AND WITH_GUI)
|
||||||
@@ -31,8 +35,36 @@ elseif(MINGW)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((LINUX AND NOT MINGW) OR IOS OR (APPLE AND NOT IOS AND NOT WITH_GUI))
|
if((LINUX AND NOT MINGW) OR IOS OR (APPLE AND NOT IOS AND NOT WITH_GUI))
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/docs/palera1n.1" DESTINATION share/man/man1)
|
install(FILES "${CMAKE_SOURCE_DIR}/docs/palera1n.1" DESTINATION usr/share/man/man1)
|
||||||
install(FILES "${CMAKE_SOURCE_DIR}/docs/p1ctl.8" DESTINATION share/man/man8)
|
install(FILES "${CMAKE_SOURCE_DIR}/docs/p1ctl.8" DESTINATION usr/share/man/man8)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if((LINUX AND NOT MINGW) OR IOS OR (APPLE AND NOT IOS AND WITH_GUI))
|
||||||
|
include(InstallRequiredSystemLibraries)
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/in.palera.palera1n.desktop"
|
||||||
|
DESTINATION share/applications
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/hicolor/64x64/apps/in.palera.palera1n.png"
|
||||||
|
DESTINATION usr/share/icons/hicolor/64x64/apps
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/hicolor/128x128/apps/in.palera.palera1n.png"
|
||||||
|
DESTINATION usr/share/icons/hicolor/128x128/apps
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/hicolor/256x256/apps/in.palera.palera1n.png"
|
||||||
|
DESTINATION usr/share/icons/hicolor/256x256/apps
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES "${CMAKE_CURRENT_SOURCE_DIR}/resources/icons/hicolor/512x512/apps/in.palera.palera1n.png"
|
||||||
|
DESTINATION usr/share/icons/hicolor/512x512/apps
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CPACK_PACKAGE_NAME "palera1n")
|
set(CPACK_PACKAGE_NAME "palera1n")
|
||||||
@@ -68,7 +100,12 @@ elseif(APPLE AND WITH_GUI)
|
|||||||
else()
|
else()
|
||||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
|
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
|
||||||
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||||
|
if(WITH_GUI)
|
||||||
|
include("${CMAKE_SOURCE_DIR}/cmake/LinuxDeploy.cmake")
|
||||||
|
else()
|
||||||
set(CPACK_GENERATOR "TGZ")
|
set(CPACK_GENERATOR "TGZ")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||||
|
|
||||||
include(CPack)
|
include(CPack)
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
# cmake/LinuxDeploy.cmake
|
||||||
|
|
||||||
|
include(FetchContent)
|
||||||
|
|
||||||
|
if(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|arm64")
|
||||||
|
set(LINUXDEPLOY_URL
|
||||||
|
"https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-aarch64.AppImage"
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
set(LINUXDEPLOY_URL
|
||||||
|
"https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(LINUXDEPLOY
|
||||||
|
"${CMAKE_BINARY_DIR}/linuxdeploy"
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT EXISTS "${LINUXDEPLOY}")
|
||||||
|
message(STATUS "Downloading linuxdeploy...")
|
||||||
|
|
||||||
|
file(DOWNLOAD
|
||||||
|
"${LINUXDEPLOY_URL}"
|
||||||
|
"${LINUXDEPLOY}"
|
||||||
|
SHOW_PROGRESS
|
||||||
|
STATUS LINUXDEPLOY_DOWNLOAD_STATUS
|
||||||
|
)
|
||||||
|
|
||||||
|
list(GET LINUXDEPLOY_DOWNLOAD_STATUS 0 LINUXDEPLOY_DOWNLOAD_RESULT)
|
||||||
|
|
||||||
|
if(NOT LINUXDEPLOY_DOWNLOAD_RESULT EQUAL 0)
|
||||||
|
list(GET LINUXDEPLOY_DOWNLOAD_STATUS 1 LINUXDEPLOY_DOWNLOAD_ERROR)
|
||||||
|
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"Failed to download linuxdeploy: ${LINUXDEPLOY_DOWNLOAD_ERROR}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
file(
|
||||||
|
CHMOD "${LINUXDEPLOY}"
|
||||||
|
FILE_PERMISSIONS
|
||||||
|
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||||
|
GROUP_READ GROUP_EXECUTE
|
||||||
|
WORLD_READ WORLD_EXECUTE
|
||||||
|
)
|
||||||
|
|
||||||
|
set(CPACK_GENERATOR "External")
|
||||||
|
set(CPACK_EXTERNAL_ENABLE_STAGING YES)
|
||||||
|
|
||||||
|
set(CPACK_EXTERNAL_PACKAGE_SCRIPT
|
||||||
|
"${CMAKE_CURRENT_BINARY_DIR}/LinuxDeploy-package.cmake"
|
||||||
|
)
|
||||||
|
|
||||||
|
set(LINUXDEPLOY_SCRIPT [=[
|
||||||
|
set(APPDIR "${CPACK_TEMPORARY_DIRECTORY}")
|
||||||
|
set(OUTPUT_DIR "@CMAKE_BINARY_DIR@")
|
||||||
|
|
||||||
|
set(DESKTOP_FILE
|
||||||
|
"${APPDIR}/share/applications/in.palera.palera1n.desktop"
|
||||||
|
)
|
||||||
|
|
||||||
|
message(STATUS "Running linuxdeploy")
|
||||||
|
message(STATUS "AppDir: ${APPDIR}")
|
||||||
|
message(STATUS "Output: ${OUTPUT_DIR}")
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND
|
||||||
|
"@LINUXDEPLOY@"
|
||||||
|
"--appdir=${APPDIR}"
|
||||||
|
"--desktop-file=${DESKTOP_FILE}"
|
||||||
|
"--output=appimage"
|
||||||
|
WORKING_DIRECTORY "${OUTPUT_DIR}"
|
||||||
|
RESULT_VARIABLE RESULT
|
||||||
|
OUTPUT_VARIABLE OUTPUT
|
||||||
|
ERROR_VARIABLE ERROR
|
||||||
|
)
|
||||||
|
|
||||||
|
if(OUTPUT)
|
||||||
|
message(STATUS "${OUTPUT}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(ERROR)
|
||||||
|
message(STATUS "${ERROR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT RESULT EQUAL 0)
|
||||||
|
message(FATAL_ERROR
|
||||||
|
"linuxdeploy failed with exit code ${RESULT}"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS
|
||||||
|
"AppImage generated in ${OUTPUT_DIR}"
|
||||||
|
)
|
||||||
|
]=])
|
||||||
|
|
||||||
|
string(
|
||||||
|
REPLACE
|
||||||
|
"@LINUXDEPLOY@"
|
||||||
|
"${LINUXDEPLOY}"
|
||||||
|
LINUXDEPLOY_SCRIPT
|
||||||
|
"${LINUXDEPLOY_SCRIPT}"
|
||||||
|
)
|
||||||
|
|
||||||
|
string(
|
||||||
|
REPLACE
|
||||||
|
"@CMAKE_BINARY_DIR@"
|
||||||
|
"${CMAKE_BINARY_DIR}"
|
||||||
|
LINUXDEPLOY_SCRIPT
|
||||||
|
"${LINUXDEPLOY_SCRIPT}"
|
||||||
|
)
|
||||||
|
|
||||||
|
file(GENERATE
|
||||||
|
OUTPUT "${CPACK_EXTERNAL_PACKAGE_SCRIPT}"
|
||||||
|
CONTENT "${LINUXDEPLOY_SCRIPT}"
|
||||||
|
)
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
find_program(BASH_EXECUTABLE bash REQUIRED)
|
||||||
|
find_program(_XXD xxd REQUIRED)
|
||||||
|
find_program(_JQ jq REQUIRED)
|
||||||
|
find_program(_XZ xz REQUIRED)
|
||||||
|
|
||||||
|
execute_process(
|
||||||
|
COMMAND "${BASH_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Xxd.sh"
|
||||||
|
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
COMMAND_ERROR_IS_FATAL ANY
|
||||||
|
)
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
|
|
||||||
|
mkdir -p "$ROOT_DIR/src/gen/embedded"
|
||||||
|
|
||||||
|
cd "$ROOT_DIR"
|
||||||
|
|
||||||
|
mkdir -p src/gen/embedded
|
||||||
|
|
||||||
|
xz --format=lzma -vfc6ekT 0 $ROOT_DIR/embedded/ramdisk.dmg > $ROOT_DIR/embedded/ramdisk-compressed.lzma
|
||||||
|
xz --format=lzma -vfc6ekT 0 $ROOT_DIR/embedded/checkra1n-kpf-pongo > $ROOT_DIR/embedded/checkra1n-kpf-pongo-compressed.lzma
|
||||||
|
jq -c . $ROOT_DIR/embedded/DFUHelperDeviceInfo.json > $ROOT_DIR/embedded/DFUHelperDeviceInfo-minified.json
|
||||||
|
|
||||||
|
for file in embedded/*; do
|
||||||
|
name=$(basename "$file")
|
||||||
|
symbol="embedded_${name//[^a-zA-Z0-9_]/_}"
|
||||||
|
|
||||||
|
echo " XXD $file"
|
||||||
|
|
||||||
|
xxd -i "$file" \
|
||||||
|
| sed -E \
|
||||||
|
-e "s/^unsigned char .*\[\] =/static const unsigned char ${symbol}[] =/" \
|
||||||
|
-e "s/^unsigned int .*_len =/static const size_t ${symbol}_len =/" \
|
||||||
|
> "src/gen/embedded/${name%.*}.h"
|
||||||
|
done
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
|
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||||
|
|
||||||
|
PLATFORM="${1:-iphoneos}"
|
||||||
|
|
||||||
|
case "$PLATFORM" in
|
||||||
|
iphoneos)
|
||||||
|
TARGET_SDK="iphoneos"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "error: unsupported platform: $PLATFORM" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [[ "$(uname -s)" != "Darwin" ]]; then
|
||||||
|
echo "error: Apple SDK builds require macOS/Xcode" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
MACOSX_SYSROOT="$(xcrun --sdk macosx --show-sdk-path)"
|
||||||
|
TARGET_SYSROOT="$(xcrun --sdk "$TARGET_SDK" --show-sdk-path)"
|
||||||
|
CUSTOM_INCLUDE_PATH="$ROOT_DIR/apple-include-$PLATFORM"
|
||||||
|
|
||||||
|
mkdir -p "$CUSTOM_INCLUDE_PATH"/IOKit/kext
|
||||||
|
cp -af "$MACOSX_SYSROOT"/System/Library/Frameworks/IOKit.framework/Headers/{AppleConvergedIPCKeys.h,IOBSD.h,IOCFBundle.h,IOCFPlugIn.h,IOCFURLAccess.h,IOKitServer.h,IORPC.h,IOSharedLock.h,IOUserServer.h,audio,avc,firewire,graphics,hid,hidsystem,i2c,iokitmig.h,kext,ndrvsupport,network,ps,pwr_mgt,sbp2,scsi,serial,storage,stream,usb,video} "$CUSTOM_INCLUDE_PATH/IOKit"
|
||||||
|
cp -af "$MACOSX_SYSROOT"/System/Library/Frameworks/IOKit.framework/Headers/* "$CUSTOM_INCLUDE_PATH/IOKit"
|
||||||
|
gsed -i -E s/'__API_UNAVAILABLE\(.*\)'// "$CUSTOM_INCLUDE_PATH/IOKit/IOKitLib.h"
|
||||||
|
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cat > /etc/udev/rules.d/turdusra1n.rules <<'EOF'
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1227", GROUP="plugdev", MODE="0666"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1338", GROUP="plugdev", MODE="0666"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="4141", GROUP="plugdev", MODE="0666"
|
||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="05ac", ATTRS{idProduct}=="1281", GROUP="plugdev", MODE="0666"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
getent group plugdev >/dev/null 2>&1 || groupadd plugdev
|
||||||
|
usermod -aG plugdev "$USER"
|
||||||
|
|
||||||
|
udevadm control --reload-rules
|
||||||
|
udevadm trigger
|
||||||
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 647 KiB |
|
After Width: | Height: | Size: 203 KiB |
@@ -0,0 +1,72 @@
|
|||||||
|
{
|
||||||
|
"fill" : {
|
||||||
|
"linear-gradient" : [
|
||||||
|
"srgb:0.68630,0.73449,0.81004,1.00000",
|
||||||
|
"srgb:0.73248,0.53902,0.51652,1.00000"
|
||||||
|
],
|
||||||
|
"orientation" : {
|
||||||
|
"start" : {
|
||||||
|
"x" : 0.5,
|
||||||
|
"y" : 0
|
||||||
|
},
|
||||||
|
"stop" : {
|
||||||
|
"x" : 0.5,
|
||||||
|
"y" : 0.7
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"groups" : [
|
||||||
|
{
|
||||||
|
"layers" : [
|
||||||
|
{
|
||||||
|
"blend-mode" : "screen",
|
||||||
|
"fill" : {
|
||||||
|
"solid" : "srgb:0.95467,1.00000,0.96255,1.00000"
|
||||||
|
},
|
||||||
|
"hidden" : false,
|
||||||
|
"image-name" : "palera1n_glyph 2.png",
|
||||||
|
"name" : "palera1n_glyph 2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"glass" : false,
|
||||||
|
"hidden" : true,
|
||||||
|
"image-name" : "asdsadsadasasd.png",
|
||||||
|
"name" : "asdsadsadasasd",
|
||||||
|
"opacity" : 0.7
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fill" : {
|
||||||
|
"solid" : "srgb:0.91539,1.00000,0.91492,1.00000"
|
||||||
|
},
|
||||||
|
"glass" : false,
|
||||||
|
"hidden" : false,
|
||||||
|
"image-name" : "asdasdasdas.png",
|
||||||
|
"name" : "asdasdasdas",
|
||||||
|
"opacity" : 0.3
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"blend-mode" : "normal",
|
||||||
|
"glass" : false,
|
||||||
|
"hidden" : true,
|
||||||
|
"image-name" : "palera1n_bg.png",
|
||||||
|
"name" : "palera1n_bg",
|
||||||
|
"opacity" : 1
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"shadow" : {
|
||||||
|
"kind" : "neutral",
|
||||||
|
"opacity" : 0.5
|
||||||
|
},
|
||||||
|
"translucency" : {
|
||||||
|
"enabled" : true,
|
||||||
|
"value" : 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"supported-platforms" : {
|
||||||
|
"circles" : [
|
||||||
|
"watchOS"
|
||||||
|
],
|
||||||
|
"squares" : "shared"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,9 @@
|
|||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>palera1n</string>
|
<string>palera1n</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>palera1n.icns</string>
|
<string>AppIcon</string>
|
||||||
|
<key>CFBundleIconName</key>
|
||||||
|
<string>AppIcon</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>palera1n</string>
|
<string>palera1n</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
@@ -20,5 +22,9 @@
|
|||||||
<string>(c) 2026 palera1n</string>
|
<string>(c) 2026 palera1n</string>
|
||||||
<key>NSHighResolutionCapable</key>
|
<key>NSHighResolutionCapable</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>3.0.0</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string>1</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 137 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,10 @@
|
|||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Type=Application
|
||||||
|
Name=palera1n
|
||||||
|
Comment=Semi-tethered jailbreak for iOS 15+
|
||||||
|
Categories=Utility;
|
||||||
|
Icon=in.palera.palera1n
|
||||||
|
Exec=palera1n
|
||||||
|
Terminal=false
|
||||||
|
StartupWMClass=in.palera.palera1n
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#if defined(WITH_GUI) || defined(WITH_TUI)
|
#if defined(WITH_GUI) || defined(WITH_TUI)
|
||||||
|
|
||||||
#ifndef MAIN__DEVICE_INFO_H
|
#ifndef P1__DEVICE_INFO_HPP
|
||||||
#define MAIN__DEVICE_INFO_H
|
#define P1__DEVICE_INFO_HPP
|
||||||
|
|
||||||
// stolen from irecovery, I dont think an array
|
// stolen from irecovery, I dont think an array
|
||||||
// of devices can be copyrighted?
|
// of devices can be copyrighted?
|
||||||
@@ -382,6 +382,6 @@ static struct irecv_device irecv_devices[] = {
|
|||||||
void get_recovery_info(char *sn, const char **ecid, const char **product_model, const char **product_name);
|
void get_recovery_info(char *sn, const char **ecid, const char **product_model, const char **product_name);
|
||||||
void get_name_from_product_type(const char *product_type, const char **name);
|
void get_name_from_product_type(const char *product_type, const char **name);
|
||||||
|
|
||||||
#endif // MAIN__DEVICE_INFO_H
|
#endif // P1__DEVICE_INFO_HPP
|
||||||
|
|
||||||
#endif // WITH_GUI || WITH_TUI
|
#endif // WITH_GUI || WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#if defined(WITH_GUI) || defined(WITH_TUI)
|
#if defined(WITH_GUI) || defined(WITH_TUI)
|
||||||
|
|
||||||
#ifndef EVENT_H
|
#ifndef P1__EVENT_HPP
|
||||||
#define EVENT_H
|
#define P1__EVENT_HPP
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
@@ -69,6 +69,6 @@ void ensure_device_event_system_started();
|
|||||||
bool enter_recovery();
|
bool enter_recovery();
|
||||||
void exit_recovery();
|
void exit_recovery();
|
||||||
|
|
||||||
#endif // EVENT_H
|
#endif // P1__EVENT_HPP
|
||||||
|
|
||||||
#endif // WITH_GUI || WITH_TUI
|
#endif // WITH_GUI || WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#if defined(WITH_GUI) || defined(WITH_TUI)
|
#if defined(WITH_GUI) || defined(WITH_TUI)
|
||||||
|
|
||||||
#ifndef MAIN__HOTPLUG_HPP
|
#ifndef P1__HOTPLUG_HPP
|
||||||
#define MAIN__HOTPLUG_HPP
|
#define P1__HOTPLUG_HPP
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -79,6 +79,6 @@ void exit_recovery(hotplug_handle_t handle);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // MAIN__HOTPLUG_HPP
|
#endif // P1__HOTPLUG_HPP
|
||||||
|
|
||||||
#endif // WITH_GUI || WITH_TUI
|
#endif // WITH_GUI || WITH_TUI
|
||||||
@@ -132,7 +132,7 @@ const char* err_to_string(int err) {
|
|||||||
|
|
||||||
int exploit(int *stage)
|
int exploit(int *stage)
|
||||||
{
|
{
|
||||||
LOG("Waiting for devices...");
|
LOG("Waiting for DFU mode devices...");
|
||||||
|
|
||||||
*stage = STAGE_RESET;
|
*stage = STAGE_RESET;
|
||||||
|
|
||||||
@@ -158,7 +158,21 @@ int exploit(int *stage)
|
|||||||
if (!usb_get_client_flag(client, &flag))
|
if (!usb_get_client_flag(client, &flag))
|
||||||
goto reloop;
|
goto reloop;
|
||||||
|
|
||||||
if (flag & kDeviceDFUModeFlag) {
|
// no reason to use this for tui/gui
|
||||||
|
if ((flag & kDeviceRecoveryModeFlag) && (palerain_flags & palerain_option_cli)) {
|
||||||
|
LOG("Found recovery mode device");
|
||||||
|
|
||||||
|
cr = ra1n_enter_dfu(client);
|
||||||
|
if (cr == RA1N_CLIENT_ERR_NONE) {
|
||||||
|
usb_close(client);
|
||||||
|
*stage = STAGE_RESET;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
LOG_ERROR("Failed to enter DFU mode (rv=%d, reason=%s)", cr, err_to_string(cr));
|
||||||
|
usb_close(client);
|
||||||
|
*stage = STAGE_ERROR;
|
||||||
|
break; // err
|
||||||
|
} else if (flag & kDeviceDFUModeFlag) {
|
||||||
if (flag & kDeviceStandardPwnedDFUModeFlag) {
|
if (flag & kDeviceStandardPwnedDFUModeFlag) {
|
||||||
// we cant do shit sorry
|
// we cant do shit sorry
|
||||||
LOG_ERROR("Found an unknown pwned DFU mode device");
|
LOG_ERROR("Found an unknown pwned DFU mode device");
|
||||||
@@ -273,10 +287,9 @@ int exploit(int *stage)
|
|||||||
usb_close(client);
|
usb_close(client);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
LOG_ERROR("Found unknown device");
|
|
||||||
usb_close(client);
|
usb_close(client);
|
||||||
*stage = STAGE_ERROR;
|
*stage = STAGE_RESET;
|
||||||
break; // err
|
continue; // unknown mode, just reloop
|
||||||
}
|
}
|
||||||
|
|
||||||
reloop:
|
reloop:
|
||||||
@@ -313,7 +326,7 @@ int exploit(int *stage)
|
|||||||
|
|
||||||
int exploit(int *stage)
|
int exploit(int *stage)
|
||||||
{
|
{
|
||||||
LOG("Waiting for devices...");
|
LOG("Waiting for DFU mode devices...");
|
||||||
|
|
||||||
struct DeviceConfiguration deviceConfig;
|
struct DeviceConfiguration deviceConfig;
|
||||||
struct PayloadConfiguration payloadConfig;
|
struct PayloadConfiguration payloadConfig;
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RUN_H
|
#ifndef P1__EXPLOIT_H
|
||||||
#define RUN_H
|
#define P1__EXPLOIT_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
@@ -60,4 +60,4 @@ int exploit(int *stage);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // RUN_H
|
#endif // P1__EXPLOIT_H
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GLOBALS_H
|
#ifndef P1__GLOBALS_H
|
||||||
#define GLOBALS_H
|
#define P1__GLOBALS_H
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
@@ -59,4 +59,4 @@ bool override_payload_from_file(const char *path, payload_t *out);
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // GLOBALS_H
|
#endif // P1__GLOBALS_H
|
||||||
@@ -68,7 +68,7 @@ void print_credits() {
|
|||||||
":: sarah, staturnz\n"
|
":: sarah, staturnz\n"
|
||||||
":: ======== Thanks to =======>\n"
|
":: ======== Thanks to =======>\n"
|
||||||
":: Thanks to: itsnebulalol, llsc12, lrdsnow, dedbeddedbed\n"
|
":: Thanks to: itsnebulalol, llsc12, lrdsnow, dedbeddedbed\n"
|
||||||
":: kirb, ehilwyma, opa334, 0x7ff, alfiecg25, sneko, sbingner\n"
|
":: kirb, ehilwyma, opa334, 0x7ff, alfiecg24, sneko, sbingner\n"
|
||||||
":: nikias, tihmstar\n"
|
":: nikias, tihmstar\n"
|
||||||
":: Checkra1n (Siguza, axi0mx, littlelailo et al.)\n"
|
":: Checkra1n (Siguza, axi0mx, littlelailo et al.)\n"
|
||||||
":: Procursus (Hayden Seay, Cameron Katri, Keto et al.)\n"
|
":: Procursus (Hayden Seay, Cameron Katri, Keto et al.)\n"
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef USB_PONGO_H
|
#ifndef P1__PONGO_HELPER_H
|
||||||
#define USB_PONGO_H
|
#define P1__PONGO_HELPER_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
@@ -49,4 +49,4 @@ typedef checkm8_err_t p1_checkm8_err_t;
|
|||||||
p1_checkm8_err_t send_compressed_pongo(p1_usb_handle_t *handle, const uint8_t *pongo_bin, const size_t pongo_bin_length);
|
p1_checkm8_err_t send_compressed_pongo(p1_usb_handle_t *handle, const uint8_t *pongo_bin, const size_t pongo_bin_length);
|
||||||
p1_checkm8_err_t send_full_pongo_jailbreak(p1_usb_handle_t *handle);
|
p1_checkm8_err_t send_full_pongo_jailbreak(p1_usb_handle_t *handle);
|
||||||
|
|
||||||
#endif // USB_PONGO_H
|
#endif // P1__PONGO_HELPER_H
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#if defined(WITH_GUI) || defined(WITH_TUI)
|
#if defined(WITH_GUI) || defined(WITH_TUI)
|
||||||
|
|
||||||
#ifndef SEQUENCE_H
|
#ifndef P1__SEQUENCE_HPP
|
||||||
#define SEQUENCE_H
|
#define P1__SEQUENCE_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
@@ -64,6 +64,6 @@ DfuSequence ParseSequence(const std::string& deviceKey);
|
|||||||
bool SequenceIsSupported(const DfuSequence* seq);
|
bool SequenceIsSupported(const DfuSequence* seq);
|
||||||
bool SequenceRequiresCLI(const DfuSequence* seq);
|
bool SequenceRequiresCLI(const DfuSequence* seq);
|
||||||
|
|
||||||
#endif // SEQUENCE_H
|
#endif // P1__SEQUENCE_HPP
|
||||||
|
|
||||||
#endif // WITH_GUI || WITH_TUI
|
#endif // WITH_GUI || WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_HPP
|
#ifndef P1__TUI_HPP
|
||||||
#define TUI_HPP
|
#define P1__TUI_HPP
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@@ -93,6 +93,6 @@ private:
|
|||||||
void ui_run(void);
|
void ui_run(void);
|
||||||
void update_tui_device_state(const DeviceState* new_state);
|
void update_tui_device_state(const DeviceState* new_state);
|
||||||
|
|
||||||
#endif // TUI_HPP
|
#endif // P1__TUI_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_BRANDING_HPP
|
#ifndef P1__TUI_BRANDING_HPP
|
||||||
#define TUI_BRANDING_HPP
|
#define P1__TUI_BRANDING_HPP
|
||||||
|
|
||||||
void draw_tui_sidebar_branding(int y, int x, int width);
|
void draw_tui_sidebar_branding(int y, int x, int width);
|
||||||
|
|
||||||
#endif // TUI_BRANDING_HPP
|
#endif // P1__TUI_BRANDING_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_DFU_ART_HPP
|
#ifndef P1__TUI_DFU_ART_HPP
|
||||||
#define TUI_DFU_ART_HPP
|
#define P1__TUI_DFU_ART_HPP
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
@@ -43,6 +43,6 @@ struct DfuAsciiPreview {
|
|||||||
const DfuAsciiPreview* find_dfu_ascii_preview(const std::string& imageName);
|
const DfuAsciiPreview* find_dfu_ascii_preview(const std::string& imageName);
|
||||||
void draw_dfu_ascii_preview(const DfuAsciiPreview& preview, int sx, int sy);
|
void draw_dfu_ascii_preview(const DfuAsciiPreview& preview, int sx, int sy);
|
||||||
|
|
||||||
#endif // TUI_DFU_ART_HPP
|
#endif // P1__TUI_DFU_ART_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_DFU_PANEL_HPP
|
#ifndef P1__TUI_DFU_PANEL_HPP
|
||||||
#define TUI_DFU_PANEL_HPP
|
#define P1__TUI_DFU_PANEL_HPP
|
||||||
|
|
||||||
#include "TuiPanel.hpp"
|
#include "TuiPanel.hpp"
|
||||||
#include "../sequence.hpp"
|
#include "../sequence.hpp"
|
||||||
@@ -73,6 +73,6 @@ private:
|
|||||||
std::chrono::steady_clock::time_point m_last_tick;
|
std::chrono::steady_clock::time_point m_last_tick;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TUI_DFU_PANEL_HPP
|
#endif // P1__TUI_DFU_PANEL_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_EXPLOIT_PANEL_HPP
|
#ifndef P1__TUI_EXPLOIT_PANEL_HPP
|
||||||
#define TUI_EXPLOIT_PANEL_HPP
|
#define P1__TUI_EXPLOIT_PANEL_HPP
|
||||||
|
|
||||||
#include "TuiPanel.hpp"
|
#include "TuiPanel.hpp"
|
||||||
|
|
||||||
@@ -60,6 +60,6 @@ private:
|
|||||||
std::atomic<bool> m_is_exploiting{false};
|
std::atomic<bool> m_is_exploiting{false};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TUI_EXPLOIT_PANEL_HPP
|
#endif // P1__TUI_EXPLOIT_PANEL_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_MAIN_PANEL_HPP
|
#ifndef P1__TUI_MAIN_PANEL_HPP
|
||||||
#define TUI_MAIN_PANEL_HPP
|
#define P1__TUI_MAIN_PANEL_HPP
|
||||||
|
|
||||||
#include "TuiPanel.hpp"
|
#include "TuiPanel.hpp"
|
||||||
|
|
||||||
@@ -47,6 +47,6 @@ public:
|
|||||||
const char** get_buttons() const override;
|
const char** get_buttons() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TUI_MAIN_PANEL_HPP
|
#endif // P1__TUI_MAIN_PANEL_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_PANEL_HPP
|
#ifndef P1__TUI_PANEL_HPP
|
||||||
#define TUI_PANEL_HPP
|
#define P1__TUI_PANEL_HPP
|
||||||
|
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
|
||||||
@@ -71,6 +71,6 @@ private:
|
|||||||
TuiFrame* m_frame = nullptr;
|
TuiFrame* m_frame = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TUI_PANEL_HPP
|
#endif // P1__TUI_PANEL_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_RECOVERY_PANEL_HPP
|
#ifndef P1__TUI_RECOVERY_PANEL_HPP
|
||||||
#define TUI_RECOVERY_PANEL_HPP
|
#define P1__TUI_RECOVERY_PANEL_HPP
|
||||||
|
|
||||||
#include "TuiPanel.hpp"
|
#include "TuiPanel.hpp"
|
||||||
|
|
||||||
@@ -61,6 +61,6 @@ private:
|
|||||||
bool m_buttons_disabled;
|
bool m_buttons_disabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TUI_RECOVERY_PANEL_HPP
|
#endif // P1__TUI_RECOVERY_PANEL_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_SETTINGS_PANEL_HPP
|
#ifndef P1__TUI_SETTINGS_PANEL_HPP
|
||||||
#define TUI_SETTINGS_PANEL_HPP
|
#define P1__TUI_SETTINGS_PANEL_HPP
|
||||||
|
|
||||||
#include "TuiPanel.hpp"
|
#include "TuiPanel.hpp"
|
||||||
|
|
||||||
@@ -50,6 +50,6 @@ private:
|
|||||||
void edit_boot_args(int start_y, int start_x);
|
void edit_boot_args(int start_y, int start_x);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // TUI_SETTINGS_PANEL_HPP
|
#endif // P1__TUI_SETTINGS_PANEL_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
#ifdef WITH_TUI
|
#ifdef WITH_TUI
|
||||||
|
|
||||||
#ifndef TUI_TEXT_HPP
|
#ifndef P1__TUI_TEXT_HPP
|
||||||
#define TUI_TEXT_HPP
|
#define P1__TUI_TEXT_HPP
|
||||||
|
|
||||||
#include <ncurses.h>
|
#include <ncurses.h>
|
||||||
|
|
||||||
@@ -105,6 +105,6 @@ inline int draw_wrapped_text(int y, int x, int width, const std::string& text, i
|
|||||||
|
|
||||||
} // namespace tui_text
|
} // namespace tui_text
|
||||||
|
|
||||||
#endif // TUI_TEXT_HPP
|
#endif // P1__TUI_TEXT_HPP
|
||||||
|
|
||||||
#endif // WITH_TUI
|
#endif // WITH_TUI
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
* palera1n - https://palera.in
|
||||||
|
*
|
||||||
|
* Copyright (C) 2026 palera1n team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
|
||||||
|
#include "udev_helper.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/wait.h> // waitpid
|
||||||
|
#include <sys/stat.h> // chmod
|
||||||
|
|
||||||
|
#include "gen/embedded/add_udev_rules.h"
|
||||||
|
|
||||||
|
int udev_rules_exist(void)
|
||||||
|
{
|
||||||
|
return access("/etc/udev/rules.d/turdusra1n.rules", F_OK) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int add_udev_rules(void)
|
||||||
|
{
|
||||||
|
FILE *f = fopen("/tmp/udevhelper.sh", "wb");
|
||||||
|
if (!f)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
fwrite(
|
||||||
|
embedded_add_udev_rules_sh,
|
||||||
|
1,
|
||||||
|
embedded_add_udev_rules_sh_len,
|
||||||
|
f
|
||||||
|
);
|
||||||
|
fclose(f);
|
||||||
|
|
||||||
|
chmod("/tmp/udevhelper.sh", 0700);
|
||||||
|
|
||||||
|
pid_t pid = fork();
|
||||||
|
|
||||||
|
if (pid < 0) {
|
||||||
|
unlink("/tmp/udevhelper.sh");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pid == 0) {
|
||||||
|
execlp("pkexec", "pkexec", "/tmp/udevhelper.sh", (char *)NULL);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
int status;
|
||||||
|
waitpid(pid, &status, 0);
|
||||||
|
|
||||||
|
unlink("/tmp/udevhelper.sh");
|
||||||
|
|
||||||
|
return WIFEXITED(status) ? WEXITSTATUS(status) : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // defined(__linux__)
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
* palera1n - https://palera.in
|
||||||
|
*
|
||||||
|
* Copyright (C) 2026 palera1n team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in all
|
||||||
|
* copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
* SOFTWARE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef P1__UDEV_HELPER_H
|
||||||
|
#define P1__UDEV_HELPER_H
|
||||||
|
|
||||||
|
#if defined(__linux__)
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int udev_rules_exist(void);
|
||||||
|
int add_udev_rules(void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // defined(__linux__)
|
||||||
|
|
||||||
|
#endif // P1__UDEV_HELPER_H
|
||||||
@@ -31,6 +31,9 @@
|
|||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include "../globals.h"
|
#include "../globals.h"
|
||||||
|
#if defined(WITH_GUI) && defined(__linux__)
|
||||||
|
# include "../udev_helper.h"
|
||||||
|
#endif
|
||||||
#include "../events/event.hpp"
|
#include "../events/event.hpp"
|
||||||
|
|
||||||
wxDEFINE_EVENT(EVT_DEVICE_STATE_UPDATE, wxCommandEvent);
|
wxDEFINE_EVENT(EVT_DEVICE_STATE_UPDATE, wxCommandEvent);
|
||||||
@@ -106,6 +109,36 @@ void MainFrame::ShowMain()
|
|||||||
m_dfu->Hide();
|
m_dfu->Hide();
|
||||||
m_exploit->Hide();
|
m_exploit->Hide();
|
||||||
Layout();
|
Layout();
|
||||||
|
|
||||||
|
// check udev rules
|
||||||
|
#if defined(WITH_GUI) && defined(__linux__)
|
||||||
|
|
||||||
|
if (!udev_rules_exist()) {
|
||||||
|
int result = wxMessageBox(
|
||||||
|
"USB permissions need to be configured before exploiting.\n\n"
|
||||||
|
"This will install the required udev rules so palera1n "
|
||||||
|
"can communicate with your device over USB in DFU.\n\n"
|
||||||
|
"Otherwise, we may not be able to jailbreak your device.",
|
||||||
|
"Set Up USB Permissions",
|
||||||
|
wxYES_NO | wxICON_INFORMATION,
|
||||||
|
this
|
||||||
|
);
|
||||||
|
|
||||||
|
if (result != wxYES)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (add_udev_rules() != 0) {
|
||||||
|
wxMessageBox(
|
||||||
|
"Failed to configure USB permissions.",
|
||||||
|
"Error",
|
||||||
|
wxOK | wxICON_ERROR,
|
||||||
|
this
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainFrame::ShowSettings()
|
void MainFrame::ShowSettings()
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef APPFRAME_H
|
#ifndef P1__APP_FRAME_HPP
|
||||||
#define APPFRAME_H
|
#define P1__APP_FRAME_HPP
|
||||||
|
|
||||||
#ifdef WITH_GUI
|
#ifdef WITH_GUI
|
||||||
|
|
||||||
@@ -77,4 +77,4 @@ public:
|
|||||||
|
|
||||||
#endif // WITH_GUI
|
#endif // WITH_GUI
|
||||||
|
|
||||||
#endif // APPFRAME_H
|
#endif // P1__APP_FRAME_HPP
|
||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DEVICEPANEL_H
|
#ifndef P1__DEVICE_PANEL_HPP
|
||||||
#define DEVICEPANEL_H
|
#define P1__DEVICE_PANEL_HPP
|
||||||
|
|
||||||
#include <wx/wx.h>
|
#include <wx/wx.h>
|
||||||
#include "../events/event.hpp"
|
#include "../events/event.hpp"
|
||||||
@@ -65,4 +65,4 @@ private:
|
|||||||
DeviceState m_deviceState;
|
DeviceState m_deviceState;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DEVICEPANEL_H
|
#endif // P1__DEVICE_PANEL_HPP
|
||||||
@@ -75,7 +75,11 @@ DfuPanel::DfuPanel(MainFrame* frame, wxWindow* parent)
|
|||||||
"Time to put the device into DFU mode.",
|
"Time to put the device into DFU mode.",
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
wxST_WRAP
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
left->Add(m_headerText, 0, wxTOP | wxLEFT | wxRIGHT, 10);
|
left->Add(m_headerText, 0, wxTOP | wxLEFT | wxRIGHT, 10);
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef DFUPANEL_H
|
#ifndef P1__DFU_PANEL_HPP
|
||||||
#define DFUPANEL_H
|
#define P1__DFU_PANEL_HPP
|
||||||
|
|
||||||
#ifdef WITH_GUI
|
#ifdef WITH_GUI
|
||||||
|
|
||||||
@@ -73,4 +73,4 @@ private:
|
|||||||
|
|
||||||
#endif // WITH_GUI
|
#endif // WITH_GUI
|
||||||
|
|
||||||
#endif // DFUPANEL_H
|
#endif // P1__DFU_PANEL_HPP
|
||||||
@@ -78,7 +78,11 @@ ExploitPanel::ExploitPanel(MainFrame* frame, wxWindow* parent)
|
|||||||
left->Add(new wxStaticText(this, wxID_ANY, "Installing jailbreak, this will take a moment. Do not disconnect the device until finished.",
|
left->Add(new wxStaticText(this, wxID_ANY, "Installing jailbreak, this will take a moment. Do not disconnect the device until finished.",
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
wxST_WRAP
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
), 0, wxALL, 10);
|
), 0, wxALL, 10);
|
||||||
left->Add(m_statusText, 0, wxALL, 10);
|
left->Add(m_statusText, 0, wxALL, 10);
|
||||||
left->Add(m_progressBar, 0, wxALL | wxEXPAND, 20);
|
left->Add(m_progressBar, 0, wxALL | wxEXPAND, 20);
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef EXPLOITPANEL_HPP
|
#ifndef P1__EXPLOIT_PANEL_HPP
|
||||||
#define EXPLOITPANEL_HPP
|
#define P1__EXPLOIT_PANEL_HPP
|
||||||
|
|
||||||
#ifdef WITH_GUI
|
#ifdef WITH_GUI
|
||||||
|
|
||||||
@@ -49,4 +49,4 @@ private:
|
|||||||
|
|
||||||
#endif // WITH_GUI
|
#endif // WITH_GUI
|
||||||
|
|
||||||
#endif // EXPLOITPANEL_HPP
|
#endif // P1__EXPLOIT_PANEL_HPP
|
||||||
@@ -81,7 +81,11 @@ MainPanel::MainPanel(MainFrame* frame, wxWindow* parent)
|
|||||||
"Cameron Katri, Keto et al.)",
|
"Cameron Katri, Keto et al.)",
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
wxST_WRAP
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
auto* twitterLabel = new wxStaticText(this, wxID_ANY, "Twitter:");
|
auto* twitterLabel = new wxStaticText(this, wxID_ANY, "Twitter:");
|
||||||
@@ -167,7 +171,11 @@ MainPanel::MainPanel(MainFrame* frame, wxWindow* parent)
|
|||||||
"NOTE: Please ensure you've made a backup of your device before proceeding.\n",
|
"NOTE: Please ensure you've made a backup of your device before proceeding.\n",
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
wxST_WRAP
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
wxFont noteFont = warningNote->GetFont();
|
wxFont noteFont = warningNote->GetFont();
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MAINPANEL_H
|
#ifndef P1__MAIN_PANEL_HPP
|
||||||
#define MAINPANEL_H
|
#define P1__MAIN_PANEL_HPP
|
||||||
|
|
||||||
#ifdef WITH_GUI
|
#ifdef WITH_GUI
|
||||||
|
|
||||||
@@ -48,4 +48,4 @@ private:
|
|||||||
|
|
||||||
#endif // WITH_GUI
|
#endif // WITH_GUI
|
||||||
|
|
||||||
#endif // MAINPANEL_H
|
#endif // P1__MAIN_PANEL_HPP
|
||||||
@@ -88,7 +88,11 @@ RecoveryPanel::RecoveryPanel(MainFrame* frame, wxWindow* parent)
|
|||||||
"The device needs to be put into DFU mode to apply the jailbreak. This is a manual process and we will guide you through it.",
|
"The device needs to be put into DFU mode to apply the jailbreak. This is a manual process and we will guide you through it.",
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
wxST_WRAP
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
), 0, wxALL, 10);
|
), 0, wxALL, 10);
|
||||||
left->Add(m_statusText, 0, wxALL, 10);
|
left->Add(m_statusText, 0, wxALL, 10);
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef RECOVERYPANEL_H
|
#ifndef P1__RECOVERY_PANEL_HPP
|
||||||
#define RECOVERYPANEL_H
|
#define P1__RECOVERY_PANEL_HPP
|
||||||
|
|
||||||
#ifdef WITH_GUI
|
#ifdef WITH_GUI
|
||||||
|
|
||||||
@@ -53,4 +53,4 @@ private:
|
|||||||
|
|
||||||
#endif // WITH_GUI
|
#endif // WITH_GUI
|
||||||
|
|
||||||
#endif // RECOVERYPANEL_H
|
#endif // P1__RECOVERY_PANEL_HPP
|
||||||
@@ -58,7 +58,14 @@ auto createTitle = [](wxWindow* parent, const wxString& text)
|
|||||||
|
|
||||||
auto createDescription = [](wxWindow* parent, const wxString& text)
|
auto createDescription = [](wxWindow* parent, const wxString& text)
|
||||||
{
|
{
|
||||||
auto* description = new wxStaticText(parent, wxID_ANY, text, wxDefaultPosition, wxDefaultSize, wxST_WRAP);
|
auto* description = new wxStaticText(
|
||||||
|
parent, wxID_ANY, text, wxDefaultPosition, wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
|
);
|
||||||
|
|
||||||
wxFont font = description->GetFont();
|
wxFont font = description->GetFont();
|
||||||
font.SetPointSize(font.GetPointSize() - 2);
|
font.SetPointSize(font.GetPointSize() - 2);
|
||||||
@@ -85,7 +92,11 @@ SettingsPanel::SettingsPanel(MainFrame* frame, wxWindow* parent)
|
|||||||
"You may set the following options. If you don't know what they mean you'll probably have no reason to set them.",
|
"You may set the following options. If you don't know what they mean you'll probably have no reason to set them.",
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
|
#ifdef __linux__
|
||||||
|
wxSP_WRAP
|
||||||
|
#else
|
||||||
wxST_WRAP
|
wxST_WRAP
|
||||||
|
#endif
|
||||||
), 0, wxTOP | wxLEFT | wxRIGHT, 10);
|
), 0, wxTOP | wxLEFT | wxRIGHT, 10);
|
||||||
|
|
||||||
auto* notebook = new wxNotebook(this, wxID_ANY);
|
auto* notebook = new wxNotebook(this, wxID_ANY);
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SETTINGSPANEL_H
|
#ifndef P1__SETTINGS_PANEL_HPP
|
||||||
#define SETTINGSPANEL_H
|
#define P1__SETTINGS_PANEL_HPP
|
||||||
|
|
||||||
#ifdef WITH_GUI
|
#ifdef WITH_GUI
|
||||||
|
|
||||||
@@ -42,4 +42,4 @@ public:
|
|||||||
|
|
||||||
#endif // WITH_GUI
|
#endif // WITH_GUI
|
||||||
|
|
||||||
#endif // SETTINGSPANEL_H
|
#endif // P1__SETTINGS_PANEL_HPP
|
||||||