Re: [GNC] How to run GNUcash in portable fashion?

2018-11-01 Thread Geert Janssens
Op woensdag 31 oktober 2018 14:27:37 CET schreef Wm via gnucash-user:
> On 27/10/2018 09:34, Geert Janssens wrote:
> > Agreed. And on several occasions I have been thinking about adjusting the
> > gnucash code and its Windows installer to make this universally possible.
> > It never really happened so far due to lack of time and other priorities.
> the .gnucash folder model was better than the current model, at least
> they were nearby in a folder structure.  It can be near impossible to
> find all associated meta data on Windows now.
> 
Huh? Only the name of the directory changed on Windows.

> There is a lot to be learned from the way PortableApps uses folder and
> registry as an impairment of Windows rather than a feature.

That's indeed one way of seeing it.

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-11-01 Thread Geert Janssens
Op woensdag 31 oktober 2018 14:20:02 CET schreef Wm via gnucash-user:
> On 26/10/2018 21:36, Paul Kinzelman wrote:
> > Not ideal of course, but if you install GC on all the computers you want
> > to run on, you could just put the data on the flash drive and plug it in
> > to whatever computer you want and have already installed GC and
> > then start GC.
> 
> Wrong!  the clever people at gnc towers decided to follow the MS idiocy
> model and put significant stuff in user / computer specific folders :(

Wrong you too :)

We didn't follow the MS model, but the free desktop one. Freedesktop defines a 
folder for application metadata and one for user configuration data. Microsoft 
specifies one folder for everything. So the default for GnuCash on Windows 
puts both metadata and configuration data in one directory, and in two 
separate ones on freedesktop adhering systems.

As I said before, I missed adding an environment variable for overriding the 
configuration data folder, which bites on NON-freedesktop adhering systems 
such as Windows.

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-11-01 Thread Wm via gnucash-user

On 27/10/2018 13:46, Kim Wood wrote:

Here is another suggestion that works for me.

I use the most recent PortableApps build, and simply delete the
\PortableApps\GnuCashPortable\App\gnucash directory, and replace it with my
more recent c:\Program Files (x86)\gnucash directory.  Works fine for me,
and has since the PortableApps version of GnuCash was first released some
time ago.


If I understand what you are doing, you're relying on PA to keep your 
book and its meta-data together rather than gnc itself.  That makes 
sense as gnc fucked up when they went the MS way.  However I think you 
should test your backup and restore procedures as things might not be 
where you (or JTH) expect them to be since gnc 3.x


  This should allow you to use the nightly build maint versions too

if you want to stay on the bleeding edge.  I understand that any significant
change in GnuCash could break this hack - so I only use the latest
PortableApps 3.2.0 version of GnuCash Portable.


That only got fixed because I made a noise in these forums and elsewhere 
and is one behind.



Note:  This is a hack for you Windows users only.  Further, I then run the
PortableApps Installer generator tool to create a fresh new installer for a
future installation should I need it.  I also prefer a different GnuCash
splash screen and PortableApp icons for my portable version.  All very
easily done and all works fine.  This might be a better solution for you, as
the PortableApps folks appear to have done a pretty good job with their
portabilization.


The PA people are very good at what they do and understand the weirdness 
of where MS want things to be much better than the gnc leaders [1], the 
problem is JTH needs to be kept on his toes about changes to apps and 
wasn't expecting the dir structory change.


[1] they develop an app, I understand Win users are a nuisance

--
Wm

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-11-01 Thread Wm via gnucash-user

On 27/10/2018 09:34, Geert Janssens wrote:


Agreed. And on several occasions I have been thinking about adjusting the
gnucash code and its Windows installer to make this universally possible. It
never really happened so far due to lack of time and other priorities.


the .gnucash folder model was better than the current model, at least 
they were nearby in a folder structure.  It can be near impossible to 
find all associated meta data on Windows now.


There is a lot to be learned from the way PortableApps uses folder and 
registry as an impairment of Windows rather than a feature.


--
Wm

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-11-01 Thread Wm via gnucash-user

On 26/10/2018 21:36, Paul Kinzelman wrote:

Not ideal of course, but if you install GC on all the computers you want
to run on, you could just put the data on the flash drive and plug it in
to whatever computer you want and have already installed GC and
then start GC.


