jscript: Moved remaining registration to IRegistrar mechanism.

This commit is contained in:
Jacek Caban 2010-12-29 16:02:46 +01:00 committed by Alexandre Julliard
parent 3d1595dc81
commit 4582a8fe42
4 changed files with 128 additions and 161 deletions

View File

@ -1,86 +0,0 @@
[version]
Signature="$CHICAGO$"
[RegisterDll]
AddReg=Classes.Reg, FileType.Reg
[UnregisterDll]
DelReg=Classes.Reg, FileType.Reg
[Classes.Reg]
HKCR,"CLSID\%CLSID_JScript%\Implemented Categories\%CATID_ActiveScript%",,16
HKCR,"CLSID\%CLSID_JScript%\Implemented Categories\%CATID_ActiveScriptParse%",,16
HKCR,"CLSID\%CLSID_JScript%\OLEScript",,16
HKCR,"CLSID\%CLSID_JScriptAuthor%\Implemented Categories\%CATID_ActiveScriptAuthor%",,16
HKCR,"CLSID\%CLSID_JScriptAuthor%\OLEScript",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScript%",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScriptParse%",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\Implemented Categories\%CATID_ActiveScriptEncode%",,16
HKCR,"CLSID\%CLSID_JScriptEncode%\OLEScript",,16
HKCR,"Component Categories\%CATID_ActiveScriptAuthor%","409",,"Active Scripting Engine with Authoring"
HKCR,"Component Categories\%CATID_ActiveScript%","409",,"Active Scripting Engine"
HKCR,"Component Categories\%CATID_ActiveScriptParse%","409",,"Active Scripting Engine with Parsing"
HKCR,"Component Categories\%CATID_ActiveScriptEncode%","409",,"Active Scripting Engine with Encoding"
HKCR,"ECMAScript",,,"JScript Language"
HKCR,"ECMAScript\CLSID",,,"%CLSID_JScript%"
HKCR,"ECMAScript\OLEScript",,16
HKCR,"JavaScript",,,"JScript Language"
HKCR,"JavaScript\CLSID",,,"%CLSID_JScript%"
HKCR,"JavaScript\OLEScript",,16
HKCR,"JavaScript Author\OLEScript",,16
HKCR,"JavaScript1.1",,,"JScript Language"
HKCR,"JavaScript1.1\CLSID",,,"%CLSID_JScript%"
HKCR,"JavaScript1.1\OLEScript",,16
HKCR,"JavaScript1.1 Author",,,"JScript Language Authoring"
HKCR,"JavaScript1.1 Author\CLSID",,,"%CLSID_JScriptAuthor%"
HKCR,"JavaScript1.1 Author\OLEScript",,16
HKCR,"JavaScript1.2",,,"JScript Language"
HKCR,"JavaScript1.2\CLSID",,,"%CLSID_JScript%"
HKCR,"JavaScript1.2\OLEScript",,16
HKCR,"JavaScript1.2 Author",,,"JScript Language Authoring"
HKCR,"JavaScript1.2 Author\CLSID",,,"%CLSID_JScriptAuthor%"
HKCR,"JavaScript1.2 Author\OLEScript",,16
HKCR,"JavaScript1.3",,,"JScript Language"
HKCR,"JavaScript1.3\CLSID",,,"%CLSID_JScript%"
HKCR,"JavaScript1.3\OLEScript",,16
HKCR,"JScript\OLEScript",,16
HKCR,"JScript Author",,,"JScript Language Authoring"
HKCR,"JScript Author\CLSID",,,"%CLSID_JScriptAuthor%"
HKCR,"JScript Author\OLEScript",,16
HKCR,"JScript.Encode\OLEScript",,16
HKCR,"LiveScript",,,"JScript Language"
HKCR,"LiveScript\CLSID",,,"%CLSID_JScript%"
HKCR,"LiveScript\OLEScript",,16
HKCR,"LiveScript Author",,,"JScript Language Authoring"
HKCR,"LiveScript Author\CLSID",,,"%CLSID_JScriptAuthor%"
HKCR,"LiveScript Author\OLEScript",,16
;; FIXME: This probably should go to wshext.dll
[FileType.Reg]
HKCR,".js",,,"JSFile"
HKCR,"JSFile",,,"JScript Script File"
HKCR,"JSFile\ScriptEngine",,,"JScript"
[Strings]
MODULE="jscript.dll"

124
dlls/jscript/jscript.rgs Normal file
View File

