Save relative files at XnView folder

Ask for help and post your question on how to use XnView Classic.

Moderators: XnTriq, helmut, xnview

Nelson
Posts: 54
Joined: Wed Apr 05, 2006 12:44 pm
Location: Tao-Yuan, Taiwan

Save relative files at XnView folder

Post by Nelson »

The relative files (bookmark.ini, cache_thumb.db, and default.bar) are saved in %appdata%\xnView.

I'd like to know is there a way to save them in the "XnView" folder ?
(Like the xnview.ini, I can choose where to save it in the option window.)

XnView 1.90 <x>
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

Nice request !

Post by Clo »

—> Nelson

:) Hello !

• OMG ! It's something I requested for a while several times, here and directly to Pierre ! But it's impossible till today.

- Hence, I support this totally as a wish !

- Currently, when users install the programme as several versions,
even in several drives, they get the same favourites for all ! :|
Optional should be nice, and it's possible to get this easily in that way

:mrgreen: Kind regards,
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
ckit
XnThusiast
Posts: 2577
Joined: Tue Feb 17, 2004 1:11 am
Location: QLD, Australia

Re: Save relative files at XnView folder

Post by ckit »

Nelson wrote:The relative files (bookmark.ini, cache_thumb.db, and default.bar) are saved in %appdata%\xnView.

I'd like to know is there a way to save them in the "XnView" folder ?
(Like the xnview.ini, I can choose where to save it in the option window.)
The current method is best for multi-user environments, saving these files in XnView's folder wouldn't allow for more than one set of configurations per user.
AMD Ryzen 3 3300X 3.8Ghz, 16Gb DDR4, RX6600XT with Dell U2520D at 2560x1440@60Hz scaling 125%
Windows 11 Pro x64 23H2, Listary Pro, PowerToys and Wintoys
Nelson
Posts: 54
Joined: Wed Apr 05, 2006 12:44 pm
Location: Tao-Yuan, Taiwan

Re: Save relative files at XnView folder

Post by Nelson »

ckit wrote:
Nelson wrote:The relative files (bookmark.ini, cache_thumb.db, and default.bar) are saved in %appdata%\xnView.

I'd like to know is there a way to save them in the "XnView" folder ?
(Like the xnview.ini, I can choose where to save it in the option window.)
The current method is best for multi-user environments, saving these files in XnView's folder wouldn't allow for more than one set of configurations per user.
But I don't need multi-user environments.
So, I think it would be better if there is an option to choose to save the settings in XnView's folder or in %appdata%.

For me, I hope I can save them in XnView's folder.
Thus, I can install XnView at different disk (for example, D:\) and can keep my settings (favorites, mainbar, and caches) when I re-install Windows.

Also, if there is such a feature, XnView can be a portable software.
User avatar
helmut
Posts: 8705
Joined: Sun Oct 12, 2003 6:47 pm
Location: Frankfurt, Germany

Post by helmut »

From what I can see, in 1.90 Alpha1, in "Tools > Options > System integration" you can choose the location. There are the following folders: XnView, User, Windows. I think that is what you were looking for.
Nelson
Posts: 54
Joined: Wed Apr 05, 2006 12:44 pm
Location: Tao-Yuan, Taiwan

Post by Nelson »

helmut wrote:From what I can see, in 1.90 Alpha1, in "Tools > Options > System integration" you can choose the location. There are the following folders: XnView, User, Windows. I think that is what you were looking for.
No.
I know that option and I've mentioned it in my previous post.

What I'm talking about is the files in the %appdata%\xnView folder.
That is, the "bookmark.ini, cache_thumb.db, and default.bar" files.

I hope I can choose where to store these 3 files.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

One only…

Post by Clo »

—> helmut

• Hi !

- We can choose the location of the file <xnview.ini> ONLY !

- The users who don't care to have a multi-user environment - like Nelson and I - would prefer to choose the location of the covering setting files in the own folder of XnView, because these files are easier to find and this allows a different favourite folders, set per version whether you have several versions installed.

:mrgreen: G
Claude
Clo
Last edited by Clo on Tue Aug 15, 2006 12:57 am, edited 1 time in total.
Old user ON SELECTIVE STRIKE till further notice
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

More portability is always nice

Post by marsh »

I agree with you and Nelson. v.1.9a "Save options" is non-specific wording. I also would like it to apply to all configuration files (except cache). Good for running multiple Xnviews with different profiles as you and others have pointed out.
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

Even worse !

Post by Clo »

:) Hello B. !

• According to the tests I'm performing currently, especially about the tool-bars and the icons one can add, I may say that the settings saving must change a lot… :(

- The new tool-bar system is hybrid, this is necessary to continue the use of the skins, but it's far to be usable easily !

