Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
98 user(s) are online (55 user(s) are browsing Forums)

Members: 1
Guests: 97

FlynnTheAvatar, more...

Headlines

 
  Register To Post  

prefs files which works everywhere
Home away from home
Home away from home


See User information
Have some probably dumb question:

Let's say i have "System" partition. And have some apps which use images/fonts/etc from my system partition. So, when i choice from those apps full path to data files, in prefs files it saves then as "System:path_to_data_files". And , if i will just copy that prefs file to another machine , where is not System: partition, but name is different, then "System:path" from prefs will fail.

Question is: how i can fast deal with it, and have SYS: instead of System:.

Only one way about which i know now, is that i should manually re-save all patches again, just manually delete "system:" and type "sys:" when do choice.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: prefs files which works everywhere
Just can't stay away
Just can't stay away


See User information
Prefs file is in IFF-PREFS format or just plain text?
IFF-PREFS: maybe create a tool to convert from System:abc to SYS:abc

'Assign System: SYS:'?

Go to top
Re: prefs files which works everywhere
Home away from home
Home away from home


See User information
@javier
Quote:

Prefs file is in IFF-PREFS format or just plain text?


IFF-PREFS ones, (those usual system's prefs file like done from Prefs:Font, etc).

Quote:

'Assign System: SYS:'?


You mean force users to do such assign ? That no way of course. Need something which can very fast and easy just deal with system-kind preference files and put instead of system: sys: everywhere, so when i will upload it, it will works for everyone, not only for those who have system partition called as System:

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: prefs files which works everywhere
Just can't stay away
Just can't stay away


See User information
Is it a very large/big .prefs file?
Maybe the converter tool/hack could be nice. I have here a input/locale/wbpattern .prefs reading source code (from amigaos4 wiki)

Go to top
Re: prefs files which works everywhere
Home away from home
Home away from home


See User information
@kas1e

The solultion is simple, you *never* overwrite someones prefs file in a installer. Rather you allow them load that prefs file from the preferences program. They can then save it as default if needed. That way the path is right whatever system.

Always save image paths etc with sys: (ie do it right to start with then it doesn't need fixing)

If your making a theme the first rule is overridden but you should only copt to ENV: till confirmed by the users.





Go to top
Re: prefs files which works everywhere
Home away from home
Home away from home


See User information
@javier
Quote:

Is it a very large/big .prefs file?


Yep, that mui prefs which i done for year or two. Dig in now into every part of it and check where i do use images from some system path are pain and i not sure if i want to spend time on it :)

Quote:

Maybe the converter tool/hack could be nice.


If you can make one which will just replace all the "system:" in the prefs file to "sys:" with all shifts and co, and prefs will works: that can be pretty helpfull.

@Andy
Quote:

The solultion is simple, you *never* overwrite someones prefs file in a installer.


I never use any installers, and i not want to overwrite anything: I have my mui skin which is just prefs file (big one), which is handle all necessary stuff, and where i open from system partition bunch of images of all kind in all kind of different places, and they all saves as "System:" , because my system partition are "System:", while, i need "Sys:" there, so it will works for every user , as Sys: assign presented always.

Quote:

Always save image paths etc with sys: (ie do it right to start with then it doesn't need fixing)


Now its easy to say, right :) But problem is that everything already done like it done already. General advice are ok, but problem still here. I just save all patches by asl-requester and choice "system:" year back, now not want to change all manually, as there hundred of places


Quote:

If your making a theme the first rule is overridden but you should only copt to ENV: till confirmed by the users.


Nope, that not theme, its just some mui skin, which images i can't upload as they copyrighted on morphos, all i can upload its my own prefs file with text to point out where download and where to put images. That prefs file done for last years from "System:Mui/Images/balblabla", which should be "Sys:Mui/Images/blablabl" to make it works for all users (and yep, those images should be exactly there, not in env: or whatever).

In other words, all those general advises are ok, and sure they all right, just problem is that i have prefs file already, and do not want to recheck all those hundreds places where images uses from system:mui/balbal, just want to swap all fast on sys:mui/balbal and upload it.

Maybe there is ready to use some prefs-file apps which can do so ? (like load/change/save)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: prefs files which works everywhere
Not too shy to talk
Not too shy to talk


See User information
@kas1e

it you want to point to the mui directory use the mui: assign. and not sys:mui.

but it seems that mui always uses the formatted name instead of the assigned or device one. strange! and imho a bug.

regards...
michael

Go to top
Re: prefs files which works everywhere
Just can't stay away
Just can't stay away


See User information
@kas1e



I would start using rep from http://aminet.net/package/util/cli/rep and see if the result does what you want.
I guess in a binary file problems may occur after that.because you replace a string with a shorter one.

Second method then
You could extract all the needed full paths (strings beginning with system: - i guess 'strings' can be used)

system:myfullpath then has to be replaced with "sys:myfullpath "
adding 3 blanks at the replacing fullpath

you could make a script 'rep'ing al these fullpathis in sequence
rep prefsfile system:myfullpath1 "sys:myfullpath "

Go to top
Re: prefs files which works everywhere
Home away from home
Home away from home


See User information
Quote:

I have my mui skin which is just prefs file (big one), which is handle all necessary stuff, and where i open from system partition bunch of images of all kind in all kind of different places, and they all saves as "System:" , because my system partition are "System:", while, i need "Sys:" there, so it will works for every user , as Sys: assign presented always.


Well checking MUI: most of the images are contained in MUI:Images

So you just need to unpack the gadget images there in a directory and they becomae available in the MUI4 prefs program.

Then there just a "few" background images.

Ultimately though the only safe way to do this is bite the bullet and move all the images to MUI:Images/kas1e (for example) and rebuild your MUI theme.

There are some IFF file editors on aminet, but you'd likely end up taking as much time to use them as the actual MUI prefs editor.

Solutions based on hacking / search and replacing in the binary file are likely to end up with a malformed IFF header (wrong sized chunks etc). Admittedly your reduceing the string length so you *could* pad with zeros.









Go to top
Re: prefs files which works everywhere
Just can't stay away
Just can't stay away


See User information
@MichaelMerkel

Quote:
but it seems that mui always uses the formatted name instead of the assigned or device one. strange! and imho a bug.


That's the same as the original behaviour of IPrefs before I filed an enhancement request many years ago. the early versions would automatically expand the device name to the volume name.



Amiga user since 1985
AOS4, A-EON, IBrowse & Alinea Betatester

Ps. I hate the new amigans website. <shudder>
Go to top
Re: prefs files which works everywhere
Home away from home
Home away from home


See User information
@Kas1e
Maybe this is something which needs to be "fixed" in MUI? (Although the maintainer of MUI may disagree that it is a bug, and rather claim that it is a feature, for certain reasons.)

Author of the PortablE programming language.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project