Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 20, 2015 13:58:11 GMT -5
I want to make a portable version of spflite like described in the documentation. Drive g is a sd-card connect over USB.
I copied c:\programme\spflite\* to g:\spflite I copied the options to g:\spflite
Then I have following structure in G:\SPFLite: 20.06.2015 20:14 <DIR> Filter Examples 20.06.2015 20:14 <DIR> Lib 15.06.2015 21:38 404'992 SPFLite.exe 06.05.2013 01:06 2'962'543 thinBasic.chm 07.05.2013 12:58 172'032 thinCore.dll 13.06.2015 16:14 <DIR> AUTO 13.06.2015 15:52 <DIR> CLIP 20.06.2015 19:24 <DIR> FILELIST 13.06.2015 15:52 <DIR> JOBS 13.06.2015 15:52 <DIR> Macros 20.06.2015 19:18 <DIR> PROFILES 13.06.2015 15:52 <DIR> RUN 13.06.2015 15:52 <DIR> STATE 13.06.2015 15:52 <DIR> THEMES 13.06.2015 15:52 <DIR> VSAVE 20.06.2015 20:18 2'322 SPFLite.INI 13.06.2015 15:57 11'802 SPFLite.KBD 20.06.2015 20:18 336 SPFLite.SPR 13.06.2015 17:49 14 SPFLite.SPS .... ....
If I start g:\spflite\spflite.exe, spflite takes the options from hard disk Documents folder but not the option from drive g:.
What am I doing wrong ?
|
|
|
Post by George on Jun 20, 2015 14:42:26 GMT -5
Jonas: Nothing wrong that I can see, let me investigate.
George
[Update] Sigh! Yes, another bug. Boy! you're doing great locating bugs, where were you when we were testing? (Actually, I have not exercised the portable code in years)
Corrected - next release.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 21, 2015 1:44:55 GMT -5
Thanks Jonas
Personally I would prefer, if the Options would be one level deeper, because it is easier to handle (from user view).
spflite: 17.06.2015 18:55 <DIR> Filter Examples 17.06.2015 18:55 <DIR> Lib 18.06.2015 16:20 <DIR> SPFlite <========== all options 15.06.2015 21:38 404.992 SPFLite.exe 16.01.2012 18:29 237.568 SPFSUBMIT.exe 07.05.2013 12:58 172.032 thinCore.dll 26.10.2013 18:00 77.824 TxtToSource.exe ...
spflite\SPFlite: 20.06.2015 16:47 <DIR> AUTO 16.06.2015 18:16 <DIR> CLIP 18.06.2015 18:38 <DIR> FILELIST 16.06.2015 18:16 <DIR> JOBS ... 20.06.2015 16:46 2.190 SPFLite.INI 16.06.2015 18:32 11.790 SPFLite.KBD 20.06.2015 16:46 412 SPFLite.SPR 16.06.2015 18:21 28 SPFLite.SPS ...
|
|
|
Post by George on Jun 21, 2015 12:11:45 GMT -5
Jonas: Well, since the current EXE doesn't work right anyway, I could probably do that. Originally, there weren't so many folders etc, in the SPFLite folder. I personally don't like calling it \SPFLite, in case the EXE file stuff is in an \SPFLite folder, I think perhaps \Config.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 21, 2015 12:26:40 GMT -5
Every name is OK for me. Each name is OK for me. (I don't know which word is the right one in English)
I hope that the portable version also runs from my hard disk.
That means, if spflite does not find a CONFIG folder in the same directory as spflite.exe, it takes the options folder from the Windows Document folder.
|
|
|
Post by George on Jun 23, 2015 15:36:32 GMT -5
Jonas: OK, this is based on my thoughts, not on actually testing this.
If the \Config folder is not located, SPFLite will probably just create the needed file structure, just as it would do on it's first time executing. The only difference will be that instead of it's default INI folder being based on where Windows tells it the \Documents folder is located, it will be based on where the actual running EXE was located.
The idea of portable is that it should not use or depend on anything other than the removable drive it is running from.
So, without a properly copied \CONFIG folder, you would probably end up with a newly installed SPFLite, no customization at all.
Educated guess only.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 24, 2015 0:29:10 GMT -5
Now it works ok as described in the documentation. This is OK for me, if you like this behaviour.
But I would prefer such behaviour: I assume that you have a test in your code to test if the drive is removeable or not. You should remove this test in your code.
Then spflite should work like this: If spflite does not find a Config folder in the same directory as spflite.exe, it takes the options folder from the Windows Document folder.
Jonas
|
|
|
Post by George on Jun 24, 2015 10:47:25 GMT -5
Jonas: Your method would work, but I must ask:
If the thumb drive has no \CONFIG folder and is thus not independent and needs the hard drive \Documents folder - why would the thumb drive version be created?
If the \Documents\SFLite folders exist, it's hard to picture a circumstance where the \Program Files\SPFLite folder with the EXE file would not exist. So what purpose does the portable version serve?
Maybe you can explain further?
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 24, 2015 15:59:45 GMT -5
You are right, if the thumb drive has no \CONFIG folder, this makes no sense. So I assume, nobody will do that.
But I would have always a Config folder. And I would not have \Document\Spflite folder any more.
And this configuration runs both on a thumb drive and on a fixed drive.
My spflite.exe is not in c:\Program Files\spflite\spflite.exe, it is in h:\spflite\spflite.exe. So I have no problems with write access for the options.
Now I can copy h:\spflite\ with all subdirectory to a thumb drive and it works. And I can copy it back some day later to a no-removable drive and it works.
|
|
|
Post by George on Jun 25, 2015 10:44:36 GMT -5
jonas: You should not have to move SPFLite outside the normal \Program Files path, SPFLite does not (and hasn't for many, many versions) update anything in that folder. It asks Windows where the users's \DOCUMENTS folder is and uses that for the sole reason of not getting into UAC problems caused by writing to the EXE path. Most programs that used to save everything in the EXE folder have long ago converted to the MS recommended way. This all started way back with Vista, it's only very old unmaintained programs that still have that problem.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 25, 2015 22:26:55 GMT -5
I know. Jonas
|
|
|
Post by George on Jun 26, 2015 11:07:36 GMT -5
Jonas: At this point, I am going to leave it as-is. \CONFIG will exist only for the portable version, and as well, the portable version will remain independent of anything other then the portable drive.
The portable support was designed for support type people who wanted SPFLite available if they had to go work on some other persons computer, and with that goal in mind, the current method works just fine.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 26, 2015 11:20:59 GMT -5
It is ok to leave it as-is.
Here is my wordaround: mklink /d h:\spflite\config c:\users\admin\documents\SPFlite mklink /d h:\spflite\config c:\users\jonas\documents\SPFlite
|
|
|
Post by George on Jun 26, 2015 12:37:41 GMT -5
Jonas: Doesn't using links really defeat the whole purpose of it being 'portable'? I mean it will only work on a system which has folders that match the links. Seems odd to me, but if it works for you, fine.
George
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jun 26, 2015 13:43:50 GMT -5
1. When I go away, I copy my whole drive H: to a usb-stick X. Then X:\spflite\spflite.exe will take the options from the folder X:\spflite\config.
2. When I am at home, h:\spflite\spflite.exe takes the options from c:\...\documents\spflite, which is linked to h:\spflite\config.
3. I do not use the folder "c:\program files\". I have all my important programs and data on drive H.
4. Regardless whether I log into Win7 as "admin" or "jonas", I use the same options for spflite.exe.
If someone has a better solution, let me know.
|
|