Author Topic: Storing your QB64 files  (Read 4250 times)

0 Members and 1 Guest are viewing this topic.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Storing your QB64 files
« on: September 06, 2020, 11:45:46 am »
Quote
Put all files in the folder where you have QB64

IMO this is not a good idea to store work "in the QB64 folder". I have thousands of files, it would be worse nightmare finding something than it is already. And to "Put all files in the folder where you have QB64" to check out someone else file or project seems a lookup and maintenance nightmare in the making.

Not great even if in separate folders under QB64 folder because when QB64 gets updated with new version you have to move stuff around.

I know some files have to go in QB64 folder like *.h ones. Isn't that enough to worry about when getting a new version of QB64 going?

I am curious if InForm stuff has to have it's own Folder in the QB64 folder, like for the automatic updating. Could it be in it's own folder on the Desktop?

I see Unseen setting up library set that has to be under QB64 folder but at least that is in it's own folder and I assume all files using that library are at least stored under that folder (if I have that correct?). It seems sensible to store all bas code using a library under a folder with the library at the top. Update: Having to CHDIR to run a bas file / exe seems so old school!

Of course I am an adherent of saving exe's with source and wonder why anyone would do it any other way unless just checking out QB64 for a day. I also wonder why that's not default when I get a new QB64 version unless QB64 has to be in that state to build /rebuild itself to get itself started. I doubt that but that would explain why it's not default to save exe with source.

Maybe I am missing something?


« Last Edit: September 06, 2020, 12:02:58 pm by bplus »

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Storing your QB64 files
« Reply #1 on: September 06, 2020, 05:05:14 pm »
IMO this is not a good idea to store work "in the QB64 folder". I have thousands of files, it would be worse nightmare finding something than it is already. And to "Put all files in the folder where you have QB64" to check out someone else file or project seems a lookup and maintenance nightmare in the making.

My reason for not storing my .bas files in the qb64 folder is really simple. When I update qb64, I just blow away the old qb64 folder, and allow the 7zip download to create a new qb64 folder. I don't want to have to worry about first moving all my .bas files, or worse, blowing them all away unwittingly.

Quote
Of course I am an adherent of saving exe's with source and wonder why anyone would do it any other way unless just checking out QB64 for a day.

The default is that the .exe files are stored in the qb64 folder. No big deal for me, because I don't always need my old .exe files, and it's easy enough to recompile from the .bas if I do need to. I have created a desktop shortcut to the qb64 folder, to quickly get to any .exe files I've been using recently (say, ever since my last update of qb64).

My approach has been to build a MyPrograms folder, in which I store all my .bas files. And then create a qb64 subfolder in the MyPrograms folder. And, naturally, back up all my .bas files too. Makes it very easy to update qb64.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #2 on: September 06, 2020, 07:15:09 pm »
Oh thanks Bert, you just gave me an idea that I will try. You are right the exe's are not nearly as important as bas files and project materials.

Let the exe's be stored in QBfolder, that saves a ton of space when I go to backup my files by just copying a giant folder or two.

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #3 on: September 06, 2020, 08:43:16 pm »
OMG, no! as soon as I stopped save EXE with source, I couldn't _LOADIMAGE anything!

Offline Bert22306

  • Forum Regular
  • Posts: 206
    • View Profile
Re: Storing your QB64 files
« Reply #4 on: September 07, 2020, 08:18:33 pm »
OMG, no! as soon as I stopped save EXE with source, I couldn't _LOADIMAGE anything!

True, you have to point to the directory where the .bas, .ini, images, etc., are stored. But that's easy enough.

img& = _LOADIMAGE("..\pic.png")

