开发者

Wix Bind Substring or Split

开发者 https://www.devze.com 2023-04-08 15:44 出处:网络
I\'m trying to get a Wix installer written that does some TypeLib registration. I\'m already pulling the FileVersion off a registered file elsewhere using

I'm trying to get a Wix installer written that does some TypeLib registration.

I'm already pulling the FileVersion off a registered file elsewhere using

!(bind.FileVersion.#InteropDll)

but I want to do the same thing for the TypeLib, which only has separate MajorVersion and MinorVersion attributes. Ideally, I'd like to do

<TypeLib ... 
    MajorVersion="!(bind.FileVersion.InteropDll).Split('.')[0]" 
    MinorVersion="!(bind.FileVersion.InteropDll).Split('开发者_如何学JAVA.')[1]">

How can I accomplish this (or the like)? ...Or should I just not bother with all this and invoke regasm on the dll file at install time?

Thanks.


The WiX toolset doesn't support doing that today. It's an interesting feature request. I would never call regasm during an install. It's way to hard to get rollback and patching and all that working correctly by shelling out to an external executable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号