Sean Su wrote:
Rob,yeah, docs on this is sparce at the moment (to say the least).
http://lxr.mozilla.org/seamonkey/source/xpinstall/src/nsInstall.cpp#273 (contains info on what can return when querrying for platorms via .js script)This one is particularly interesting, with the fine level of OS detail resolved. But I'll deal with that in the future. For now I'll stick with the config.ini feature, assuming I'm doing it right.
2) via config.ini. Given the 'Windows Registry' section that you found, here are the possible OS= key values. You can also OR them together (Win95|Win98):So Mac values aren't supported? Is the OS= item supported only when dealing with the Windows Registry sections? If so, is there any way to identify in config.ini components that will install (we're talking files here) on Windows but not on Mac, or in NT but not w98?
Win95 debute - original release of win95 only
Win95 - any win95
Win98 - any win98
NT3 - nt3.x
NT4 - nt 4.x
NT50 - win2k
NT51 - winXP
NT5 - any os >= win2k
FWIW, my stategy so far is to hack what I'm getting from the Netscape installer for my own purposes. The install.js files for my .xpi's are very simple, copies of the one I got from the browser.xpi (If I remember right). Regarding fonts, I have the following in my config.ini:
[Component WinFonts]
;***LOCALIZE ME BABY ***
Description Short=Windows Fonts
;*** LOCALIZE ME BABY ***
Description Long=Display and printing fonts for Windows
Archive=WinFonts.xpi
Install Size=137
Install Size System=1
Install Size Archive=57
Atrributes=SELECTED
This installs the fonts into a subdirectory of my main application folder. Later on, I copy them to the Windows Fonts folder:
[Copy File1]
Timing=post smartupdate
Source=[SETUP PATH]\Fonts\Ldnew_3.ttf
Destination=[PERSONAL_FONTS]
Fail if Exists=FALSE
Do Not Uninstall=FALSE
repeated for each font I need to install. It seems to be working very well on my w98 machine, have yet to test it on any flavor of NT. Do you forsee any problems with this method?
How are you trying to determine the previous installation path to your application?I'm trying to adapt this from the Netscape config.ini, since it seems to do this. I am suspecting that the sections [Locate Previous Product Pathx] sections do this automatically. They refer to a registry key [Product CurrentVersion] and [Product PreviousVersion] HKey; but it's not finding mine even though I've verified that the paths exist in the registry. I suspect that the script doesn't know what my [Product Previous/CurrentVersion] are, and don't see anywhere in the Netscape confog.ini where this variable is set.
Thanks
Rob
Rob Brandt wrote:Thanks, Sean. Actually, I've made a ton of progress on this, and have gotten
the fonts installation working well by making the .xpi for the fonts, then
copying them into the PERSONAL_FONTS folder. I've only tested it on my w98
machine, but think it will work on NT/2000/XP too since it seems to know about
the fonts folder.
What would be really valueble to me in other issues is complete documentation on
what goes in to the config.ini file. For example, in the config.ini file for
Netscape 7.01 there is a section:
[Component Navigator-Windows Registry0]
...
...
OS=NT5
To me, that last item suggests that component will only be run on WindowsXP
(NT5?). Yet I can find no documentation anywhere that says what the OS= item
does, or what the valid values for it are. I can only assume that there other
items undocumented that I would find useful. I did try and create a component
with that item to see if it would install on w98, and it does, so I'm not
"getting it". Having an item that would only run on certain platforms would
make my life a heck of a lot easier. I have an application that runs on
NT/2000/XP, w95/98/me, OS8-9, OSX, (and w3.1 and 68k macs, although I'm doubting
I'll have many requests for that platform, and possibly in the future linux). You can see why I hope that XPInstall would be an ideal candidate for an installer.
Another issue I struggled with last night before sleep overtook me was
determining the previously defined (in the registry) installation path to my
application. Seems like it should work. Doesn't.
Thanks for your response.
Rob
Quoting Sean Su <[EMAIL PROTECTED]>:
Have you already created a .xpi file for the fonts? The native windows
installer does not actually do the installation of files, but rather it
gathers information from the user and system, then passes the .xpi files
needing to be installed to the xpinstall engine.
I'm not sure how much you know about how the entire process works. Let
me know if you need more help on this.
Rob Brandt wrote:
OK, I've dived in to making my own installer using the stubs. I've
focused on the windows version since it's much better commented than
the Mac version. I have a mostly working installer.
There's a couple of things I don't see how to do. It would be nice if
I could see and example of how this works.
1) Install fonts in windows. I see from the config.ini that is used
in the Netscape installer that the stub is aware of where the fonts
folder is, in PERSONAL_FONTS. But how to get them installed,
registered, efficiently?
2) Windows versions: My app has some minor differences between Windows
95/98/Me and NT/200/XP. It would be really nice if config.ini could
sense which version it was on, and select the correct package.
TIA
Rob
-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
