Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QB664PE v3.10.0 is now live for X-Mas!!
#21
Yeah it looks like they're marked `R` in the MinGW 7z archive, a bit odd. Like @RhoSigma is thinking I'm pretty sure we could strip that off before we create the release.
Reply
#22
(12-19-2023, 08:36 PM)RhoSigma Wrote:
(12-19-2023, 01:50 PM)doppler Wrote: I find the embed stuff very interesting.  I like the F5 fix #399 too.  I have been bitten by that one once or twice.

Edit:
I usually expand the qb64pe into a ram drive.  (just faster than HDD) Before copying my bas sources and other stuff.  (into ram drive copy). Then I rename original qb64pe to qb64pe-org.  Being very cautious.  Here is the thing.  There are a couple of files which are marked "Read-only" in the directory structure.  So when I move the new ram drive directory of qb64pe to my HDD.  I get warnings about deleting read-only files.

Do those files have to be "read-only" attributed ?
attached list of names n paths

There's no need to make any files read-only, so just change the attribute as needed.

More than that its all files in ......\opt\..... which are not required at all, the first thing I do after extracting a new qb64pe release is typically go into internal\c\c_compiler and completely delete the folders "licenses", "opt" and "share". It's about 3/4 of the entire windows package (some 15000 files) which are absolutely not required to compile any QB64 programs.

We could just strip out these from the package, if there wouldn't be the license requirement to distribute only the full unmodified MinGW package. However, you as the end user are under no obligation to keep all these "dead" unused files on your drive.


Thank you for mentioning those unneeded directories.

I routinely use a home-brew "cruft cleaner" to remove unnecessary files & folders, and to compact/optimize certain file types in large program installations, especially compilers.  That cleaner is somewhat conservative for safety's sake, and you pointed out a couple directories that it misses.

I just packed the Win version of 3.10.0 into a self-extracting archive for personal use only on thumb drives, and removing those directories shaved almost 40M from the finished file size.  Looks like about 160M worth of files, uncompressed.


Idle thought: maybe a batch file could be included in the PE package to delete those unneeded folders, if the user pinkie-swears that it is for personal use only and they will not redistribute the modified package?
Reply
#23
(12-20-2023, 03:59 AM)JRace Wrote:  if the user pinkie-swears that it is for personal use only
And if you break that promise I will call you: " lying dog-faced pony soldier ".  T.I.C.
Reply
#24
Nice Christmas present! Thanks to everyone who shows so much enthusiasm in their free time.
Thanks also for the tip about being able to delete unnecessary files. A bat file or a WSH script would be of no use because one don't know how the users' system is structured. It would perhaps make sense to include a text: “Please read the note” and then a short explanation.

Here is a first attempt with the new possibilities. The 7z file also contains the image. The path must be adjusted of course .

Code: (Select All)

'Neue Funktionen im Version 3.10.0 - $Embed + _Embedded$
'21. Dez. 2023

Option _Explicit

$Embed:'D:\Lab\QuickBasic64\Uebungen\Embed\Pizza2.jpg','Pizzawein'

Dim As Long piz

Screen _NewImage(1000, 650, 32)

piz = _LoadImage(_Embedded$("Pizzawein"), 32, "memory")

_PutImage (5, 4), piz

_FreeImage piz

End

[Image: Pizza-Embed2023-12-21.jpg]


Attached Files
.7z   Embed.7z (Size: 139.73 KB / Downloads: 23)
Reply
#25
(12-21-2023, 09:25 PM)Kernelpanic Wrote: Nice Christmas present! Thanks to everyone who shows so much enthusiasm in their free time.
Thanks also for the tip about being able to delete unnecessary files. A bat file or a WSH script would be of no use because one don't know how the users' system is structured. It would perhaps make sense to include a text: “Please read the note” and then a short explanation.

Here is a first attempt with the new possibilities. The 7z file also contains the image. The path must be adjusted of course .

