Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Embed Source Code in EXE
#5
(10-20-2024, 03:55 PM)bplus Wrote: Ah in case I accidently delete the .bas instead of the EXE. Thanks

Or, as was posted so perfectly on the Discord:
Quote:Weird question, but is there a way to get back the .bas version of a .exe please? I made programs, but I lost the .bas, and only have the .exe

Which is why, if you embed the source with the EXE, you never have that issue.  It's a great way of doing things, if you tend to create EXE files and use them as various utilities on your PC and yet upgrade QB64PE versions into new folders and such, and those BAS source files get lost/buried/archieved elsewhere over time.

For less than 10 lines of code, you can now write your programs so that the EXE itself will contain the BAS sources and you can always retrieve it for you.  (14 above, with lines of space and comments which can be stripped out easily.)  It's one of those little utilities/habits that anyone could adopt incredibly easy, yet which we all tend to just gloss over and overlook (a lot like adding comments to code when we're in the zone and coding like a drunk monkey on cheetos).  It's also the type of thing which we always look back on and then go, "GAH!  WHY DIDN'T I DO THIS?!!"

As I like to watch people squirm and suffer, I just had to share this.  Now, in the future when they ask about getting their source code back from the EXE, I can giggle like an Evil Overlord and point them to this thread and say, "I KNEW THIS WAS GOING TO HAPPEN!  If you guys would just all listen to me, like good little minions... errr.... programmers!"

Big Grin Wink
Reply


Messages In This Thread
Embed Source Code in EXE - by SMcNeill - 10-20-2024, 09:58 AM
RE: Embed Source Code in EXE - by bplus - 10-20-2024, 12:23 PM
RE: Embed Source Code in EXE - by TDarcos - 10-20-2024, 06:11 PM
RE: Embed Source Code in EXE - by SMcNeill - 10-20-2024, 01:59 PM
RE: Embed Source Code in EXE - by madscijr - 10-21-2024, 08:27 PM
RE: Embed Source Code in EXE - by bplus - 10-20-2024, 03:55 PM
RE: Embed Source Code in EXE - by SMcNeill - 10-20-2024, 06:04 PM
RE: Embed Source Code in EXE - by JRace - 10-20-2024, 08:41 PM



Users browsing this thread: 2 Guest(s)