Hey folks I was thinking of writing some substitutes/stubs for the windows .CPL files.
I migrated to using linux as a desktop fairly recently /used it for servers for a while, though/. Adapting to the linux equivalents of the programs I use, using wine for the rest etc. Whilst "reinventing" the software base,I had an annoyingly familiar *close encounter* with a program which /both windows and wine/ gives out a message basically saying in short: "For this program to run, the decimal should be '.' and the negative sign - '-'." That's cuz the locale /Bulgarian/ uses the ',' as the default decimal /both win and wine/.
The solutions, of course, are the 3 obvious ones - copy intl.cpl from a working windows, go "regedit" on the subject, open the regs with a text editor. Both 3 are not very appealing (notably the first one; the 2nd and 3rd are rather annoying /if you haven't tampered with the registry too much/, but I consider the first one a real no-go.). So I decided to write something to replace the functions of intl.cpl, and called it "winelocalesetup".
However, this got me thinking further - what if that program instead of popping up that message, decided to execute,say, "control.exe intl.cpl", to save me some of the trouble? And didn't issue any warning, but instead crashed in midst of working with it if the decimal wasn't changed (which would normally be the case. It's an accounting program, so, the decimal is indeed important...)
Anywho, I was thinking of creating a bunch of CPLs which mimic their windows counterparts in their names. However, the applet itself wouldn't do much - it would basically contain a somewhat appropriate icon/description, and, when started, launch the real executable, wine*something*.exe. That "wine*something*.exe" will for now basically show a message "Winesomething. Not implemented yet. If you see this message because of a running program, it means that the program is trying to...". With time, the .exe will be transformed into a useful substitute for the corresponding windows function. For example: intl.cpl - contains an icon (preferably a picture of the Earth; was thinking of going NASA on the subject), a description "Wine Locale Settings", and will execute winelocalesetup.exe. Winelocalesetup.exe would show a message: "Winelocalesetup. Not implemented yet. If you see this message, it means that a program is trying to call INTL.CPL, probably in order for you to modify the regional settings." That way, at least, it will be indicated to the user what's going on.
The idea for having both the cpls and the exes is, well, the cpls have to be called what they're called for compatibility reasons, and, once in place, need not be modified; the actual tool is contained within the .exe, which can be, well, a lot more flexible to develop than the CPL itself, and, can be replaced at any moment. And, well, although compatible with windows, it wouldn't be a pure repetition. (and no longer an empty control panel. Yay!)
BTW I have done quite some work on that winelocalesetup.exe, it reads the appropriate values from the registry, doesn't resemble the original intl.cpl's vision, and, well, is somewhat kinda useful (if only I could figure out how to WRITE the damn values, the keys keep turning back to their old values... oh well, guess I'll have to RTFM some more.)
So, any suggestions/comments/ideas?
Hi,
While I think writing control panel applets for Wine may be a good idea in general, I wonder whether the specific example you propose--a locale setting control panel--might be better served by trying to infer the correct settings from the Linux locale.
--Juan
On Sunday 16 March 2008 11:35:39 pm you wrote:
Hi,
While I think writing control panel applets for Wine may be a good idea in general, I wonder whether the specific example you propose--a locale setting control panel--might be better served by trying to infer the correct settings from the Linux locale.
--Juan
I'm not sure how changing the decimal (in the example case) on linux would affect the linux apps themselves - will I have to switch it back and forth if another, linux app demands it to be ',' whilst the windows one wants a dot. (sorry if the question is somewhat stupid, still adapting, trying to get the windows way of thinking out of me head). So, in this particular case I was thinking of having the wine and linux locales as two different entities; After all, the win-apps only care about what the registry says, so no need to ever touch the global linux settings. (besides, the intl.cpl is the easiest and somewhat useful to make a substitute for, a nice starting point and a good test for the entire idea/toolkit; The truth is, I still haven't got much of a clue how the equivalent of appwiz.cpl would actually operate, not to mention (OMG!) hdwwiz.cpl). In a more general sense, I have fresh memories of how frustrating the migration to linux can be in terms of the crash course you take once you see the desktop. So for a new user, having his favorite apps up and running properly under wine by doing something he's used to -> Control Panel -> Regional Settings, rather than including a lesson in linux locale modification in the crash course would be nice. He can always take that lesson a few days later when he dares to get out of the box of the software he's used to ;) BTW what about the general idea, a CPL (so the name matches) which executes a .exe (which does the real job,and is easier to substitute with another .exe when/if needed)? And a little hint on the structure... It looks like there are twenty-something *usual* applets. That would make 40+ additional files in the system32... maybe a c:/windows/winecontrolapplets folder which contains the .exes?
pure_evil@mail.bg wrote:
I'm not sure how changing the decimal (in the example case) on linux would affect the linux apps themselves - will I have to switch it back and forth if another, linux app demands it to be ',' whilst the windows one wants a dot. (sorry if the question is somewhat stupid, still adapting, trying to get the windows way of thinking out of me head).
How about setting preferred values in ~/.wine/user.reg, under [Control Panel\International] using your favourite text editor?
On Monday 17 March 2008 09:30:33 am you wrote:
pure_evil@mail.bg wrote:
I'm not sure how changing the decimal (in the example case) on linux would affect the linux apps themselves - will I have to switch it back and forth if another, linux app demands it to be ',' whilst the windows one wants a dot. (sorry if the question is somewhat stupid, still adapting, trying to get the windows way of thinking out of me head).
How about setting preferred values in ~/.wine/user.reg, under [Control Panel\International] using your favourite text editor?
LoL in my particular case, I did all 3 things on all the install/reinstall/uninstall cases I had trying to get that app to work /it requires Bulgarian language, it uses MDAC, it has a MSSQL2005 server backend, it needs that dot, some part is Tahoma font, others are, well, just about any font you can imagine, I know the man who wrote it, his moto is: "allways new stuff, always microsoft" /OMG is he really gonna go VISTA in a year or two?! /, IT'S THE APP FROM HELL!!!!... And there's no substitute :( / I copied intl.cpl, went regedit, and, used vi on the reg. All 3 worked, but I was thinking in the lines of, will a regular user be happy with any of the three options should he encounter such a monstrosity, or, a different monstrosity which requires a different cpl.