Wrong!  the clever people at gnc towers decided to follow the MS idiocy 
model and put significant stuff in user / computer specific folders :(


So what you suggest won't work.

Gr!

--
Wm

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-11-01 Thread Wm via gnucash-user

On 26/10/2018 21:27, aeneas wrote:

Very nice reply!

It looks like knowing about GNC_DATA_HOME goes a long way toward solving my
problem.  From what I can see I'm not using AQBANKING.  Also, I'd speculate
that my scheme may not be be completely fool-proof.  I did search the
registry for "gnucash" and found some KEYS.  This causes me to think that
there could be some interference if different instances (i.e., different
thumb drives with different peoples versions) of GNUcash were run on the
same computer.  While I might expect some behavioral irregularity I'd also
be inclined to think that this should NOT risk contamination of the files
used to store the actual accounting records.

Just for the record I notice that the portableapps version of GNUcash (3.2)
has a directory named GTKDataHome in addition to GNCDataHome.  In my case
the GTKDataHome directory is still empty.  However, I am wondering if I
could/should make some accommodation for whatever purpose that serves?
Also, there is another directory named settings which contains files that
appear to be exported from the registry.  To the extent that portableapps
handles registry keys properly it is a better solution than my home grown
hack.  However, another feature my technique provides is the installation of
a new version without making any change to an existing version that is
working just fine.  There are many circumstances under which preserving the
ability to revert to, or for that matter switch back and forth between, a
prior version is quite helpful and this can extend across several versions.

Anyway many thanks for the help.  It looks like my flash drive installation
is now somewhat portable and I also appreciate learning about some other
aspects of GNUcash which may be helpful in the future.



You are likely to make a mistake rolling your own gnc portable.  The 
portableapps.com model is good but not always up to date, e.g. the 
problem with Portableapps was that they didn't notice when gnc moved 
stuff around [1]


If you really do need your gnc to be portable stick with PortableApps 
model and get them to follow changes, losing bits of closely integrated 
accounting data is generally not fun.


[1] a bad move in portable and non-portable terms, think disjointed backups.

--
Wm

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-10-27 Thread Geert Janssens
Op vrijdag 26 oktober 2018 22:27:51 CEST schreef aeneas:
> Very nice reply!
> 
> It looks like knowing about GNC_DATA_HOME goes a long way toward solving my
> problem.  From what I can see I'm not using AQBANKING.  Also, I'd speculate
> that my scheme may not be be completely fool-proof.  I did search the
> registry for "gnucash" and found some KEYS.  This causes me to think that
> there could be some interference if different instances (i.e., different
> thumb drives with different peoples versions) of GNUcash were run on the
> same computer.  While I might expect some behavioral irregularity I'd also
> be inclined to think that this should NOT risk contamination of the files
> used to store the actual accounting records.
> 
It will not affect your accounting records directly, but it may lead to some 
unpleasant surprises anyway.
Some examples:
- the keys in the registry affect  autosave behavior. If you disable it, it 
will equally be disabled for other users that may depend on it and that would 
lose data in the event of a crash.
- other keys determine for how long backup files should be kept. Again if you 
set this to a different value than other users expect, they may suddenly see 
their backups disappear.
- yet another key swaps the meaning of the num and action fields in account 
registers. An unsuspecting user my be entering data wrongly after this got 
changed behind the user's back.
- ...


> Just for the record I notice that the portableapps version of GNUcash (3.2)
> has a directory named GTKDataHome in addition to GNCDataHome.  In my case
> the GTKDataHome directory is still empty.  However, I am wondering if I
> could/should make some accommodation for whatever purpose that serves?

I have no idea as I don't know any details of the portableapps version of 
gnucash.

However this reminds me that the GNC_CONFIG_HOME on linux is derived from 
XDG_CONFIG_HOME. (as is GTK_CONFIG_HOME). I can't test whether the Windows 
version of GTK (which is the framework GnuCash is built on) also respects this 
variable. If so you could move both config directories by setting the 
XDG_CONFIG_HOME environment variable. It's worth a try.

> Also, there is another directory named settings which contains files that
> appear to be exported from the registry.  To the extent that portableapps
> handles registry keys properly it is a better solution than my home grown
> hack.  However, another feature my technique provides is the installation of
> a new version without making any change to an existing version that is
> working just fine.  There are many circumstances under which preserving the
> ability to revert to, or for that matter switch back and forth between, a
> prior version is quite helpful and this can extend across several versions.
> 
Agreed. And on several occasions I have been thinking about adjusting the 
gnucash code and its Windows installer to make this universally possible. It 
never really happened so far due to lack of time and other priorities.

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-10-26 Thread Paul Kinzelman

Not ideal of course, but if you install GC on all the computers you want
to run on, you could just put the data on the flash drive and plug it in
to whatever computer you want and have already installed GC and
then start GC.

On 10/26/2018 2:27 PM, aeneas wrote:

Very nice reply!

It looks like knowing about GNC_DATA_HOME goes a long way toward solving my
problem.  From what I can see I'm not using AQBANKING.  Also, I'd speculate
that my scheme may not be be completely fool-proof.  I did search the
registry for "gnucash" and found some KEYS.  This causes me to think that
there could be some interference if different instances (i.e., different
thumb drives with different peoples versions) of GNUcash were run on the
same computer.  While I might expect some behavioral irregularity I'd also
be inclined to think that this should NOT risk contamination of the files
used to store the actual accounting records.

Just for the record I notice that the portableapps version of GNUcash (3.2)
has a directory named GTKDataHome in addition to GNCDataHome.  In my case
the GTKDataHome directory is still empty.  However, I am wondering if I
could/should make some accommodation for whatever purpose that serves?
Also, there is another directory named settings which contains files that
appear to be exported from the registry.  To the extent that portableapps
handles registry keys properly it is a better solution than my home grown
hack.  However, another feature my technique provides is the installation of
a new version without making any change to an existing version that is
working just fine.  There are many circumstances under which preserving the
ability to revert to, or for that matter switch back and forth between, a
prior version is quite helpful and this can extend across several versions.

Anyway many thanks for the help.  It looks like my flash drive installation
is now somewhat portable and I also appreciate learning about some other
aspects of GNUcash which may be helpful in the future.



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-10-26 Thread aeneas
Very nice reply!

It looks like knowing about GNC_DATA_HOME goes a long way toward solving my
problem.  From what I can see I'm not using AQBANKING.  Also, I'd speculate
that my scheme may not be be completely fool-proof.  I did search the
registry for "gnucash" and found some KEYS.  This causes me to think that
there could be some interference if different instances (i.e., different
thumb drives with different peoples versions) of GNUcash were run on the
same computer.  While I might expect some behavioral irregularity I'd also
be inclined to think that this should NOT risk contamination of the files
used to store the actual accounting records.

Just for the record I notice that the portableapps version of GNUcash (3.2)
has a directory named GTKDataHome in addition to GNCDataHome.  In my case
the GTKDataHome directory is still empty.  However, I am wondering if I
could/should make some accommodation for whatever purpose that serves? 
Also, there is another directory named settings which contains files that
appear to be exported from the registry.  To the extent that portableapps
handles registry keys properly it is a better solution than my home grown
hack.  However, another feature my technique provides is the installation of
a new version without making any change to an existing version that is
working just fine.  There are many circumstances under which preserving the
ability to revert to, or for that matter switch back and forth between, a
prior version is quite helpful and this can extend across several versions.

Anyway many thanks for the help.  It looks like my flash drive installation
is now somewhat portable and I also appreciate learning about some other
aspects of GNUcash which may be helpful in the future.



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to run GNUcash in portable fashion?

2018-10-26 Thread Geert Janssens
Op vrijdag 26 oktober 2018 18:52:33 CEST schreef aeneas:
> One of the nice things about software designed to run on multiple platforms
> is that it tends to avoid the use of platform specific features.  I've had
> very good success setting up various open source packages to run on Windows
> in a portable fashion.  While the  Portable Apps
>    offering has some very nice capabilities
> there are a couple of issues that cause me to like my own method better.
> One of these is the slowness with which new releases get transitioned to
> their platform, which is the current case with GNUcash Version 3.3.
> 
> I've attempted to setup GNUcash to run flash memory in a manner that it can
> be easily taken from one computer to another.  Coincidentally it looks like
> GNUcash made a change in Version 3.3 that should make this work well.  I
> noticed that the files used for storing persistent state information have
> been moved from a folder named ".gnucash" which was located in the folder
> referenced by the Windows environment variable named "%HOMEPATH%" to the
> folder referenced by the Windows environment variable named "%APPDATA%".
> The problem is that it appears as though GNUcash does not bother to use
> these environment variables but rather hard codes the folder names using
> absolute paths assigned to the "C:\" drive with the default values for the
> paths that Windows normally assigns to the indicated variables.
> 
No, GnuCash calls SHGetSpecialFolderLocation (NULL, CSIDL_APPDATA, );
See 
https://github.com/Gnucash/gnucash/blob/3.3/libgnucash/core-utils/gnc-filepath-utils.cpp#L486

While deprecated this is one way to retrieve that current APPDATA directory 
via the Windows API. I don't know if that function considers environment 
variables though.

> Of course the reason for having these variables is so that the paths can be
> changed external to the software that needs to use such storage.  I cannot
> think of a good reason for using these paths but ignoring the variables.

The environment variables are a Windows thing. It's not clear to me whether 
applications are supposed to explicitly prefer them over whatever is returned 
by the Windows API. If you can point me to Microsoft guidelines in this 
respect we can evaluate this.


> Rather if GNUcash did use these variables I suspect that it might work vary
> well from a portable drive that could be used on different computers.  Is
> there any chance that GNUcash might consider doing something as normal as
> this?
> 
Well, we haven't established yet whether this is the "normal" thing to do.

However I sympathize with your use case. You can handle it partly by setting 
GNC_DATA_HOME to the location where you want to store your data.

However this will only handle part of the metadata and configuration files. 
If you have created your own guile based reports ("custom reports") or want to 
customize the gnucash gui, these files are stored in a directory that's 
internally known as "GNC_CONFIG_HOME". Unlike GNC_DATA_HOME this one can't be 
moved (yet) due to some oversight while implementing these changes. It is 
hardcoded to be APPDATA\GnuCash, with APPDATA retrieved as explained above.

Note that this would still not be completely portable. Part of GnuCash' 
preferences are stored in the registry. So when moving to another PC, you'll 
lose these preferences. Altering them will taint the registry on that PC, 
which is not truly portable. Unless of course you also have a mechanism to 
redirect registry trees to a local file. I don't know enough of Windows to 
estimate if this is possible.

Next, GnuCash depends on aqbanking. This has its own configuration directory 
in the user's home directory. If you use aqbanking you may want to set 
AQBANKING_HOME as well.

Regards,

Geert


___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] How to run GNUcash in portable fashion?

