mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-24 11:09:48 +02:00
refactor(ci): use cpack
refactor(ci): use cpack fix(build): I speld palerain worong (sigh) fix(ci): correct cpack args fix(ci): linux naming fix(build): cpack windows fix(ci): whatever fix(build): dont install deps Co-Authored-By: Nick Chan <[email protected]>
This commit is contained in:
6 files changed
+129
-106
No files matched your search
+35
-11
@@ -155,12 +155,34 @@ jobs:
|
||||
JOBS=$(nproc)
|
||||
${{ matrix.triple }}-strip -s build/palera1n
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cd build
|
||||
case "${{ matrix.triple }}" in
|
||||
i486-linux-musl)
|
||||
cpack
|
||||
mv palera1n.tar.gz palera1n-linux-i486.tar.gz
|
||||
;;
|
||||
x86_64-linux-musl)
|
||||
cpack
|
||||
mv palera1n.tar.gz palera1n-linux-x86_64.tar.gz
|
||||
;;
|
||||
armel-linux-musleabi)
|
||||
cpack
|
||||
mv palera1n.tar.gz palera1n-linux-armel.tar.gz
|
||||
;;
|
||||
aarch64-linux-musl)
|
||||
cpack
|
||||
mv palera1n.tar.gz palera1n-linux-aarch64.tar.gz
|
||||
;;
|
||||
esac
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: palera1n-${{ matrix.triple }}
|
||||
path: |
|
||||
build/palera1n
|
||||
build/*.tar.gz
|
||||
|
||||
build-macos:
|
||||
runs-on: ${{ matrix.os }}
|
||||
@@ -245,12 +267,19 @@ jobs:
|
||||
make palera1n_xcode PLATFORM=iphoneos WITH_STATIC=1 BUILD_TYPE=Release JOBS=$(sysctl -n hw.ncpu)
|
||||
cmake --build build
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
cd build && \
|
||||
cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-iphoneos-arm" && \
|
||||
cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-iphoneos-arm64" \
|
||||
-DCPACK_PACKAGING_INSTALL_PREFIX="/var/jb/usr/local"
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: palera1n-iphoneos-arm64
|
||||
path: |
|
||||
build/Debug-iphoneos/palera1n.app/palera1n
|
||||
build/*.tar.gz
|
||||
|
||||
build-macos-universal:
|
||||
runs-on: macos-latest
|
||||
@@ -340,6 +369,7 @@ jobs:
|
||||
mingw-w64-x86_64-cmake
|
||||
mingw-w64-x86_64-libusb
|
||||
mingw-w64-x86_64-rust
|
||||
mingw-w64-x86_64-nsis
|
||||
libtool
|
||||
openssl
|
||||
openssl-devel
|
||||
@@ -360,20 +390,14 @@ jobs:
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
mkdir -p dist\installer
|
||||
copy build\*.exe dist\installer\
|
||||
copy build\*.dll dist\installer\
|
||||
copy packaging\installer.nsi dist\installer\
|
||||
copy resources\palera1n.ico dist\installer\icon.ico
|
||||
makensis dist\installer\installer.nsi
|
||||
move dist\installer\installer.exe dist\palera1n-windows-x86_64-setup.exe
|
||||
cd build && cpack -DCPACK_PACKAGE_FILE_NAME="palera1n-windows-x86_64-setup"
|
||||
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: palera1n-windows-x86_64
|
||||
path: |
|
||||
dist/palera1n-windows-x86_64-setup.exe
|
||||
build/palera1n-windows-x86_64-setup.exe
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -437,7 +461,7 @@ jobs:
|
||||
|
||||
- name: Prepare artifacts
|
||||
run: |
|
||||
find . -maxdepth 1 -type f -print0 | tar --null --zstd -cf ../dist/resource.tar.zst --files-from=-
|
||||
find . -maxdepth 1 -type f -print0 | tar --null -czf ../dist/resource.tar.gz --files-from=-
|
||||
working-directory: embedded
|
||||
|
||||
- name: Extract Version
|
||||
|
||||
+87
-5
@@ -22,7 +22,7 @@ option(WITH_BINPACK "Build with binpack" ON)
|
||||
option(WITH_CIDERRAIN "Build with Ciderra1n instead of Openra1n" OFF)
|
||||
|
||||
# =========================
|
||||
# BUILD REQUIREMENTS
|
||||
# MARK: BUILD REQUIREMENTS
|
||||
# =========================
|
||||
|
||||
if(LINUX AND WITH_STATIC)
|
||||
@@ -47,6 +47,10 @@ if(IOS AND (WITH_TUI OR WITH_GUI))
|
||||
message(FATAL_ERROR "-DWITH_TUI=1 or -DWITH_GUI=1 is not supported on iOS builds.")
|
||||
endif()
|
||||
|
||||
if(IOS AND WITH_CIDERRAIN)
|
||||
message(FATAL_ERROR "-DWITH_CIDERRAIN=1 is not supported on iOS builds.")
|
||||
endif()
|
||||
|
||||
# =========================
|
||||
# SETUP
|
||||
# =========================
|
||||
@@ -67,9 +71,12 @@ endif()
|
||||
set(AUTOTOOLS_BUILD_TRIPLE "x86_64-linux-gnu")
|
||||
|
||||
# =========================
|
||||
# CMAKE DEPENDENCIES
|
||||
# MARK: CMAKE DEPENDENCIES
|
||||
# =========================
|
||||
|
||||
set(wxBUILD_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
set(JSON_Install OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# wxWidgets
|
||||
if(WITH_GUI)
|
||||
if(WITH_STATIC)
|
||||
@@ -99,7 +106,7 @@ FetchContent_Declare(
|
||||
FetchContent_MakeAvailable(nlohmann_json)
|
||||
|
||||
# =========================
|
||||
# TARGET
|
||||
# MARK: TARGET
|
||||
# =========================
|
||||
|
||||
file(GLOB_RECURSE SOURCES CONFIGURE_DEPENDS
|
||||
@@ -186,7 +193,7 @@ target_compile_definitions(palera1n PRIVATE
|
||||
)
|
||||
|
||||
# =========================
|
||||
# LINKS
|
||||
# MARK: LINKS
|
||||
# =========================
|
||||
|
||||
if(APPLE)
|
||||
@@ -201,7 +208,7 @@ if(WIN32)
|
||||
endif()
|
||||
|
||||
# =========================
|
||||
# NON-CMAKE DEPENDENCIES
|
||||
# MARK: NON-CMAKE DEPENDENCIES
|
||||
# =========================
|
||||
|
||||
# ra1ns
|
||||
@@ -587,3 +594,78 @@ else()
|
||||
target_compile_options(palera1n PRIVATE ${LIBUSB_CFLAGS_OTHER})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# =========================
|
||||
# MARK: INSTALL
|
||||
# =========================
|
||||
|
||||
if(LINUX AND NOT MINGW)
|
||||
install(TARGETS palera1n RUNTIME DESTINATION bin)
|
||||
elseif(IOS)
|
||||
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Debug-iphoneos/palera1n.app/palera1n" DESTINATION bin)
|
||||
elseif(APPLE AND WITH_GUI)
|
||||
install(TARGETS palera1n BUNDLE DESTINATION .)
|
||||
elseif(APPLE)
|
||||
install(TARGETS palera1n RUNTIME DESTINATION bin)
|
||||
elseif(MINGW)
|
||||
install(TARGETS palera1n
|
||||
RUNTIME DESTINATION .
|
||||
)
|
||||
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libstdc++-6.dll"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libgcc_s_seh-1.dll"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libwinpthread-1.dll"
|
||||
DESTINATION .
|
||||
)
|
||||
|
||||
if(NOT WITH_CIDERRAIN)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/libusb-1.0.dll"
|
||||
DESTINATION .
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
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/p1ctl.8" DESTINATION share/man/man8)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_NAME "palera1n")
|
||||
set(CPACK_PACKAGE_VERSION "0")
|
||||
set(CPACK_PACKAGE_FILE_NAME "palera1n")
|
||||
|
||||
if(MINGW)
|
||||
set(CPACK_GENERATOR "NSIS64")
|
||||
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "palera1n")
|
||||
set(CPACK_NSIS_DISPLAY_NAME "palera1n")
|
||||
set(CPACK_NSIS_PACKAGE_NAME "palera1n")
|
||||
set(CPACK_NSIS_BRANDING_TEXT "palera1n Setup")
|
||||
|
||||
set(CPACK_NSIS_MODIFY_PATH OFF)
|
||||
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/resources/palera1n.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/resources/palera1n.ico")
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "palera1n" "palera1n")
|
||||
|
||||
set(CPACK_NSIS_CREATE_ICONS_EXTRA
|
||||
"CreateShortCut \\\"\\$DESKTOP\\\\palera1n.lnk\\\" \\\"\\$INSTDIR\\\\bin\\\\palera1n.exe\\\""
|
||||
)
|
||||
|
||||
set(CPACK_NSIS_DELETE_ICONS_EXTRA
|
||||
"Delete \\\"\\$DESKTOP\\\\palera1n.lnk\\\""
|
||||
)
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
elseif(APPLE AND WITH_GUI)
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
else()
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
|
||||
set(CPACK_GENERATOR "TGZ")
|
||||
endif()
|
||||
|
||||
include(CPack)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
.PHONY: apple-include payloads palera1n palera1n_xcode palera1n_mingw clean
|
||||
|
||||
# TODO: get rid of this makefile, this is too complicated
|
||||
|
||||
WITH_GUI ?= 0
|
||||
WITH_TUI ?= 0
|
||||
WITH_RAMDISK ?= 1
|
||||
@@ -147,3 +149,5 @@ palera1n_mingw: payloads
|
||||
clean:
|
||||
@rm -rf build src/gen
|
||||
@rm -rf apple-include-*
|
||||
@if [ -d 1stparty/libciderra1n ]; then $(MAKE) -C 1stparty/libciderra1n clean; fi
|
||||
@$(MAKE) -C 1stparty/libopenra1n clean
|
||||
@@ -1,87 +0,0 @@
|
||||
;===========================================================
|
||||
; Modern NSIS Installer for a Single EXE (64-bit)
|
||||
;===========================================================
|
||||
|
||||
!define APPNAME "palera1n"
|
||||
!define APPEXE "palera1n.exe"
|
||||
!define COMPANY "palera1n"
|
||||
|
||||
Name "${APPNAME}"
|
||||
BrandingText "${APPNAME} Setup"
|
||||
|
||||
OutFile "installer.exe"
|
||||
|
||||
RequestExecutionLevel admin
|
||||
InstallDir "$PROGRAMFILES64\${APPNAME}"
|
||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "InstallLocation"
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Modern UI 2
|
||||
;-----------------------------------------------------------
|
||||
!include "MUI2.nsh"
|
||||
|
||||
!define MUI_ABORTWARNING
|
||||
!define MUI_ICON "icon.ico"
|
||||
!define MUI_UNICON "icon.ico"
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Installer Pages
|
||||
;-----------------------------------------------------------
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; Uninstaller Pages
|
||||
;-----------------------------------------------------------
|
||||
!insertmacro MUI_UNPAGE_WELCOME
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
!insertmacro MUI_UNPAGE_FINISH
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
;===========================================================
|
||||
; Installer Section
|
||||
;===========================================================
|
||||
Section "Install"
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File "${APPEXE}"
|
||||
File "*.dll"
|
||||
|
||||
; Start Menu entries
|
||||
CreateDirectory "$SMPROGRAMS\${APPNAME}"
|
||||
CreateShortcut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${APPEXE}"
|
||||
|
||||
CreateShortcut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${APPEXE}"
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
; 64-bit registry uninstall entry
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "${COMPANY}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "InstallLocation" "$INSTDIR"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$INSTDIR\Uninstall.exe"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "NoRepair" 1
|
||||
|
||||
SectionEnd
|
||||
|
||||
;===========================================================
|
||||
; Uninstaller Section
|
||||
;===========================================================
|
||||
Section "Uninstall"
|
||||
|
||||
Delete "$DESKTOP\${APPNAME}.lnk"
|
||||
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
|
||||
RMDir "$SMPROGRAMS\${APPNAME}"
|
||||
|
||||
; Delete all files
|
||||
Delete "$INSTDIR\*.*"
|
||||
RMDir /r "$INSTDIR"
|
||||
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
|
||||
|
||||
SectionEnd
|
||||
+1
-1
@@ -331,7 +331,7 @@ int exploit(int *stage)
|
||||
LOG("Found pongo mode device");
|
||||
*stage = STAGE_PONGO;
|
||||
|
||||
if (palera1n_flags & palerain_option_pongo_exit)
|
||||
if (palerain_flags & palerain_option_pongo_exit)
|
||||
goto pongo_done;
|
||||
|
||||
cr = send_full_pongo_jailbreak(&pongoHandle);
|
||||
|
||||
+2
-2
@@ -65,7 +65,7 @@ void print_credits() {
|
||||
"::\n"
|
||||
":: ======== Made by =======>\n"
|
||||
":: Made by: asdfugil, kok3shidoll, claration, mineek\n"
|
||||
":: nekohaxx, plooshi, staturnz\n"
|
||||
":: plooshi, staturnz\n"
|
||||
":: ======== Thanks to =======>\n"
|
||||
":: Thanks to: itsnebulalol, llsc12, lrdsnow, dedbeddedbed\n"
|
||||
":: kirb, ehilwyma, opa334, 0x7ff, alfiecg25, sneko, sbingner\n"
|
||||
@@ -577,7 +577,7 @@ void parse_arguments(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
// controls logging settings in our checkm8 libraries
|
||||
if (palerain_flags & palerain_option_no_colors) gSilentLogs = false;
|
||||
if (palerain_flags & palerain_option_no_colors) gColoredLogs = false;
|
||||
if (palerain_flags & palerain_option_tui) gSilentLogs = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user