Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB64PE v4.0 is now live!!
#12
And for all who wanna get rid of some unused compiler stuff and slim their installation by approx. 5000 files (or ~200MB), here is a new program to perform the task according to your system architecture and the installed QB64-PE version (32/64bit). Run it from inside the QB64pe folder.

Code: (Select All)
_TITLE "KillUnusedStuff"
$IF WIN AND _QB64PE_ AND VERSION >= 4.0.0 THEN
PRINT "This program will delete some unused files and folders from your QB64-PE"
PRINT "installation (v4.0.0 and up)."
PRINT
PRINT "Licensing rules require us to distribute the C/C++ compiler toolchain as"
PRINT "full unmodified package. However, you as the end user are not required to"
PRINT "keep all of it, wasting storage space on your harddrive."
PRINT
PRINT "Since v4.0.0 we utilise the LLVM MinGW C++ compiler, which contains four"
PRINT "distinct compilers for various CPU architectures. As you only need one of"
PRINT "it depending on your system and the installed QB64-PE version (32/64bit),"
PRINT "the other three compilers are useless at all. Removing those will slim your"
PRINT "installation by approx. 5000 files (÷200MB)."
PRINT
LINE INPUT "Do you wanna clean up your installation (y/n): "; ask$
PRINT
IF UCASE$(ask$) <> "Y" GOTO done
'find required compiler
CONST none = 16, aarch64 = 8, armv7 = 4, i686 = 2, x86_64 = 1
SELECT CASE UCASE$(ENVIRON$("PROCESSOR_ARCHITECTURE"))
CASE "AARCH32", "AARCH64", "ARM", "ARM64", "ARMV1", "ARMV2", "ARMV3", "ARMV4", "ARMV5", "ARMV6", "ARMV7", "ARMV8", "ARMV9"
comp% = (aarch64 OR armv7)
CASE "I386", "X86_64", "X86", "AMD64"
comp% = (i686 OR x86_64)
CASE ELSE
comp% = none
END SELECT
IF INSTR(_OS$, "32BIT") > 0 THEN
comp% = comp% AND (none OR armv7 OR i686)
ELSE
comp% = comp% AND (none OR aarch64 OR x86_64)
END IF
'start removal
PRINT "removing generally unused folders..."
SHELL _HIDE "Rd .\internal\source /S /Q"
SHELL _HIDE "Rd .\internal\c\c_compiler\python /S /Q"
SHELL _HIDE "Rd .\internal\c\c_compiler\share /S /Q"
PRINT "removing unused compilers..."
IF (comp% AND none) THEN
PRINT "sorry, unknown architecture, compilers not removed."
GOTO done
END IF
IF _NEGATE (comp% AND aarch64) THEN
SHELL _HIDE "Rd .\internal\c\c_compiler\aarch64-w64-mingw32 /S /Q"
SHELL _HIDE "Del .\internal\c\c_compiler\bin\aarch64-w64*.* /Q"
END IF
IF _NEGATE (comp% AND armv7) THEN
SHELL _HIDE "Rd .\internal\c\c_compiler\armv7-w64-mingw32 /S /Q"
SHELL _HIDE "Del .\internal\c\c_compiler\bin\armv7-w64*.* /Q"
END IF
IF _NEGATE (comp% AND i686) THEN
SHELL _HIDE "Rd .\internal\c\c_compiler\i686-w64-mingw32 /S /Q"
SHELL _HIDE "Del .\internal\c\c_compiler\bin\i686-w64*.* /Q"
END IF
IF _NEGATE (comp% AND x86_64) THEN
SHELL _HIDE "Rd .\internal\c\c_compiler\x86_64-w64-mingw32 /S /Q"
SHELL _HIDE "Del .\internal\c\c_compiler\bin\x86_64-w64*.* /Q"
END IF
done:
PRINT "done."
END
$ELSE
$ERROR "This program is for Windows QB64-PE v4.0.0 or later only !!"
$END IF
Reply


Messages In This Thread
QB64PE v4.0 is now live!! - by SMcNeill - 12-14-2024, 10:17 AM
RE: QB64PE v4.0 is now live!! - by PhilOfPerth - 12-14-2024, 12:37 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - 12-14-2024, 01:36 PM
RE: QB64PE v4.0 is now live!! - by mdijkens - 12-14-2024, 01:04 PM
RE: QB64PE v4.0 is now live!! - by Kernelpanic - 12-14-2024, 03:54 PM
RE: QB64PE v4.0 is now live!! - by JRace - 12-14-2024, 09:53 PM
RE: QB64PE v4.0 is now live!! - by PhilOfPerth - 12-14-2024, 11:10 PM
RE: QB64PE v4.0 is now live!! - by JRace - 12-14-2024, 11:20 PM
RE: QB64PE v4.0 is now live!! - by SMcNeill - 12-14-2024, 11:38 PM
RE: QB64PE v4.0 is now live!! - by GareBear - 12-14-2024, 11:34 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - 12-15-2024, 12:53 AM
RE: QB64PE v4.0 is now live!! - by bert22306 - 12-15-2024, 10:37 PM
RE: QB64PE v4.0 is now live!! - by grymmjack - 12-15-2024, 11:08 AM
RE: QB64PE v4.0 is now live!! - by RhoSigma - 12-15-2024, 11:42 AM
RE: QB64PE v4.0 is now live!! - by doppler - 12-15-2024, 11:25 AM
RE: QB64PE v4.0 is now live!! - by doppler - 12-15-2024, 01:14 PM
RE: QB64PE v4.0 is now live!! - by a740g - 12-15-2024, 02:03 PM
RE: QB64PE v4.0 is now live!! - by doppler - 12-15-2024, 02:36 PM
RE: QB64PE v4.0 is now live!! - by zaadstra - 12-15-2024, 04:59 PM
RE: QB64PE v4.0 is now live!! - by hanness - 12-15-2024, 10:38 PM
RE: QB64PE v4.0 is now live!! - by bert22306 - 12-15-2024, 11:10 PM
RE: QB64PE v4.0 is now live!! - by madscijr - 12-16-2024, 01:50 PM
RE: QB64PE v4.0 is now live!! - by hsiangch_ong - 12-16-2024, 03:21 PM
RE: QB64PE v4.0 is now live!! - by Kernelpanic - Yesterday, 08:05 PM
RE: QB64PE v4.0 is now live!! - by a740g - Yesterday, 09:09 PM
RE: QB64PE v4.0 is now live!! - by a740g - Yesterday, 09:14 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - Yesterday, 09:28 PM
RE: QB64PE v4.0 is now live!! - by Kernelpanic - Yesterday, 10:36 PM
RE: QB64PE v4.0 is now live!! - by RhoSigma - Yesterday, 11:04 PM
RE: QB64PE v4.0 is now live!! - by bert22306 - Yesterday, 10:04 PM



Users browsing this thread: 21 Guest(s)