Board Logo
« Help: says StartupDir$ has no trailing "\" »

Welcome Guest. Please Login or Register.
Jan 18th, 2018, 3:36pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


« Previous Topic | Next Topic »
Pages: 1 2  Notify Send Topic Print
 hotthread  Author  Topic: Help: says StartupDir$ has no trailing "\"  (Read 326 times)
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Help: says StartupDir$ has no trailing "\"
« Thread started on: Nov 2nd, 2017, 09:46am »

Topic in
Help
What's New!
StartupDir$ variable
says:
Quote:
Notice that the backslash must be added to the beginning of the filename. This a change in v2.0. In the previous version the StartupDir$ variable did end in a backslash but this is changed to make make StartupDir$ behave more consistently with other path variables such as DefaultDir$.

I read it that BOTH DefaultDir$ and StartupDir$ does not end with backslash?
Try that
Code:
print DefaultDir$ 
print StartupDir$  

results
Code:
C:\Program Files\Just BASIC v2.0 beta 1
C:\Program Files\Just BASIC v2.0 beta 1\
 
« Last Edit: Nov 2nd, 2017, 09:48am by tsh73 » User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1255
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #1 on: Nov 2nd, 2017, 11:05am »

I can confirm again:
results:
Quote:
C:\Users\Mark\AppData\Roaming\Just BASIC v2.0 beta 1
C:\Program Files (x86)\Just BASIC v2.0 beta 1\


And I am wondering why these two folders got split so far apart?

No sub folders under Program files except jb2help, all the other sub folders went under Roaming? Samples, Sprites, media,,,
What are FFFunctions?
« Last Edit: Nov 2nd, 2017, 11:19am by bplus » User IP Logged

B+
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #2 on: Nov 2nd, 2017, 11:45am »

As I said, Windows now puts the .exe, the program files in the protected Program Files x86 directory and the data files, which it expects to vary, in the User's appdata directory.

Thus the static program file is protected from any change but the users data area allows change, in addition each user is protected from each other so you cant mess up someone else's data that logs in and uses your computer.

Its how Windows works now. In fact it is one of the main reasons we needed Just BASIC updated, to comply with this Windows protocol.
« Last Edit: Nov 2nd, 2017, 12:33pm by Rod » User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #3 on: Nov 2nd, 2017, 12:51pm »

Quote:
What are FFFunctions?

Run FreeForm
(from JB, menu
Run | FreeForm GUI editor)
In the FreeForm, there is a menu
Output|Add custom functions.
Obviously it reads functions from that folder.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1255
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #4 on: Nov 2nd, 2017, 1:56pm »

Thanks tsh73,

I did peek into the folder under *.* and saw all the .txt files for code to do many of the new functions that come with JB 2.0

So let me get this straight, I can install all the .exe's, .dll's, .sll's in a folder on my desktop but I can't keep all the samples files and other sub folders with THAT folder, inside that folder that's on my desktop (which is supposed to be only accessible to this user)?

Quote:
C:\Users\Mark\AppData\Roaming\Just BASIC v2.0 beta 1
C:\Users\Mark\Desktop\Just BASIC v2.0 beta 1\
« Last Edit: Nov 2nd, 2017, 2:04pm by bplus » User IP Logged

B+
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #5 on: Nov 2nd, 2017, 3:25pm »

You are not really dictating where anything goes. Windows now dictates where files are stored.

There is no single desktop now, every user sees their own desktop and this has been so for some time. My wife logs on and sees an entirely different desktop from mine.

But we are discussing windows changes that have been around for some time and confusing the Just BASIC distribution.
User IP Logged

CarlGundel
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 155
xx Re: Help: says StartupDir$ has no trailing "\
« Reply #6 on: Nov 3rd, 2017, 07:33am »

on Nov 2nd, 2017, 3:25pm, Rod wrote:
You are not really dictating where anything goes. Windows now dictates where files are stored.

There is no single desktop now, every user sees their own desktop and this has been so for some time. My wife logs on and sees an entirely different desktop from mine.

But we are discussing windows changes that have been around for some time and confusing the Just BASIC distribution.

How is the Just BASIC distribution being confused?

-Carl
User IP Logged

Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #7 on: Nov 3rd, 2017, 11:52am »

I suppose I mean that discussing Windows "new" directory structures takes us a little off focus from JB v2.0 tyre kicking.

But if folks have never delved into it and have been used to the simpler directory structure JB v1.0 worked with it is probably going to get discussed more than once.
User IP Logged

bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1255
xx Re: Help: says StartupDir$ has no trailing "\
« Reply #8 on: Nov 3rd, 2017, 12:16pm »

on Nov 3rd, 2017, 07:33am, CarlGundel wrote:
How is the Just BASIC distribution being confused?

-Carl


