Posts: 2,911
Threads: 341
Joined: Apr 2022
Reputation:
265
(12-14-2024, 11:20 PM)JRace Wrote: (12-14-2024, 11:10 PM)PhilOfPerth Wrote: Ok,thanks. I'll place everything into an "oldPE" folder, download and install the new version into a new QB64PE folder (directly onto the C drive), then bring in my own files.
Is this what's meant to happen??
That should work, as long as you don't install to the root of the C: drive. Windows might not tolerate "C:\qb64pe" (or C:\<any_program>).
On my desktop box I have a folder "C:\prog" for compilers & interpreters. PE is "C:\prog\qb64pe", and Windows has never given me a bit of trouble over it.
And don't forget to whitelist it for your antivirus.
Posts: 126
Threads: 12
Joined: Apr 2022
Reputation:
58
12-15-2024, 12:53 AM
(This post was last modified: 12-19-2024, 04:03 PM by RhoSigma.)
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 "QB64PE-Cleaner"
| | '----------------------
| | $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/deliver the LLVM MinGW C/C++ compiler toolchain"
| | PRINT "with the Windows versions of QB64-PE. This toolchain contains four distinct"
| | PRINT "compilers for various CPU architectures."
| | PRINT "However, you only need one of these compilers depending on your system and"
| | PRINT "the installed QB64-PE version (32/64bit), while the other three are useless."
| | PRINT "Removing those will slim your 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", "IA64", "X86", "X86_64", "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..."
| | IF NOT _FILEEXISTS("setup_win.cmd") THEN ' 'user might want to build from source (repository clone)
| | SHELL _HIDE "Rd .\internal\source /S /Q" 'if not, then we don't need this either
| | END IF
| | 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
|
Posts: 486
Threads: 24
Joined: Nov 2022
Reputation:
51
@RhoSigma that's a great utility. Thanks for sharing it.
For Linux/macOS the following should work:
- Change Rd to rm -rf
- Get rid of /S /Q at the end of the Rd
- Change Del to rm -f
- Get rid of /Q at end of Del
Question: Can we put this somewhere prominent in the wiki? We can't include it in the download right? Or can we?
Posts: 119
Threads: 35
Joined: Apr 2022
Reputation:
9
@ RhoSigma
If you add _Title "killunusedstuff" to the top line. The untitled.bas (copied code) will autoname when you "Save As..."
Look more professional and no accidental miss naming the program.
Posts: 126
Threads: 12
Joined: Apr 2022
Reputation:
58
12-15-2024, 11:42 AM
(This post was last modified: 12-15-2024, 11:51 AM by RhoSigma.)
(12-15-2024, 11:08 AM)grymmjack Wrote: @RhoSigma that's a great utility. Thanks for sharing it.
For Linux/macOS the following should work:
- Change Rd to rm -rf
- Get rid of /S /Q at the end of the Rd
- Change Del to rm -f
- Get rid of /Q at end of Del
Question: Can we put this somewhere prominent in the wiki? We can't include it in the download right? Or can we? WARNING
I'm not sure if this program (from post #12) should be used on Linux/Mac at all, I don't know the folder structure of the compilers on that systems, they are usually pre-installed and not in the QB64pe folder. I'm also not sure if the queried environment variable does exist on Linux/Mac, which determines the CPU architecture.
Once more, the program I posted is made explicitly for the Windows versions of QB64-PE, which come with the LLVM MinGW package. You've been warned.
Posts: 119
Threads: 35
Joined: Apr 2022
Reputation:
9
First bug of V4 ???
example:
Do
Print ".";
c = c + 1
If c Mod 10 = 0 Then Play "a64g64"
Loop
Play volume is not default 50% and not changeable with the Q## "play" variable. Tested with 3.14 as a baseline. V4.0 is much louder 100% and harsh distorted because of it. Sorry you got to kill the window, didn't leave an escape route.
Posts: 411
Threads: 25
Joined: May 2022
Reputation:
78
(12-15-2024, 01:14 PM)doppler Wrote: First bug of V4 ???
example:
Do
Print ".";
c = c + 1
If c Mod 10 = 0 Then Play "a64g64"
Loop
Play volume is not default 50% and not changeable with the Q## "play" variable. Tested with 3.14 as a baseline. V4.0 is much louder 100% and harsh distorted because of it. Sorry you got to kill the window, didn't leave an escape route.
The volume is still 50% by default. It is just that it uses a square waveform by default just like QB45 did back in the day. Previously, QB64 used a triangle waveform, which has a much softer sound compared to a square waveform. For compatibility, we always reference QB45 as the standard.
You can adjust the volume using the "v" MML command. For example: Code: (Select All)
PLAY "v20"
Alternatively, you can change the waveform to a triangle with an optional volume ramp like so: Code: (Select All)
PLAY "@3Q1"
Once set, all subsequent PLAY commands will use the triangle waveform. If you are using multi-voice playback, remember to apply this change for each voice.
Posts: 119
Threads: 35
Joined: Apr 2022
Reputation:
9
(12-15-2024, 02:03 PM)a740g Wrote: (12-15-2024, 01:14 PM)doppler Wrote: First bug of V4 ???
example:
Do
Print ".";
c = c + 1
If c Mod 10 = 0 Then Play "a64g64"
Loop
Play volume is not default 50% and not changeable with the Q## "play" variable. Tested with 3.14 as a baseline. V4.0 is much louder 100% and harsh distorted because of it. Sorry you got to kill the window, didn't leave an escape route.
The volume is still 50% by default. It is just that it uses a square waveform by default just like QB45 did back in the day. Previously, QB64 used a triangle waveform, which has a much softer sound compared to a square waveform. For compatibility, we always reference QB45 as the standard.
You can adjust the volume using the "v" MML command. For example: Code: (Select All)
PLAY "v20"
Alternatively, you can change the waveform to a triangle with an optional volume ramp like so: Code: (Select All)
PLAY "@3Q1"
Once set, all subsequent PLAY commands will use the triangle waveform. If you are using multi-voice playback, remember to apply this change for each voice. So it was a bug. THAT WAS FIXED to be qb45 compatible. Thanks for the unfix suggestions (qb64 compatible). Square waves contain too many harmonics that made it sound harsh.
Posts: 18
Threads: 1
Joined: Apr 2022
Reputation:
1
Happy Birthday, QB64PE v4.0!
Thanks to all people that made it possible.
Looking forward to try it out.
Posts: 68
Threads: 9
Joined: Apr 2022
Reputation:
7
(12-15-2024, 12:53 AM)RhoSigma Wrote: 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. Wow, slick! Thanks, RhoSigma!
|