@ -0,0 +1,124 @@
HKCR
{
NoRemove CLSID
{
'{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
{
'Implemented Categories'
{
'{f0b7a1a1-9847-11cf-8f20-00805f2cd064}'
'{f0b7a1a2-9847-11cf-8f20-00805f2cd064}'
}
OLEScript
}
'{F414C261-6AC0-11CF-B6D1-00AA00BBBB58}'
{
'Implemented Categories'
{
'{0aee2a92-bcbb-11d0-8c72-00c04fc2b085}'
}
OLEScript
}
'{F414C262-6AC0-11CF-B6D1-00AA00BBBB58}'
{
'Implemented Categories'
{
'{f0b7a1a1-9847-11cf-8f20-00805f2cd064}'
'{f0b7a1a2-9847-11cf-8f20-00805f2cd064}'
'{f0b7a1a3-9847-11cf-8f20-00805f2cd064}'
}
OLEScript
}
}
NoRemove 'Component Categories'
{
ForceRemove '{f0b7a1a1-9847-11cf-8f20-00805f2cd064}'
{
val '409' = s 'Active Scripting Engine'
}
ForceRemove '{f0b7a1a2-9847-11cf-8f20-00805f2cd064}'
{
val '409' = s 'Active Scripting Engine with Parsing'
}
ForceRemove '{f0b7a1a3-9847-11cf-8f20-00805f2cd064}'
{
val '409' = s 'Active Scripting Engine with Encoding'
}
ForceRemove '{0aee2a92-bcbb-11d0-8c72-00c04fc2b085}'
{
val '409' = s 'Active Scripting Engine with Authoring'
}
}
'ECMAScript' = s 'JScript Language'
{
CLSID = s '{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JavaScript' = s 'JScript Language'
{
CLSID = s '{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JavaScript1.1' = s 'JScript Language'
{
CLSID = s '{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JavaScript1.2' = s 'JScript Language'
{
CLSID = s '{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JavaScript1.3' = s 'JScript Language'
{
CLSID = s '{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'LiveScript' = s 'JScript Language'
{
CLSID = s '{F414C260-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JScript'
{
OLEScript
}
'JScript Author'
{
OLEScript
}
'JavaScript Author' = s 'JScript Language Authoring'
{
CLSID = s '{F414C261-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JavaScript1.1 Author' = s 'JScript Language Authoring'
{
CLSID = s '{F414C261-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JavaScript1.2 Author' = s 'JScript Language Authoring'
{
CLSID = s '{F414C261-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'LiveScript Author' = s 'JScript Language Authoring'
{
CLSID = s '{F414C261-6AC0-11CF-B6D1-00AA00BBBB58}'
OLEScript
}
'JScript.Encode'
{
OLEScript
}
ForceRemove '.js' = s 'JSFile'
ForceRemove JSFile = s 'JScript Script File'
{
ScriptEngine = s 'JScript'
}
}

View File

@ -137,77 +137,13 @@ HRESULT WINAPI DllCanUnloadNow(void)
return module_ref ? S_FALSE : S_OK;
}
/***********************************************************************
* register_inf
*/
#define INF_SET_ID(id) \
do \
{ \
static CHAR name[] = #id; \
\
pse[i].pszName = name; \
clsids[i++] = &id; \
} while (0)
static HRESULT register_inf(BOOL doregister)
{
HRESULT hres;
HMODULE hAdvpack;
HRESULT (WINAPI *pRegInstall)(HMODULE hm, LPCSTR pszSection, const STRTABLEA* pstTable);
STRTABLEA strtable;
STRENTRYA pse[7];
static CLSID const *clsids[7];
unsigned int i = 0;
static const WCHAR advpackW[] = {'a','d','v','p','a','c','k','.','d','l','l',0};
INF_SET_ID(CLSID_JScript);
INF_SET_ID(CLSID_JScriptAuthor);
INF_SET_ID(CLSID_JScriptEncode);
INF_SET_ID(CATID_ActiveScript);
INF_SET_ID(CATID_ActiveScriptParse);
INF_SET_ID(CATID_ActiveScriptEncode);
INF_SET_ID(CATID_ActiveScriptAuthor);
for(i = 0; i < sizeof(pse)/sizeof(pse[0]); i++) {
pse[i].pszValue = HeapAlloc(GetProcessHeap(), 0, 39);
sprintf(pse[i].pszValue, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
clsids[i]->Data1, clsids[i]->Data2, clsids[i]->Data3, clsids[i]->Data4[0],
clsids[i]->Data4[1], clsids[i]->Data4[2], clsids[i]->Data4[3], clsids[i]->Data4[4],
clsids[i]->Data4[5], clsids[i]->Data4[6], clsids[i]->Data4[7]);
}
strtable.cEntries = sizeof(pse)/sizeof(pse[0]);
strtable.pse = pse;
hAdvpack = LoadLibraryW(advpackW);
pRegInstall = (void *)GetProcAddress(hAdvpack, "RegInstall");
hres = pRegInstall(jscript_hinstance, doregister ? "RegisterDll" : "UnregisterDll", &strtable);
for(i=0; i < sizeof(pse)/sizeof(pse[0]); i++)
HeapFree(GetProcessHeap(), 0, pse[i].pszValue);
return hres;
}
#undef INF_SET_CLSID
/***********************************************************************
* DllRegisterServer (jscript.@)
*/
HRESULT WINAPI DllRegisterServer(void)
{
HRESULT hres;
TRACE("()\n");
hres = __wine_register_resources(jscript_hinstance, NULL);
if(FAILED(hres))
return hres;
return register_inf(TRUE);
return __wine_register_resources(jscript_hinstance, NULL);
}
/***********************************************************************
@ -215,13 +151,6 @@ HRESULT WINAPI DllRegisterServer(void)
*/
HRESULT WINAPI DllUnregisterServer(void)
{
HRESULT hres;
TRACE("()\n");
hres = __wine_unregister_resources(jscript_hinstance, NULL);
if(FAILED(hres))
return hres;
return register_inf(FALSE);
return __wine_unregister_resources(jscript_hinstance, NULL);
}

View File

@ -16,8 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/* @makedep: jscript.inf */
REGINST REGINST jscript.inf
/* @makedep: jscript.rgs */
2 WINE_REGISTRY jscript.rgs
/* @makedep: jsglobal.tlb */
1 TYPELIB jsglobal.tlb