Code: (Select All)

'Neue Funktionen im Version 3.10.0 - $Embed + _Embedded$
'21. Dez. 2023

Option _Explicit

$Embed:'D:\Lab\QuickBasic64\Uebungen\Embed\Pizza2.jpg','Pizzawein'

Dim As Long piz

Screen _NewImage(1000, 650, 32)

piz = _LoadImage(_Embedded$("Pizzawein"), 32, "memory")

_PutImage (5, 4), piz

_FreeImage piz

End

[Image: Pizza-Embed2023-12-21.jpg]

Actually, a batch/PowersHell/VBS/whatever file like I described would work just fine.  It would be written to use relative paths from wherever it was installed WITHIN the QB64PE directory tree (which is known, and identical for ALL Windows QB64Pe installations). The user's Directory structure OUTSIDE of the PE installation would be irrelevant.

Example batch file for Windows, which would run from the same directory as 'qb64pe.exe':
Code: (Select All)
@ECHO OFF


2023.12.19, J.S.Race.  Public Domain.


SET CCOMP=.\internal\c\c_compiler


ECHO ***********************************************************************
ECHO * This program will delete three MinGW GCC directories which are      *
ECHO * not required for QB64PE operation.                                  *
ECHO *                                                                     *
ECHO * These directories contain about 15000 files and consume about 150   *
ECHO * megabytes of disk space.                                            *
ECHO *                                                                     *
ECHO * These directories and the files they contain are required for legal *
ECHO * distribution of GCC and QB64PE, but you may safely and legally      *
ECHO * delete them from your own personal installation.                    *
ECHO ***********************************************************************
ECHO.


SET /P YUPOK="Enter 'Y' (uppercase only) to proceed: "
IF NOT "%YUPOK%"=="Y" ECHO Operation aborted by user. & GOTO hawaii


@ECHO ON
RD /Q /S "%CCOMP%\licenses"
RD /Q /S "%CCOMP%\opt"
RD /Q /S "%CCOMP%\share"
@ECHO OFF


:hawaii
ECHO.
ECHO.
PAUSE

I've written countless little throwaway scripts like that over the years.


Speaking of relative paths: there would be no need to adjust the path in your demo if you use a relative path instead of a hard-coded absolute path.  $Embed:'.\Pizza2.jpg','Pizzawein' would work for most people, regardless of their system directory structure.

A program being released into the world should not depend on any one person's choice of directory structure.  It's bad form.

And now I'm hungry.  Mmmm, pizza....
Reply
#26
An example script that basically works, but the "opt" folder cannot be deleted. Even with >runas /user:Administrator ".vbs"< the folder cannot be deleted.
Maybe someone has a solution. Ultimately it's more complicated than deleting the folders by hand.

Code: (Select All)

'WSHost Ordner löschen, 22. Dez. 2023

'Variablendeklaration erzwingen
Option Explicit

Dim Pfad, OrdnerInhaltAnzeigen
Dim fso, fi, fo

Const ordner1 = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler\licenses"
Const ordner2 = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler\opt"
Const ordner3 = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler\share"

'Zum Ordner
Pfad = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler"

'FileSystemObject erzeugen fuer Zugriff
Set fso = WScript.CreateObject("Scripting.FileSystemObject")

If (Not fso.FolderExists(ordner1)) Then
WScript.Echo "Datei " & ordner1 & " existiert nicht!"
Else
fso.deleteFolder(ordner1)
WScript.Echo "Ordner " & ordner1 & " geloescht."
End if

If (Not fso.FolderExists(ordner3)) Then
WScript.Echo "Datei " & ordner3 & " existiert nicht!"
Else
fso.deleteFolder(ordner3)
WScript.Echo "Ordner " & ordner3 & " geloescht."
End if

If (Not fso.FolderExists(ordner2)) Then
WScript.Echo "Datei " & ordner2 & " existiert nicht!"
Else
fso.deleteFolder(ordner2)
WScript.Echo "Ordner " & ordner2 & " geloescht."
End if