Don't even need to enter the folder's name! Assuming that the .bas and image files are in the same folder, of course, one up from the qb64 folder with the .exe files.
« Last Edit: September 07, 2020, 08:26:46 pm by Bert22306 »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #5 on: September 07, 2020, 09:04:44 pm »
I keep a ton of QB64 files and folders under the DownLoads section of my computer (QB64 is on my Desktop) and _LOADIMAGE refused to work for me when I turned off Save EXE with source bas. I even tried fully pathed load file names! :( 

No combination of . and / or \ worked.
« Last Edit: September 07, 2020, 09:06:15 pm by bplus »

FellippeHeitor

  • Guest
Re: Storing your QB64 files
« Reply #6 on: September 07, 2020, 09:06:11 pm »
Does _FILEEXIST return true when you test for the existence of image files before attempting to load them?

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #7 on: September 07, 2020, 09:11:24 pm »
Well I will check if you really want to know.

Update: well tonight it is working with fully pathed file name.
I am sorry to say, tonight it took me awhile to figure out _LOADIMAGE won't work at all until you have a graphics screen setup. But before I was testing working programs but maybe not getting the path right?

Anyway, I don't want to try and guess where people put my projects when they tell me they don't work.
So I am sticking with the bullet "* Output EXE to Source Folder"

This is a big decision your whole future file structure is based on how you Run the source.

I guess some folks are as comfortable working without the bullet as I am with it. I was hoping to hear from those others, to hear an argument against the bullet.
« Last Edit: September 07, 2020, 10:15:11 pm by bplus »

FellippeHeitor

  • Guest
Re: Storing your QB64 files
« Reply #8 on: September 07, 2020, 10:50:33 pm »
To load an image when you’re not working in graphics mode, you have to pass 32 as a second parameter:

Code: QB64: [Select]
  1. Img& = _LOADIMAGE(file$, 32)

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #9 on: September 07, 2020, 11:12:24 pm »
To load an image when you’re not working in graphics mode, you have to pass 32 as a second parameter:

Code: QB64: [Select]
  1. Img& = _LOADIMAGE(file$, 32)

Oh thanks!

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: Storing your QB64 files
« Reply #10 on: September 14, 2020, 05:01:33 pm »
Hi
my solution is to use 2 folders outer of QB64 folder (while initially I used them into QB64 folder): MyQB64 and QB64Store
in the first I save and develope my code, in the second I save and study and modify the code posted by you wonderful coders of this community .
This method has 2 issues:
1. the project that must be in the QB64 folder are duplicated into QB64Store and in QB64
2. my MOD of your code is away from original code
Programming isn't difficult, only it's  consuming time and coffee

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #11 on: September 14, 2020, 05:59:51 pm »
That's what I have except I have a 3rd major folder from all the Downloads. I have a massive QB64 Folder in Downloads.

Offline Cobalt

  • QB64 Developer
  • Forum Resident
  • Posts: 878
  • At 60 I become highly radioactive!
    • View Profile
Re: Storing your QB64 files
« Reply #12 on: September 14, 2020, 06:54:09 pm »
At one time I used to install a copy of QB64 for each project I worked on!  good grief Charlie Brown!!!  yeah so hundreds of thousands of extra files for nothing. Then somebody told me about EXE to Source! Man did that change things.

So now I make a new directory setup for each project, and a directory for each of you guys when I try some of your code!

And this had led from massive number of files to a massive number of directories!

Not sure about the issue with not finding files, but I've never had QB64 on my main drive let alone the Desktop.
Granted after becoming radioactive I only have a half-life!

FellippeHeitor

  • Guest
Re: Storing your QB64 files
« Reply #13 on: September 14, 2020, 07:04:44 pm »
I keep my QB64 folder on my Desktop. When I want to test something from someone else, I'll keep it in a separate folder like Cobalt mentioned above, until testing is done and I delete it all. For my own projects, I keep each in their own folder as well, in the desktop too. I'll eventually save one or two files in QB64's folder itself when it's something quick and dirty I wanna test. Other than that, I always have the latest version of QB64 because this folder is on version control (we use git).

When I used to have a QB64 folder that was not the repository, what I did when I had to "install" a newer version was simply delete folders source, internal then qb64.exe; then I'd instruct 7zip to only extract only the executable plus those folders from the contents of the new package back into the same place et voilà, fresh version and all other "alien" files remained intact.
« Last Edit: September 14, 2020, 07:07:34 pm by FellippeHeitor »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Storing your QB64 files
« Reply #14 on: September 14, 2020, 09:57:31 pm »
I have resorted to this to find something:

Oh ha! "Nimja" ;-))
« Last Edit: September 14, 2020, 10:53:07 pm by bplus »