mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +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
|
*.cmd text eol=crlf
|
||||||
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
# Denote all files that are truly binary and should not be modified.
|
||||||
busybox binary
|
binaries/** binary
|
||||||
futility binary
|
|
||||||
*.jar binary
|
*.jar binary
|
||||||
*.exe binary
|
*.exe binary
|
||||||
*.apk binary
|
*.apk binary
|
||||||
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -2,15 +2,17 @@ obj/
|
|||||||
libs/
|
libs/
|
||||||
*.zip
|
*.zip
|
||||||
|
|
||||||
# Generated binaries
|
# Copied binaries
|
||||||
zip_static/arm/*
|
zip_static/arm/*
|
||||||
zip_static/arm64/*
|
zip_static/arm64/*
|
||||||
zip_static/x86/*
|
zip_static/x86/*
|
||||||
zip_static/x64/*
|
zip_static/x64/*
|
||||||
|
zip_static/chromeos/*
|
||||||
uninstaller/arm/*
|
uninstaller/arm/*
|
||||||
uninstaller/arm64/*
|
uninstaller/arm64/*
|
||||||
uninstaller/x86/*
|
uninstaller/x86/*
|
||||||
uninstaller/x64/*
|
uninstaller/x64/*
|
||||||
|
uninstaller/chromeos/*
|
||||||
ziptools/zipadjust
|
ziptools/zipadjust
|
||||||
|
|
||||||
# Generated scripts
|
# Generated scripts
|
||||||
@ -20,6 +22,3 @@ zip_static/common/magisksu.sh
|
|||||||
zip_static/common/init.magisk.rc
|
zip_static/common/init.magisk.rc
|
||||||
zip_static/common/custom_ramdisk_patch.sh
|
zip_static/common/custom_ramdisk_patch.sh
|
||||||
zip_static/META-INF/com/google/android/update-binary
|
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 * Cleaning up
|
||||||
ECHO ************************
|
ECHO ************************
|
||||||
CALL ndk-build clean
|
CALL ndk-build clean
|
||||||
forfiles /P zip_static\arm /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
2>NUL RMDIR /S /Q zip_static\arm
|
||||||
forfiles /P zip_static\arm64 /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
2>NUL RMDIR /S /Q zip_static\arm64
|
||||||
forfiles /P zip_static\x86 /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
2>NUL RMDIR /S /Q zip_static\x86
|
||||||
forfiles /P zip_static\x64 /C "cmd /C IF NOT @file == \"busybox\" DEL @file"
|
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\META-INF\com\google\android\update-binary
|
||||||
2>NUL DEL zip_static\common\custom_ramdisk_patch.sh
|
2>NUL DEL zip_static\common\custom_ramdisk_patch.sh
|
||||||
2>NUL DEL zip_static\common\magisksu.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\arm64
|
||||||
2>NUL RMDIR /S /Q uninstaller\x86
|
2>NUL RMDIR /S /Q uninstaller\x86
|
||||||
2>NUL RMDIR /S /Q uninstaller\x64
|
2>NUL RMDIR /S /Q uninstaller\x64
|
||||||
|
2>NUL RMDIR /S /Q uninstaller\chromeos
|
||||||
EXIT /B 0
|
EXIT /B 0
|
||||||
|
|
||||||
:zip
|
: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\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"
|
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 ************************
|
||||||
ECHO * Zipping Magisk v%~1
|
ECHO * Copying Files
|
||||||
ECHO ************************
|
ECHO ************************
|
||||||
COPY /Y scripts\custom_ramdisk_patch.sh zip_static\common\custom_ramdisk_patch.sh
|
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\magisksu.sh zip_static\common\magisksu.sh
|
||||||
COPY /Y scripts\init.magisk.rc zip_static\common\init.magisk.rc
|
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
|
CD zip_static
|
||||||
2>NUL DEL "..\Magisk-v%~1.zip"
|
2>NUL DEL "..\Magisk-v%~1.zip"
|
||||||
..\ziptools\win_bin\zip "..\Magisk-v%~1.zip" -r .
|
..\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 NOT EXIST "uninstaller\arm\bootimgtools" CALL :error "Missing binaries! Please run '%me% build' before zipping!"
|
||||||
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
IF %ERRORLEVEL% NEQ 0 EXIT /B %ERRORLEVEL%
|
||||||
ECHO ************************
|
ECHO ************************
|
||||||
ECHO * Zipping uninstaller
|
ECHO * Copying Files
|
||||||
ECHO ************************
|
ECHO ************************
|
||||||
CALL :mkcp scripts\magisk_uninstaller.sh uninstaller\common
|
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)
|
FOR /F "tokens=* USEBACKQ" %%F IN (`ziptools\win_bin\date "+%%Y%%m%%d"`) DO (set timestamp=%%F)
|
||||||
CD uninstaller
|
CD uninstaller
|
||||||
2>NUL DEL "../Magisk-uninstaller-%timestamp%.zip"
|
2>NUL DEL "../Magisk-uninstaller-%timestamp%.zip"
|
||||||
|
29
build.sh
29
build.sh
@ -20,10 +20,11 @@ cleanup() {
|
|||||||
echo "* Cleaning up"
|
echo "* Cleaning up"
|
||||||
echo "************************"
|
echo "************************"
|
||||||
ndk-build clean 2>/dev/null
|
ndk-build clean 2>/dev/null
|
||||||
ls zip_static/arm/* | grep -v "busybox" | xargs rm -rfv
|
rm -rfv zip_static/arm
|
||||||
ls zip_static/arm64/* | grep -v "busybox" | xargs rm -rfv
|
rm -rfv zip_static/arm64
|
||||||
ls zip_static/x86/* | grep -v "busybox" | xargs rm -rfv
|
rm -rfv zip_static/x86
|
||||||
ls zip_static/x64/* | grep -v "busybox" | xargs rm -rfv
|
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/META-INF/com/google/android/update-binary
|
||||||
rm -rfv zip_static/common/custom_ramdisk_patch.sh
|
rm -rfv zip_static/common/custom_ramdisk_patch.sh
|
||||||
rm -rfv zip_static/common/magisksu.sh
|
rm -rfv zip_static/common/magisksu.sh
|
||||||
@ -34,6 +35,7 @@ cleanup() {
|
|||||||
rm -rfv uninstaller/arm64
|
rm -rfv uninstaller/arm64
|
||||||
rm -rfv uninstaller/x86
|
rm -rfv uninstaller/x86
|
||||||
rm -rfv uninstaller/x64
|
rm -rfv uninstaller/x64
|
||||||
|
rm -rfv uninstaller/chromeos
|
||||||
}
|
}
|
||||||
|
|
||||||
mkcp() {
|
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/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
|
sed "s/MAGISK_VERSION_STUB/setprop magisk.version \"$1\"/g" scripts/magic_mask.sh > zip_static/common/magic_mask.sh
|
||||||
echo "************************"
|
echo "************************"
|
||||||
echo "* Zipping Magisk v$1"
|
echo "* Copying files"
|
||||||
echo "************************"
|
echo "************************"
|
||||||
cp -afv scripts/custom_ramdisk_patch.sh zip_static/common/custom_ramdisk_patch.sh
|
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/magisksu.sh zip_static/common/magisksu.sh
|
||||||
cp -afv scripts/init.magisk.rc zip_static/common/init.magisk.rc
|
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
|
cd zip_static
|
||||||
find . -type f -exec chmod 644 {} \;
|
find . -type f -exec chmod 644 {} \;
|
||||||
find . -type d -exec chmod 755 {} \;
|
find . -type d -exec chmod 755 {} \;
|
||||||
@ -90,6 +100,15 @@ zip_package() {
|
|||||||
zip_uninstaller() {
|
zip_uninstaller() {
|
||||||
[ ! -f "uninstaller/arm/bootimgtools" ] && error "Missing binaries!! Please run '$0 build' before zipping"
|
[ ! -f "uninstaller/arm/bootimgtools" ] && error "Missing binaries!! Please run '$0 build' before zipping"
|
||||||
echo "************************"
|
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 "* Zipping uninstaller"
|
||||||
echo "************************"
|
echo "************************"
|
||||||
mkcp scripts/magisk_uninstaller.sh uninstaller/common
|
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