mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
Change from Makefile to CMake (#4)
* add "build" into .gitignore for future out-of-source compilation * help me this is a break point not to be committed * help me this is a break point not to be committed again * Fix many major problems 1. Fix deps so that a script can download the deps instead of some special actions build.yml runner step 2. Fix CMakeLists.txt so that it (partially) works It is still **NOT** recommended to use cmake for the build as it is currently not functional 3. Add to gitignore so that git doesn't track a bunch of generated files * fix deps * change the dep_root population into git submodules. I succeeded in finding git repos for all. * fix all issues and fix ftp settings * change all to cmake * fix CMakeLists.txt so that it doesn't suck as much * switch from ftp to artifacts * fix more issues in src/CMakeLists.txt * fix more issues in src/CMakeLists.txt again * fix more issues in src/CMakeLists.txt again again * add passcode info for A11 * better description formatting * add the 3s wait * dfuhelper: lowercase steps except for first letter * i cant spell * made C99 compliant * turn into valid c99 * fix more issues in src/CMakeLists.txt again again again * Use xcode instead of makefiles * fix deps again * fix deps again again * fix deps again again again * add "build" into .gitignore for future out-of-source compilation * help me this is a break point not to be committed * help me this is a break point not to be committed again * Fix many major problems 1. Fix deps so that a script can download the deps instead of some special actions build.yml runner step 2. Fix CMakeLists.txt so that it (partially) works It is still **NOT** recommended to use cmake for the build as it is currently not functional 3. Add to gitignore so that git doesn't track a bunch of generated files * change the dep_root population into git submodules. I succeeded in finding git repos for all. * fix all issues and fix ftp settings * change all to cmake * fix CMakeLists.txt so that it doesn't suck as much * switch from ftp to artifacts * fix more issues in src/CMakeLists.txt * fix more issues in src/CMakeLists.txt again * fix more issues in src/CMakeLists.txt again again * made C99 compliant * turn into valid c99 * fix more issues in src/CMakeLists.txt again again again * Use xcode instead of makefiles * fix deps again again again * make more fixes * help me * Revert "help me" This reverts commit 866d3669d8aa90bcd7eda0412aea8cb05f42389c. * fix most issues with compiling hopefully * make more fixes again * make more fixes again * make more fixes again * make more fixes again * add gpm * fix gpm patches * go back to automake popt * help me * make popt hopefully listen * make popt hopefully listen * FUCK NEWT * idk * add CMAKE_BUILD_TYPE work * fix checkra1n xxd issues * fix binary locations * fix binary locations again * fix binary locations again * try ftp again * try to fix ftp bugs * try to fix ftp bugs again * Update build.yml * try to fix ftp bugs again * try to find where final executable is * fix all the issues (hopefully) * fix all the issues (hopefully) again * fix all the issues (hopefully) again again * finalize build.yml * finalize build.yml v2 * finalize build.yml v2 * finalize build.yml v4 * finalize build.yml v5 * finalize build.yml v6 * finalize build.yml v7 * finalize build.yml v8 * finalize build.yml v9 * finalize build.yml v10 * finalize build.yml v10 * finalize build.yml v12 * finalize build.yml v13 fuck off amfi * finalize build.yml v14 fuck off amfi * finalize build.yml v15 fuck you macos build times * finalize build.yml v16 fuck you macos build times * finalize build.yml v17 fuck you macos build times * finalize build.yml v17 fuck you macos build times * finalize build.yml v19 fuck you macos build times * finalize build.yml v20 fuck you macos build times FUCK AMFI * finalize build.yml v21 fuck you macos build times FUCK AMFI fix so that it downloads build time not configure time * finalize build.yml v23 fuck you macos build times FUCK AMFI fix so that libs aren't broken * finalize build.yml v23 fuck you macos build times FUCK AMFI fix so that libs aren't broken * finalize build.yml v25 fuck you macos build times FUCK AMFI fix so that libs aren't broken * finalize build.yml v25 well pagure just fucked up everything * finalize build.yml v26 find pls work * finalize build.yml v26 now, remove submodules because of pagure * finalize build.yml v27 HELPPPPPPPPP * finalize build.yml v27 fix linux * finalize build.yml v27 fix linux again * finalize build.yml v27 fix linux again again * finalize build.yml v27 fix mac again * finalize build.yml v27 fix mac again again * finalize build.yml v30 fix mac again again again * finalize build.yml v32 fix mac again again again again * finalize build.yml v32 fix mac again again again again again * finalize build.yml v32 fix mac again again again again again again * finalize build.yml v32 fix mac again again again again again again again * add lto * fix some library issues * fix more issues * fix more issues * add lto to deps * try dynamic code finding with cmake and find_library. * fix more issues ( make static build ) * fix more issues ( make static build ) * fix more issues ( make static build ) * fix more issues ( make static build ) * fuck libusb * fuck cmake add_executable only once * fuck version change * fuck version change * fuck version change * fuck version change * fix more stuff * rename usbmuxd to libusbmuxd * fix linking issues * remove static on MacOS * add binary artifacts on MacOS * Revert "add binary artifacts on MacOS" This reverts commit 43799af8134609cbce7bdd231db6c4e16fe019ee. * remove -D lines * move to C99 * remove submodules * various changes 1. remove submodules 2. fix build.yml 3. add trailing spaces 4. add TSAN --------- Co-authored-by: Nick Chan <[email protected]> Co-authored-by: Tom E <[email protected]> Co-authored-by: Nebula <[email protected]>
This commit is contained in:
7 files changed
+421
-19
No files matched your search
+29
-18
@@ -8,6 +8,7 @@ on:
|
||||
- 'patches/**'
|
||||
- 'include/**'
|
||||
- 'Makefile'
|
||||
- 'CMakeLists.txt'
|
||||
- '.github/workflows/build.yml'
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
@@ -83,7 +84,6 @@ jobs:
|
||||
|
||||
- name: Download dependencies (embedded binaries)
|
||||
run: |
|
||||
make -j5 download-deps
|
||||
echo "SDK=$(xcrun -sdk ${{ matrix.os }} --show-sdk-path)" >> $GITHUB_ENV
|
||||
|
||||
- name: Download dependencies (source code)
|
||||
@@ -293,12 +293,20 @@ jobs:
|
||||
cp -a sysroot/${{ env.PREFIX }}/{include,lib} dep_root
|
||||
find dep_root -name '*.dylib' -delete
|
||||
find dep_root -name '*.la' -delete
|
||||
if [ "${{ matrix.os }}" = "macosx" ]; then
|
||||
CC="xcrun -sdk iphoneos cc" gmake -j$(sysctl -n hw.ncpu)
|
||||
elif [ "${{ matrix.os }}" = "iphoneos" ]; then
|
||||
CC="xcrun -sdk iphoneos cc" gmake -j$(sysctl -n hw.ncpu) FAKE_PLATFORM=2 FAKE_SDK=14.0 FAKE_MINOS=14.0
|
||||
fi
|
||||
mv src/palera1n palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DSTATIC=1 -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_CROSSCOMPILING=true \
|
||||
-DCMAKE_SYSTEM_NAME=Darwin \
|
||||
-DCMAKE_C_COMPILER="${{ env.CC }}" \
|
||||
-DCMAKE_C_FLAGS='${{ env.CFLAGS }}' \
|
||||
-DCMAKE_FIND_ROOT_PATH="${{ env.DESTDIR }}" \
|
||||
-DCMAKE_INSTALL_PREFIX="${{ env.PREFIX }}" \
|
||||
-DSTATIC=1
|
||||
make -j$(sysctl -n hw.ncpu)
|
||||
cd ..
|
||||
mkdir -p ready
|
||||
mv build/src/palera1n palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
dsymutil palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
strip palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
ldid -s palera1n-${{ matrix.os }}-${{ matrix.arch }}
|
||||
@@ -447,11 +455,6 @@ jobs:
|
||||
echo "CROSS_COMPILE=${{ matrix.triple }}-" >> $GITHUB_ENV
|
||||
mkdir -p $(pwd)/sysroot/usr/local/lib
|
||||
ln -sf $(pwd)/sysroot/usr/local/lib{,64}
|
||||
|
||||
- name: Download dependencies (embedded binaries)
|
||||
run: |
|
||||
make -j5 download-deps
|
||||
|
||||
- name: Download dependencies (source code)
|
||||
run: |
|
||||
curl -LOOOOOOO \
|
||||
@@ -629,20 +632,29 @@ jobs:
|
||||
cp -a sysroot/${{ env.PREFIX }}/{include,lib} dep_root
|
||||
find dep_root -name '*.so' -delete
|
||||
find dep_root -name '*.la' -delete
|
||||
make -j$(nproc) CC="${{ matrix.triple }}-gcc" palera1n
|
||||
mkdir build
|
||||
cd build
|
||||
CC="${{ matrix.triple }}-gcc" cmake .. -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} \
|
||||
-DCMAKE_FIND_ROOT_PATH=${{ env.DESTDIR }}${{ env.PREFIX }} \
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
|
||||
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \
|
||||
-DCMAKE_C_FLAGS="-I${{ env.DESTDIR }}${{ env.PREFIX }}/include \
|
||||
-L${{ env.DESTDIR }}${{ env.PREFIX }}/lib -Wl,-rpath,${{ env.PREFIX }}/lib" -DSTATIC=1
|
||||
make -j$(nproc) CC="${{ matrix.triple }}-gcc"
|
||||
|
||||
- name: Seperate debug symbols
|
||||
run: |
|
||||
${{ matrix.triple }}-objcopy --only-keep-debug src/palera1n palera1n.debug
|
||||
${{ matrix.triple }}-strip --strip-debug --strip-unneeded src/palera1n
|
||||
${{ matrix.triple }}-objcopy --add-gnu-debuglink=palera1n.debug src/palera1n
|
||||
${{ matrix.triple }}-objcopy --only-keep-debug build/src/palera1n palera1n.debug
|
||||
${{ matrix.triple }}-strip --strip-debug --strip-unneeded build/src/palera1n
|
||||
${{ matrix.triple }}-objcopy --add-gnu-debuglink=palera1n.debug build/src/palera1n
|
||||
chmod -x palera1n.debug
|
||||
|
||||
- name: Prepare artifact
|
||||
run: |
|
||||
mkdir ready
|
||||
mv palera1n.debug ready/palera1n-${{ env.CHECKRA1N_NAME }}.debug
|
||||
mv src/palera1n ready/palera1n-${{ env.CHECKRA1N_NAME }}
|
||||
mv build/src/palera1n ready/palera1n-${{ env.CHECKRA1N_NAME }}
|
||||
tar -zcf ready/dep_root_${{ matrix.triple }}.tgz dep_root
|
||||
|
||||
- name: Upload artifact
|
||||
@@ -657,4 +669,3 @@ jobs:
|
||||
dryRun: false
|
||||
localDir: 'ready/'
|
||||
remoteDir: '/palera1n/artifacts/c-rewrite'
|
||||
|
||||
Reference in new issue
Block a user