added bit field in nsInstallFile for Windows Shared File and Do No Uninstall.

added support in fileop for registering ole server files.

changed the way logging is done in install.log to write to the log file *before* the attempt to complete() the file installation process.  This helps with debugging because is shows what file the installation probably stopped on.


git-svn-id: svn://10.0.0.236/trunk@69622 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ssu%netscape.com
2000-05-14 03:07:05 +00:00
parent dc0f25ab51
commit 7f30e74836
11 changed files with 321 additions and 47 deletions

View File

@@ -1258,6 +1258,53 @@ InstallFileOpFileUnixLink(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
return JS_TRUE;
}
//
// Native method WindowsRegisterServer
//
JSBool PR_CALLBACK
InstallFileOpWinRegisterServer(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{
nsInstall *nativeThis = (nsInstall*)JS_GetPrivate(cx, obj);
PRInt32 nativeRet;
JSObject *jsObj;
nsInstallFolder *folder;
*rval = INT_TO_JSVAL(nsInstall::UNEXPECTED_ERROR);
// If there's no private data, this must be the prototype, so ignore
if(nsnull == nativeThis)
{
return JS_TRUE;
}
// public int WinRegisterServer (nsInstallFolder aNativeFolderPath);
if ( argc == 0 || argv[0] == JSVAL_NULL || !JSVAL_IS_OBJECT(argv[0])) //argv[0] MUST be a jsval
{
*rval = INT_TO_JSVAL(nsInstall::INVALID_ARGUMENTS);
return JS_TRUE;
}
jsObj = JSVAL_TO_OBJECT(argv[0]);
if (!JS_InstanceOf(cx, jsObj, &FileSpecObjectClass, nsnull))
{
*rval = INT_TO_JSVAL(nsInstall::INVALID_ARGUMENTS);
return JS_TRUE;
}
folder = (nsInstallFolder*)JS_GetPrivate(cx, jsObj);
if(!folder || NS_OK != nativeThis->FileOpWinRegisterServer(*folder, &nativeRet))
{
return JS_TRUE;
}
*rval = INT_TO_JSVAL(nativeRet);
return JS_TRUE;
}
/***********************************************************************/
//
// Install Properties Getter
@@ -1324,6 +1371,7 @@ static JSFunctionSpec FileOpMethods[] =
{"windowsShortcut", InstallFileOpFileWindowsShortcut, 7},
{"macAlias", InstallFileOpFileMacAlias, 2},
{"unixLink", InstallFileOpFileUnixLink, 2},
{"windowsRegisterServer", InstallFileOpWinRegisterServer, 1},
{0}
};