2018-10-26 Thread aeneas
One of the nice things about software designed to run on multiple platforms
is that it tends to avoid the use of platform specific features.  I've had
very good success setting up various open source packages to run on Windows
in a portable fashion.  While the  Portable Apps
   offering has some very nice capabilities
there are a couple of issues that cause me to like my own method better. 
One of these is the slowness with which new releases get transitioned to
their platform, which is the current case with GNUcash Version 3.3.

I've attempted to setup GNUcash to run flash memory in a manner that it can
be easily taken from one computer to another.  Coincidentally it looks like
GNUcash made a change in Version 3.3 that should make this work well.  I
noticed that the files used for storing persistent state information have
been moved from a folder named ".gnucash" which was located in the folder
referenced by the Windows environment variable named "%HOMEPATH%" to the
folder referenced by the Windows environment variable named "%APPDATA%". 
The problem is that it appears as though GNUcash does not bother to use
these environment variables but rather hard codes the folder names using
absolute paths assigned to the "C:\" drive with the default values for the
paths that Windows normally assigns to the indicated variables.

Of course the reason for having these variables is so that the paths can be
changed external to the software that needs to use such storage.  I cannot
think of a good reason for using these paths but ignoring the variables. 
Rather if GNUcash did use these variables I suspect that it might work vary
well from a portable drive that could be used on different computers.  Is
there any chance that GNUcash might consider doing something as normal as
this?



--
Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
If you are using Nabble or Gmane, please see 
https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.