Closed Bug 129582 Opened 22 years ago Closed 22 years ago

Current MRE installation needs to be registered with nsDirectoryService

Categories

(Core :: XPCOM, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.1alpha

People

(Reporter: dougt, Assigned: chak)

References

Details

Attachments

(1 file, 3 obsolete files)

see summary.
Blocks: 129573
Hi Doug : Could you please explain this in a bit more detail...thanks
sure.

When an MRE application starts up it, it is going to have to figure out which
MRE is will be using.  How this decision is made is outside of the scope of this
bug.  When the directory is know, it must be registered with the directory
service provider.  

At the minimum, we need to add a well known key to the directory service
provider so that XPCOM and other client can find this directory.  We need to
ensure that the embedding code does set this correctly when the MRE is found.

I hope this makes sense.

Changes to MfcEmbed to support registration of it's MRE dir location. Patch
attached.
hardcoding paths here seems like the wrong direction?
The hardcoded paths are temporary..

Once we all agree and Syd provides me with the actual registry location of the
MRE installation then i'll take care of reading it from the registry and using
it approproately.
pushing milestone out based on requirement feedback from Chak and Jud.
Target Milestone: --- → mozilla1.1alpha
Comment on attachment 74337 [details] [diff] [review]
Really attaching the patch this time :-)

Obsoleting this patch. Updated patch forthcoming
Attachment #74337 - Attachment is obsolete: true
This patch does the following:

Enables MfcEmbed to be run in an MRE based env - if it finds an MRE with which
it's compatible with. 
If it does not find an MRE installation i.e. if the registry does not have the
MRE related keys in it, then, MfcEmbed works like it always did(in a non-MRE
env)

By using this patch we preserve backward compatibility (i.e. be able to run in
a non-MRE env) while at the same time showing embeddors on how to use an MRE
when one becomes available.
Comment on attachment 85802 [details] [diff] [review]
Updated patch to reflect current state of things...

::GetCurrentDirectory returns a string in the fs charset, you will want to use
NS_NewNativeLocalFile().  Same is true in GetMreDirectory.

why are you using nsCRT here?  Just use strdup/free directly.

didn't you have some xpcom changes?
Attachment #85802 - Flags: needs-work+
Attachment #85802 - Attachment is obsolete: true
Cc:ing Adam for r=
Status: NEW → ASSIGNED
Going back to using NS_InitEmbedding() instead of NS_InitEmbedding2()
Attachment #85817 - Attachment is obsolete: true
Comment on attachment 86499 [details] [diff] [review]
Uses NS_InitEmbedding() instead of NS_InitEmbedding2()

You could use CRegKey instead of the native registry calls, but otherwise
r=adamlock.

So if mfcEmbed is not in the MRE directory, how does it resolve its
dependencies to xpcom.dll and other Moz files that it is dynamically linked to?
Attachment #86499 - Flags: review+
>So if mfcEmbed is not in the MRE directory, how does it resolve its
>dependencies to xpcom.dll and other Moz files that it is dynamically linked to? 

Can be done a couple of ways:

1. Via a batch file (here's a copy of my test batch file) :
E:\mreapp1>cat runapp.bat
@echo OFF
set PATH=%PATH%;E:\MRE1.0;E:\MRE1.0\components
mfcembed.exe -console

2. You can use the "Application Specific Paths" feature under Windows as
desribed below:

To use application specific paths:

1. Create a subkey with your application name as the keyname under the key shown
above

Ex: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\MyApp.exe

2. Set the (Default) value to the full path of your executable file

Ex: C:\Program Files\EmbedApp\MyApp.exe

3. Add a subkey named "Path" and set it's string value to the full path of the
MRE version your application is compatible with:

Ex : C:\MRE1.0 


The application installer can create the batch file or set the AppPath
appropriately.
Comment on attachment 86499 [details] [diff] [review]
Uses NS_InitEmbedding() instead of NS_InitEmbedding2()

sr=rpotts@netscape.com
Attachment #86499 - Flags: superreview+
Landed patch on the trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Blocks: 166977
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: