Author: hpoussin
Date: Sat Sep 2 12:16:09 2006
New Revision: 23884
URL:
http://svn.reactos.org/svn/reactos?rev=23884&view=rev
Log:
Add the autoregister command in rbuild file if needed
Modified:
trunk/tools/wineimport.cmd
Modified: trunk/tools/wineimport.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/wineimport.cmd?rev=23884&…
==============================================================================
--- trunk/tools/wineimport.cmd (original)
+++ trunk/tools/wineimport.cmd Sat Sep 2 12:16:09 2006
@@ -70,9 +70,27 @@
)
)
+SET WINE_HAS_DLLINSTALL=0
+SET WINE_HAS_DLLREGISTERSERVER=0
+FOR /F "usebackq tokens=3,4 delims= " %%l IN ("wine\dlls\%2\%2.spec")
DO (
+ IF NOT "%%l" == "" CALL :internal_analysespec %%l
+ IF NOT "%%m" == "" CALL :internal_analysespec %%m
+)
+
NUL COPY /Y wine\dlls\%2\makefile.in %WINE_TMPFILE1%
ECHO ^<module name="%2" type="win32dll"
baseaddress="${BASEADDRESS_!WINE_UPPERCASE!}" installbase="system32"
installname="%2.dll" allowwarnings="true"^>
+IF "%WINE_HAS_DLLINSTALL%" == "1" (
+ IF "%WINE_HAS_DLLREGISTERSERVER%" == "1" (
+ ECHO ^<autoregister infsection="OleControlDlls" type="Both"
/^>
+ ) ELSE (
+ ECHO ^<autoregister infsection="OleControlDlls"
type="DllInstall" /^>
+ )
+) ELSE (
+ IF "%WINE_HAS_DLLREGISTERSERVER%" == "1" (
+ ECHO ^<autoregister infsection="OleControlDlls"
type="DllRegisterServer" /^>
+ )
+)
ECHO ^<importlibrary definition="%2.spec.def" /^>
ECHO ^<include base="%2"^>.^</include^>
ECHO ^<include base="ReactOS"^>include/reactos/wine^</include^>
@@ -280,3 +298,9 @@
) ELSE (
SET WINE_FULL_LINE=!WINE_FULL_LINE!!WINE_LINE!
)
+GOTO :eof
+
+:internal_analysespec
+SET WINE_LINE=%*
+IF "%WINE_LINE:~0,10%" == "DllInstall" SET WINE_HAS_DLLINSTALL=1
+IF "%WINE_LINE:~0,17%" == "DllRegisterServer" SET
WINE_HAS_DLLREGISTERSERVER=1