Platform identification in WiX 3.0

前端 未结 3 977
孤城傲影
孤城傲影 2021-01-02 00:12

I am facing issues when migrating the managed code from x86 to x64 platform. I have a WiX project to create an MSI which will be executed through Bootstrapper.

On an

3条回答
  •  暖寄归人
    2021-01-02 00:20

    I don't believe you will be able to have a single MSI that will support both platforms. You will need to create one for x86 and another x64 - the good news is that you don't need to maintain another WiX project to achieve this.

    The way I've done this in the past is to have the following at the beginning of your product definition.

    
    
    
        
          
          
        
          
          
        
    
        
    
            
    
            
    
        
    
    

    I forget where I got the advice to use a different ProductID for each platform.

    I created the 'win64Flag' variable to get other WiX elements to work nicely in the cross-platform scenarios. As an example, here's how you use it to make a single RegistrySearch definition work for both platforms and should resolve the issue you are having with locating the 12-hive hierarchy.

    
        
    
    

    With all this in place, then it is just a case of passing the relevant value for the 'Platform' pre-processor variable on the Candle command-line, or selecting the target platform in Visual Studio.

提交回复
热议问题