'Beenden'
WScript.Quit

'***Ende
Reply
#27
(12-22-2023, 07:05 PM)Kernelpanic Wrote: An example script that basically works, but the "opt" folder cannot be deleted. Even with >runas /user:Administrator ".vbs"< the folder cannot be deleted.
Maybe someone has a solution. Ultimately it's more complicated than deleting the folders by hand.

Code: (Select All)

'WSHost Ordner löschen, 22. Dez. 2023

'Variablendeklaration erzwingen
Option Explicit

Dim Pfad, OrdnerInhaltAnzeigen
Dim fso, fi, fo

Const ordner1 = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler\licenses"
Const ordner2 = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler\opt"
Const ordner3 = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler\share"

'Zum Ordner
Pfad = "D:\QuickBasic64\qb64pe-3-8-0\internal\c\c_compiler"

'FileSystemObject erzeugen fuer Zugriff
Set fso = WScript.CreateObject("Scripting.FileSystemObject")

If (Not fso.FolderExists(ordner1)) Then
WScript.Echo "Datei " & ordner1 & " existiert nicht!"
Else
fso.deleteFolder(ordner1)
WScript.Echo "Ordner " & ordner1 & " geloescht."
End if

If (Not fso.FolderExists(ordner3)) Then
WScript.Echo "Datei " & ordner3 & " existiert nicht!"
Else
fso.deleteFolder(ordner3)
WScript.Echo "Ordner " & ordner3 & " geloescht."
End if

If (Not fso.FolderExists(ordner2)) Then
WScript.Echo "Datei " & ordner2 & " existiert nicht!"
Else
fso.deleteFolder(ordner2)
WScript.Echo "Ordner " & ordner2 & " geloescht."
End if

'Beenden'
WScript.Quit

'***Ende

Many of the TCL8.6 support files in OPT are set as Read-Only, so a simple fso.deleteFolder will not work.
fso.deleteFolder has an optional "Force" flag you must use to force deletion of Read-Only files.

You can do it this way:

Const Force = True
fso.deleteFolder ordner2, Force

but

fso.deleteFolder ordner2, True

works as well.


That is why my batch file uses "RD /Q /S".  It deletes a folder and all contents regardless of attribute bits.
Reply
#28
Thanks! That was it! It works now. This is not in the otherwise excellent book about the WSH: Inside Windows Script Host

A very good author. His website: Borns Blog

Code: (Select All)

If (Not fso.FolderExists(ordner2)) Then
WScript.Echo "Datei " & ordner2 & " existiert nicht!"
Else
fso.deleteFolder(ordner2), True
WScript.Echo "Ordner " & ordner2 & " geloescht."
End if
Reply
#29
Good.
I had to Google "VBScript FolderExists" to see if there were any options.
My VB knowledge is limited because I haven't had much experience with the VB family.  I try to avoid VB (and PowerShell, also!) since I don't like Microsoft's recent design decisions.

I greatly prefer "old school" versions of Basic.  That's why I'm on this forum.   Smile
Reply
#30
(12-22-2023, 11:01 PM)JRace Wrote: Good.
I had to Google "VBScript FolderExists" to see if there were any options.
My VB knowledge is limited because I haven't had much experience with the VB family.  I try to avoid VB (and PowerShell, also!) since I don't like Microsoft's recent design decisions.

I greatly prefer "old school" versions of Basic.  That's why I'm on this forum.   Smile

Ha!  You can *say* that, but we all know the real reason you're here!  It's the same as everyone else's -- it's 'cause Steve is Awesome-and-Sexy, and the whole world has a crush on him and wants to be where he's at!   Since I, the Awesome Steve, is here, logic only dictates that THAT is why you -- and everyone else -- wants to be here as well!!  

Big Grin
Reply




Users browsing this thread: 1 Guest(s)