mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 10:05:23 +00:00
Move binaries to seperate folder
This commit is contained in:
parent
bae2c9bc63
commit
332f531a10
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -10,8 +10,7 @@
|
||||
*.cmd text eol=crlf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
busybox binary
|
||||
futility binary
|
||||
binaries/** binary
|
||||
*.jar binary
|
||||
*.exe binary
|
||||
*.apk binary
|
||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -2,15 +2,17 @@ obj/
|
||||
libs/
|
||||
*.zip
|
||||
|
||||
# Generated binaries
|
||||
# Copied binaries
|
||||
zip_static/arm/*
|
||||
zip_static/arm64/*
|
||||
zip_static/x86/*
|
||||
zip_static/x64/*
|
||||
zip_static/chromeos/*
|
||||
uninstaller/arm/*
|
||||
uninstaller/arm64/*
|
||||
uninstaller/x86/*
|
||||
uninstaller/x64/*
|
||||
uninstaller/chromeos/*
|
||||
ziptools/zipadjust
|
||||
|
||||
# Generated scripts
|
||||
@ -20,6 +22,3 @@ zip_static/common/magisksu.sh
|
||||
zip_static/common/init.magisk.rc
|
||||
zip_static/common/custom_ramdisk_patch.sh
|
||||
zip_static/META-INF/com/google/android/update-binary
|
||||
|
||||
# Leave all busybox!
|
||||
!busybox
|
||||
|
30
build.cmd
30
build.cmd
@ -69,10 +69,11 @@ EXIT /B %ERRORLEVEL%
|
||||
ECHO * Cleaning up
|
||||
ECHO ************************
|
||||
CALL ndk-build clean
|
||||
forfiles /P zip_static\arm /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
||||
forfiles /P zip_static\arm64 /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
||||
forfiles /P zip_static\x86 /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
||||
forfiles /P zip_static\x64 /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
||||
2>NUL RMDIR /S /Q zip_static\arm
|
||||
2>NUL RMDIR /S /Q zip_static\arm64
|
||||
2>NUL RMDIR /S /Q zip_static\x86
|
||||
2>NUL RMDIR /S /Q zip_static\x64
|
||||
2>NUL RMDIR /S /Q zip_static\chromeos
|
||||
2>NUL DEL zip_static\META-INF\com\google\android\update-binary
|
||||
2>NUL DEL zip_static\common\custom_ramdisk_patch.sh
|
||||
2>NUL DEL zip_static\common\magisksu.sh
|
||||
@ -83,6 +84,7 @@ EXIT /B %ERRORLEVEL%
|
||||
2>NUL RMDIR /S /Q uninstaller\arm64
|
||||
2>NUL RMDIR /S /Q uninstaller\x86
|
||||
2>NUL RMDIR /S /Q uninstaller\x64
|
||||
2>NUL RMDIR /S /Q uninstaller\chromeos
|
||||
EXIT /B 0
|
||||
|
||||
:zip
|
||||
@ -100,11 +102,19 @@ EXIT /B %ERRORLEVEL%
|
||||
powershell.exe -nologo -noprofile -command "(gc -Raw scripts\flash_script.sh) -replace 'MAGISK_VERSION_STUB', 'Magisk v%~1 Boot Image Patcher' | sc zip_static\META-INF\com\google\android\update-binary"
|
||||
powershell.exe -nologo -noprofile -command "(gc -Raw scripts\magic_mask.sh) -replace 'MAGISK_VERSION_STUB', 'setprop magisk.version \"%~1\"' | sc zip_static\common\magic_mask.sh"
|
||||
ECHO ************************
|
||||
ECHO * Zipping Magisk v%~1
|
||||
ECHO * Copying Files
|
||||
ECHO ************************
|
||||
COPY /Y scripts\custom_ramdisk_patch.sh zip_static\common\custom_ramdisk_patch.sh
|
||||
COPY /Y scripts\magisksu.sh zip_static\common\magisksu.sh
|
||||
COPY /Y scripts\init.magisk.rc zip_static\common\init.magisk.rc
|
||||
COPY /Y binaries\busybox-arm zip_static\arm\busybox
|
||||
COPY /Y binaries\busybox-arm64 zip_static\arm64\busybox
|
||||
COPY /Y binaries\busybox-x86 zip_static\x86\busybox
|
||||
COPY /Y binaries\busybox-x64 zip_static\x64\busybox
|
||||
CALL :mkcp binaries\chromeos zip_static\chromeos
|
||||
ECHO ************************
|
||||
ECHO * Zipping Magisk v%~1
|
||||
ECHO ************************
|
||||
CD zip_static
|
||||
2>NUL DEL "..\Magisk-v%~1.zip"
|
||||
..\ziptools\win_bin\zip "..\Magisk-v%~1.zip" -r .
|
||||
@ -117,9 +127,17 @@ EXIT /B %ERRORLEVEL%
|
||||
IF NOT EXIST "uninstaller\arm\bootimgtools" CALL :error "Missing binaries! Please run '%me% build' before zipping!"
|
||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||
ECHO ************************
|
||||
ECHO * Zipping uninstaller
|
||||
ECHO * Copying Files
|
||||
ECHO ************************
|
||||
CALL :mkcp scripts\magisk_uninstaller.sh uninstaller\common
|
||||
COPY /Y binaries\busybox-arm uninstaller\arm\busybox
|
||||
COPY /Y binaries\busybox-arm64 uninstaller\arm64\busybox
|
||||
COPY /Y binaries\busybox-x86 uninstaller\x86\busybox
|
||||
COPY /Y binaries\busybox-x64 uninstaller\x64\busybox
|
||||
CALL :mkcp binaries\chromeos uninstaller\chromeos
|
||||
ECHO ************************
|
||||
ECHO * Zipping uninstaller
|
||||
ECHO ************************
|
||||
FOR /F "tokens=* USEBACKQ" %%F IN (`ziptools\win_bin\date "+%%Y%%m%%d"`) DO (set timestamp=%%F)
|
||||
CD uninstaller
|
||||
2>NUL DEL "../Magisk-uninstaller-%timestamp%.zip"
|
||||
|
29
build.sh
29
build.sh
@ -20,10 +20,11 @@ cleanup() {
|
||||
echo "* Cleaning up"
|
||||
echo "************************"
|
||||
ndk-build clean 2>/dev/null
|
||||
ls zip_static/arm/* | grep -v "busybox" | xargs rm -rfv
|
||||
ls zip_static/arm64/* | grep -v "busybox" | xargs rm -rfv
|
||||
ls zip_static/x86/* | grep -v "busybox" | xargs rm -rfv
|
||||
ls zip_static/x64/* | grep -v "busybox" | xargs rm -rfv
|
||||
rm -rfv zip_static/arm
|
||||
rm -rfv zip_static/arm64
|
||||
rm -rfv zip_static/x86
|
||||
rm -rfv zip_static/x64
|
||||
rm -rfv zip_static/chromeos
|
||||
rm -rfv zip_static/META-INF/com/google/android/update-binary
|
||||
rm -rfv zip_static/common/custom_ramdisk_patch.sh
|
||||
rm -rfv zip_static/common/magisksu.sh
|
||||
@ -34,6 +35,7 @@ cleanup() {
|
||||
rm -rfv uninstaller/arm64
|
||||
rm -rfv uninstaller/x86
|
||||
rm -rfv uninstaller/x64
|
||||
rm -rfv uninstaller/chromeos
|
||||
}
|
||||
|
||||
mkcp() {
|
||||
@ -73,11 +75,19 @@ zip_package() {
|
||||
sed "s/MAGISK_VERSION_STUB/Magisk v$1 Boot Image Patcher/g" scripts/flash_script.sh > zip_static/META-INF/com/google/android/update-binary
|
||||
sed "s/MAGISK_VERSION_STUB/setprop magisk.version \"$1\"/g" scripts/magic_mask.sh > zip_static/common/magic_mask.sh
|
||||
echo "************************"
|
||||
echo "* Zipping Magisk v$1"
|
||||
echo "* Copying files"
|
||||
echo "************************"
|
||||
cp -afv scripts/custom_ramdisk_patch.sh zip_static/common/custom_ramdisk_patch.sh
|
||||
cp -afv scripts/magisksu.sh zip_static/common/magisksu.sh
|
||||
cp -afv scripts/init.magisk.rc zip_static/common/init.magisk.rc
|
||||
cp -afv binaries/busybox-arm zip_static/arm/busybox
|
||||
cp -afv binaries/busybox-arm64 zip_static/arm64/busybox
|
||||
cp -afv binaries/busybox-x86 zip_static/x86/busybox
|
||||
cp -afv binaries/busybox-x64 zip_static/x64/busybox
|
||||
cp -afv binaries/chromeos/. zip_static/chromeos
|
||||
echo "************************"
|
||||
echo "* Zipping Magisk v$1"
|
||||
echo "************************"
|
||||
cd zip_static
|
||||
find . -type f -exec chmod 644 {} \;
|
||||
find . -type d -exec chmod 755 {} \;
|
||||
@ -90,6 +100,15 @@ zip_package() {
|
||||
zip_uninstaller() {
|
||||
[ ! -f "uninstaller/arm/bootimgtools" ] && error "Missing binaries!! Please run '$0 build' before zipping"
|
||||
echo "************************"
|
||||
echo "* Copying files"
|
||||
echo "************************"
|
||||
mkcp scripts/magisk_uninstaller.sh uninstaller/common
|
||||
cp -afv binaries/busybox-arm uninstaller/arm/busybox
|
||||
cp -afv binaries/busybox-arm64 uninstaller/arm64/busybox
|
||||
cp -afv binaries/busybox-x86 uninstaller/x86/busybox
|
||||
cp -afv binaries/busybox-x64 uninstaller/x64/busybox
|
||||
cp -afv binaries/chromeos/. zip_static/chromeos
|
||||
echo "************************"
|
||||
echo "* Zipping uninstaller"
|
||||
echo "************************"
|
||||
mkcp scripts/magisk_uninstaller.sh uninstaller/common
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user