I am confused when the Setup prompts me to browse my (the current user's) directory tree for a place to put the JB files. This user selects the desktop, so all the .exes, .dlls... all files under top JB folder name are put there with the Help Folder, that is all good and expected!

BUT then all the remaining folders are stored under the barely accessible AppData\Roaming Folder? Why split the JB folder up and put the files most needed for user access out of reach of Windows File Explorer (without extra typing and Windows experience beyond a newbie) and why split the folder when the main exe's are already on the DeskTop.

It makes sense to put the exe's and dll's out of reach of normal user access either under Programs OR AppData\Roaming but it does not make sense to put sample files in AppData\Roaming when the user's Desktop or the user's Documents folder are far more accessible.

That is my point. AppData\Roaming is not the only folder accessible only to the user, so is the user's Desktop and the user's Document folder and these two folders were designed by Windows to be accessed only for the user's benefit.

AppData is not accessible from the Windows File Explorer without extra typing but the user's Desktop and the user's Documents folder are accessible.

So in summary, I am confused as to why JB setup asks me where I want my JB folder, I tell it my Desktop. It puts the main folder with the exes and dlls and help folder there fine!, BUT puts all the other sample files and subfolders under AppData/Roaming which according to Windows design should be kind of hidden from the user, which is why Windows File Explorer won't go there without extra trouble.

Think how a newbie would see all this. They ask JB Setup to put the JB files on their DeskTop. They see a JB Folder created on their DeskTop, it has the exe's and dlls, and Help folder. Everything works but all the sample files can't be found (in that same main folder) with File Explorer and yet they magically appear under JB IDE.
« Last Edit: Nov 3rd, 2017, 12:46pm by bplus » User IP Logged

B+
CarlGundel
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 155
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #9 on: Nov 3rd, 2017, 2:23pm »

Setup prompts you for a place to install the software. Does it not install where you instruct it?

I don't disagree with the idea that the files could be all together in the same folder. That would be fine by my, but Microsoft changed the rules a long time ago, and we are finally catching up. Liberty BASIC has used Microsoft compliant folder locations for years.

As far as being a problem for newbies, I'm not sure my experience agrees with this. People are now very used to their data being held in a folder apart from the application.

So, how should I change this exactly? Liberty BASIC users have not been asking me to change the way it works, so I'm not really sure I should change it.

-Carl
User IP Logged

tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3636
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #10 on: Nov 3rd, 2017, 3:46pm »

(I really could live with things as they are now, but)
I wonder -
Is there any reason files go to appdata\roaming
instead of creating folder in Documents?

I have Visual Studio 10 Express installed on Windows 10 - it created "Visual Studio 2010" folder in Documents.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
bplus
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 1255
xx Re: Help: says StartupDir$ has no trailing "\
« Reply #11 on: Nov 3rd, 2017, 11:10pm »

on Nov 3rd, 2017, 2:23pm, CarlGundel wrote:
Setup prompts you for a place to install the software. Does it not install where you instruct it?

I don't disagree with the idea that the files could be all together in the same folder. That would be fine by my, but Microsoft changed the rules a long time ago, and we are finally catching up. Liberty BASIC has used Microsoft compliant folder locations for years.

As far as being a problem for newbies, I'm not sure my experience agrees with this. People are now very used to their data being held in a folder apart from the application.

So, how should I change this exactly? Liberty BASIC users have not been asking me to change the way it works, so I'm not really sure I should change it.

-Carl


Q: Does it not install where you instruct it?
A: I have already said, it installs the exes and dlls and the Help folder where you instruct, it does not install the remaining folders and files where you instruct it.

Comment: I don't disagree with the idea that the files could be all together in the same folder.
Reply: Thank Goodness! smiley

Comment: As far as being a problem for newbies, I'm not sure my experience agrees with this. People are now very used to their data being held in a folder apart from the application.
Reply: OK I can't speak for newbies either.

Q: So, how should I change this exactly?
R: The million dollar question! or at least 50cents smiley
The easy answer is to install ALL the files and folders where the user instructs.

I just checked Setup for JB 2.0 again, guess what? The browse dialog won't let you go where you are not allowed to go, including AppData\Roaming!

So anywhere the user indicates, should be OK to put ALL the files and folders.

If this is too many choices, then what tsh73 has suggested would work fine as well.
User IP Logged

B+
Rod
Administrator
ImageImageImageImageImage


member is offline

Avatar

Graphics = Goosebumps!


PM

Gender: Male
Posts: 3151
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #12 on: Nov 4th, 2017, 02:28am »

Using “documents” is really no different to using “appdata” because each user has their own documents folder. Each users documents are protected and so again you can’t get in top down.

That said if you create a folder like c:\basic you can hold all your programs and project files in somewhere more easily accesssed. You could even copy the sample files there. But the shortcut method is simple.

I must admit I have learned as much about UAC and Windows “virtualisation” as I have needed to. So not a lot. There are many articles and tutorials on the web so I am off to browse.

https://www.howtogeek.com/318177/what-is-the-appdata-folder-in-windows/

https://blogs.technet.microsoft.com/simonmay/2010/08/06/user-account-control-explained-really-well/

Having had a quick refresh and browse what I would say is that we need to use the PC as presented to us now and not try and make it look like what it used to. You will always open your computer as a user, rarely as Admin. Your desktop is unique to you and any files you create are unique to you. So if you create folder c:\basic Windows actually stores that as c:\user\mark\basic. No other user will see that folder. You will see it as c:\basic, just use it.

During the installation data that needs to be protected should be put in %appdata% that's the convention. This data is meant to be available to the application but protected from overwriting and user amendment. So you should not be keeping files or changing files in %appdata%\Just BASIC v2.0 folder. Create a project directory of your own, create a shortcut to the sample files. I think that is where most of us using Liberty have ended up.
« Last Edit: Nov 4th, 2017, 03:50am by Rod » User IP Logged

CarlGundel
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 155
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #13 on: Nov 4th, 2017, 09:43am »

There's probably nothing preventing me from adding the ability to specify a default folder as a preference, or perhaps to automatically notice that JB/LB is not installed in Program Files so assume that DefaultDir$ is the same as StartupDir$.

I do run into a little bit of a challenge with the installer. I'm not sure that I can automate the ideas above in relation to installation, but perhaps it is not that hard.

-Carl
User IP Logged

CarlGundel
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 155
xx Re: Help: says StartupDir$ has no trailing "\"
« Reply #14 on: Nov 4th, 2017, 12:39pm »

Maybe a better default would be C:\ProgramData\Just BASIC v2.0 ??

-Carl
User IP Logged

Pages: 1 2  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Just BASIC wiki
Wikispaces

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls