|
Post by sirbop on Aug 23, 2023 21:27:11 GMT
I am unable to locate my JBASIC2.INI file for use in distributing a Bas file.
2.0 is my release.
Any help will be appreciated.
|
|
|
Post by xxgeek on Aug 24, 2023 1:07:37 GMT
The most likely location for the justbasic2.ini file is "C:\Users\YOUR USER NAME HERE\AppData\Roaming\Just Basic v2.0"'\justbasic2.ini"
Paste %appdata%\Just Basic v2.0\justbasic2.ini in your File Browser Address bar [Hit Enter]. or Here's a little snippet that might get it for you and open it. If not post back.
call getUserPath$ print upath$;"\Application Data\Just Basic v2.0" 'the folder it is in run "Explorer ";upath$;"\AppData\Roaming\Just Basic v2.0\justbasic2.ini" 'opens justbasic2.ini ' if no work, try this line instead. 'run "Explorer ";upath$;"\Application Data\Just Basic v2.0\justbasic2.ini" end
sub getUserPath$ global upath$ run "cmd.exe /c echo %userprofile% >UserHomePath.txt", HIDE ' - for users actual homepath do scan loop until fileExists(DefaultDir$, "UserHomePath.txt") open "UserHomePath.txt" for input as #1 upath$ = input$(#1, lof(#1)) close #1 if upath$ = "" then notice "Sorry, can't find user path " : end kill DefaultDir$;"\UserHomePath.txt" upath$=trim$(upath$) end sub
'function for checking file existence function fileExists(path$, filename$) dim info$(0, 0) files path$, filename$, info$() fileExists = val(info$(0, 0)) 'non zero is true end function
|
|
|
Post by Rod on Aug 24, 2023 6:56:45 GMT
You would not normally need to share the .ini file. Just send the .bas. If the user does not want to instal Just BASIC then you will need to create and share a .exe. What are you using the .ini for?
|
|
|
Ini file
Aug 24, 2023 7:47:06 GMT
via mobile
Post by tsh73 on Aug 24, 2023 7:47:06 GMT
I believe mainwin font, printer font and mainwin size is stored in ini file, even for exe.
|
|
|
Post by jarych on Aug 24, 2023 17:38:29 GMT
I am unable to locate my JBASIC2.INI file for use in distributing a Bas file. 2.0 is my release. Any help will be appreciated. In case you try a search on Windows 10 to 'look' for it, you need to spell it correctly, OR use wildcard character for some flexibility. You'll then be able to find the filepath location for the INI file. Notice, the spelling should be justbasic2.ini, or you might try j*.ini. Now that I said that, I tried it again, and it is seeming to not work correctly. I say then, go according to what xxgeek said.
|
|
|
Post by jarych on Aug 24, 2023 17:42:28 GMT
I do not know why doing a search does not seem to work, but go exactly by what xxgeek says, and justbasic2.ini should be there.
C:\Users\YOUR USER NAME HERE\AppData\Roaming\Just Basic v2.0"'\justbasic2.ini
|
|
|
Post by Rod on Aug 24, 2023 18:59:25 GMT
My point is that if you are sharing a .bas there is no need to pass or share a .ini file as well. The user will have their own .ini file. The programmer can amend fonts and such without requiring the .ini file. The .ini file would be needed if you were sharing the entire basic os which isn’t what we are supposed to be doing.
So I have never come across the .ini file being shared before, I wonder why it is needed. Indeed I wonder how it replaces the actual existing .ini file and wonder whether thie user desires this.
In short, we should not be sharing .ini files.
|
|
|
Post by tsh73 on Aug 24, 2023 19:56:02 GMT
It is explicitley allowed in help file, "Using the Runtime Engine" section
Though I agree I hardly see it needed.
|
|
|
Post by xxgeek on Aug 24, 2023 20:54:03 GMT
One time I did have a need.
When coding to open JB from commandline the "World of Just Basic" window kept appearing, with the checkbox unchecked for "Show at Start Up"
Having the justbasic2.ini in the DefaultDir$ with that option checked saved my butt at the time. Got rid of that window opening, and causing my app to stop mid mission.
|
|
|
Post by Rod on Aug 25, 2023 6:45:56 GMT
That part of the help file is talking about distributing a .exe and the runtime. So it remains strange that we share a .ini for a .bas
The distributed .ini will overwrite the users .ini which is undesirable. Everything can be set by the program without need of overwriting the existing .ini. I would be annoyed if someone changed mine without asking.
|
|
|
Post by plus on Aug 25, 2023 12:37:47 GMT
sirbop might have misspoke when talking of distributing his "Bas" file. Usually when talking about "distributing" a person means providing an executable that does not require a copy of the code language used to create it for others who probably don't have that PL ie as opposed to "sharing" a Bas file.
Rod don't get so literal with these folks often new to forums and terminology with JB probably being their first PL experience.
The guy is obviously looking for the INI file and it is in a crazy place and crazy to expect newbies to find it easily.
b = b + ...
|
|
|
Post by jarych on Aug 30, 2023 1:43:59 GMT
INI file overwriting the INI file already on the user's machine? Maybe I do not understand. In case the programmer makes a (at least) portable package with renamed EXE, the DLL and SLL files and other files needed for the packaged program , AND the INI file, how this would interfere with the user's JustBASIC INI file is not what I would worry to have happen. By the programmer's package being run in a completely different directory from the user's JustBASIC INI file, I would imagine no interference between the two INI files.
|
|
|
Post by Rod on Aug 30, 2023 6:35:20 GMT
Quite right, but we started the discussion about sharing a .bas., not a .exe suite. Though other folks interpreted the question as about sharing a .exe. So I may have confused the issue but only the original poster can clarify.
|
|