Deploying extensions with references |
If your extension has references to another file (e.g. a library with common functions), then you must deploy this file along with the extension DLL. You can edit support files to add dependent component in the CAB file.
To deploy an extension that has references to another file:
<?xml version="1.0" encoding="utf-8" ?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <?include Confix.wxi ?> <Fragment> <DirectoryRef Id="INSTALLLOCATION"> <!-- Define components to include into the installation package. --> <Component Id="FileName.dll" Guid="PUT-GUID-HERE"> <File Id="FileName.dll" Source="FileName.dll" Assembly=".net" AssemblyApplication="FileName.dll" AssemblyManifest="FileName.dll" KeyPath="yes"/> </Component> </DirectoryRef> <ComponentGroup Id="CustomComponents"> <ComponentRef Id="FileName.dll"/> </ComponentGroup> </Fragment> </Wix>
@echo on SET TARGETDIR=%1 rem *** Strip leading and trailing double quotes. SET TARGETDIR=%TARGETDIR:"=% SET SUPPORTDIR=%TARGETDIR%Package\Support\ pushd %~dp0 rem *** Prepare to build CAB: create support files to customize. "%BCMNETSDK%\Deployment\Extension\PackageBuilder.exe" "%TARGETDIR%ExtensionFileName.dll" -nobuild if not %ERRORLEVEL%==0 goto exit rem *** Copy the customized WIX file. xcopy /y "CustomComponents.wxs" "%SUPPORTDIR%" if not %ERRORLEVEL%==0 goto exit rem *** Copy dependencies. xcopy /y "%TARGETDIR%*.dll" "%SUPPORTDIR%" if not %ERRORLEVEL%==0 goto exit popd rem *** Build CAB. call "%SUPPORTDIR%Build.bat" :exit if not %ERRORLEVEL%==0 EXIT %ERRORLEVEL%
call "$(ProjectDir)BuildCab.bat" "$(TargetDir)"