- Just an example (regardless some pretty bugs I found out) :
¤ Let's suppose that you have set a customized skin <My_Skin>,
- You must have drawn extra-icons in the same style for all the extra commands allowed now.
- You add some icons, using your icon-set: So far, so good…
… till you want for change the skin !
- In that case, the extra-icons for <My_Skin> will remain ! The icons will be resized if the sizes of the two skins are different >> ugly.
- Of course, it's caused by the single default.bar file which doesn't save the bars settings per skin !
- To get a coherent tool-bar in the style of each skin currently, we'ld need a default.bar file per skin, set in the sub-folder of each skin !

• Indeed, all designers must provide an extra-icon set, that is not a piece of cake to get, even only for the ß-tests!

• IMHO, to keep the principle of "skinnable" tool bars, we need all icons as separate *.ICO, *.DLL, *.ICL… and no longer use a single bitmap…
BTW :  It's not very difficult to make 33 *.ico from the bitmap ;)

:mrgreen: KR
Claude
Clo
Old user ON SELECTIVE STRIKE till further notice
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

command line switch and profiles

Post by marsh »

The command line switch "-ini" might be useful in allowing multiple profiles if configuration files were forced to share same path as the alternate xnview.ini
Ex: -ini c:\xnview\profile2\xnview.ini
MaierMan
Posts: 78
Joined: Wed Aug 04, 2004 8:32 pm

Post by MaierMan »

Just to clarify something:
Regular Users (everybody without Administrator privleges) has no write-permissions to the Program Files directory and all of it's subfolders.
Writing stuff (like xnview.ini) directly into the Install folder is a clear violation of MS coding guidelines (or better: laws).
Furthermore if you run a program that does such things as an underprivileged user the program will not work probably!
XP (or less) users usually won't recognize any difference as they run as Administrator per default, but it cause fuss in Vista where regular users will per default run as regular users. ;)
Beside the fact - just to repeat it - that writing to Program Files is simply a bad and false thing.


On the other hand I agree that it might be handy to allow XNView to be "portable"...


I usually use a "xyz.local" placeholder file to switch programs I develop into "portable" mode.
The advantages to do so are:
  • The feature is more or less hidden, so non-powerusers won't mess with it.
  • As this file is there the user should have appropriate privileges (he created the file after all).
  • You don't have to perform any "configuration lookups" to know if you should run usual or "portable" mode, as configuration is not available at this point of program initialisation.

Code: Select all

if (file_exists(installdir + "XNView.local"))
{
  InitPortable();
}
else
{
  InitUsual();
}
User avatar
Clo
XnThusiast
Posts: 4441
Joined: Sun Oct 17, 2004 4:57 am
Location: Bordeaux, France

M$ go to…

Post by Clo »

—> MaierMan

:) Do you think that everybody installs XnView in the f****** damn <Program Files> ? :shock:
- There is not any XnView @ home there !
- I never use the installer version.
Writing stuff (like xnview.ini) directly into the Install folder is a clear violation of MS coding guidelines (or better: laws).
:D :D :D :D :D Sorry, M$ doesn't make the laws. I write that I want where I want in MY computers ! Image

:mrgreen: Regards,
Claude
Clo
Last edited by Clo on Thu Aug 17, 2006 5:13 pm, edited 1 time in total.
Old user ON SELECTIVE STRIKE till further notice
marsh
XnThusiast
Posts: 2443
Joined: Sun May 15, 2005 6:31 am

Post by marsh »

MaierMan wrote: I usually use a "xyz.local" placeholder file to switch programs I develop into "portable" mode.
Alpha uses an empty xnview.ini as placeholder to avoid its new default.
MaierMan
Posts: 78
Joined: Wed Aug 04, 2004 8:32 pm

Post by MaierMan »

marsh wrote:
MaierMan wrote: I usually use a "xyz.local" placeholder file to switch programs I develop into "portable" mode.
Alpha uses an empty xnview.ini as placeholder to avoid its new default.
Like the others mentioned already I can set the ini-path, but I cannot throw XNView fully into a "portable" mode, i.e. storing everything in InstallDir.
Another observation: AppData\.ini talkes precedence over InstallDir\.ini, so running one install as %APPDATA% and another as InstallDir isn't possible anyway.

Maybe I'm missing something, can you explain your comment further in that case?


My Opionion:
Ideally XNView should be able to store *bunch of setting files* in %APPDATA% per default or InstallDir per user setting.
The cache location should be adjustable so that I can have these configurations running next to each other:
  • Default - %APPDATA% is used.
  • Other Profile - InstallDir is used, but cache is still shared.
  • Portable - InstallDir is used and Cache is stored elsewhere, eg. in InstallDir too.
User avatar
xnview
Author of XnView
Posts: 44821
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Post by xnview »

So you would like something like ini in option/Integration:

Store other files in folder: Xnview or Program

??
Pierre.