Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Optimization Wix优化_Optimization_Wix_Wix3.10 - Fatal编程技术网

Optimization Wix优化

Optimization Wix优化,optimization,wix,wix3.10,Optimization,Wix,Wix3.10,我正在审阅来自installshield msi文件的dark.exe反编译输出的一些语句 例如,一节: <Directory Id='INSTALLDIR' Name="$(var.BasicProductName)"> ... <Component Id="Comp1" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)"> <CreateFolder Direc

我正在审阅来自installshield msi文件的dark.exe反编译输出的一些语句

例如,一节:

<Directory Id='INSTALLDIR' Name="$(var.BasicProductName)">
    ...
<Component Id="Comp1" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
    <CreateFolder Directory="INSTALLDIR" />
    ...
</Component>
<Component Id="Comp2" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
    <CreateFolder Directory="INSTALLDIR" />
    ...
</Component>
<Directory Id="UHDDRIVER" Name="UHDDriver">
    <Component Id="MyUHD" Guid="xx" SharedDllRefCount="yes" Win64="$(var.Win64)">
        <File Id="MyUHD.inf" Name="MyUHD.inf" KeyPath="yes" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\MyUHD.inf" />
        <File Id="MyUHD_.cat" Name="MyUHD_.cat" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\MyUHD_.cat" />
        <Driver AddRemovePrograms="no" DeleteFiles="yes" Legacy="yes" PlugAndPlayPrompt="no" Sequence="2" xmlns="http://schemas.microsoft.com/wix/DifxAppExtension" />
    </Component>
    <Component Id="UHDDriver_Dir" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
        <CreateFolder Directory="UHDDRIVER" />
    </Component>
    <Directory Id="AMD644" Name="AMD64">
        <Component Id="MyUHD_AMD64" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
            <File Id="MyUHD.sys1" Name="MyUHD.sys" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\AMD64\MyUHD.sys" />
        </Component>
    </Directory>
    <Directory Id="X864" Name="x86">
        <Component Id="MyUHD_x86" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
            <File Id="MyUHD.sys" Name="MyUHD.sys" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\X86\MyUHD.sys" />
        </Component>
    </Directory>
</Directory>
</Directory>
请注意,我删除了组件Id
uhdriver\u Dir
,并在第一个组件中将其替换为
CreateFolder
标记,认为空的
CreateFolder
只会在最后一个已知的
目录
标记上操作-是否正确?我是否可以通过安装/卸载来删除该组件,或者我是否需要为我创建的每个目录定义一个组件和guid


我在这里还缺少其他优化吗?

为什么不用heat而不是手动获取文件?主要是因为已经完成了。此外,这些文件来自多个位置(并不是给定位置中的所有文件都包含在内),因此使用heat进行管理比任何事情都更麻烦。奇怪的是,在其他目录标记中还有其他组件添加文件等,并且没有CreateFolder语句。。。目录标签是否创建了指定的文件夹?我只有一个创建文件夹-在第一个组件的末尾,我添加了它,因为没有它它就无法工作lol,在产生的热量中,我根本没有创建文件夹,但有超过5k行我自己无法创建(很多文件).我在javadocs和示例代码集合中使用了heat。。。带走那些想法。我还发现,包装组件的目录将在安装文件后创建。
<Directory Id='INSTALLDIR' Name="$(var.BasicProductName)">
    ...
<Component Id="Comp1" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
    <CreateFolder />
    ...
</Component>
<Component Id="Comp2" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
    ...
</Component>
<Directory Id="UHDDRIVER" Name="UHDDriver">
    <Component Id="MyUHD" Guid="xx" SharedDllRefCount="yes" Win64="$(var.Win64)">
        <CreateFolder />
        <File Id="MyUHD.inf" Name="MyUHD.inf" KeyPath="yes" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\MyUHD.inf" />
        <File Id="MyUHD_.cat" Name="MyUHD_.cat" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\MyUHD_.cat" />
        <Driver AddRemovePrograms="no" DeleteFiles="yes" Legacy="yes" PlugAndPlayPrompt="no" Sequence="2" xmlns="http://schemas.microsoft.com/wix/DifxAppExtension" />
    </Component>
    <Directory Id="AMD644" Name="AMD64">
        <Component Id="MyUHD_AMD64" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
            <File Id="MyUHD.sys1" Name="MyUHD.sys" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\AMD64\MyUHD.sys" />
        </Component>
    </Directory>
    <Directory Id="X864" Name="x86">
        <Component Id="MyUHD_x86" Guid="xx" KeyPath="yes" SharedDllRefCount="yes" Win64="$(var.Win64)">
            <File Id="MyUHD.sys" Name="MyUHD.sys" Vital="no" DiskId="1" Source="$(var.WIN64BINARIES)\UHDDriver\X86\MyUHD.sys" />
        </Component>
    </Directory>
</Directory>
</Directory>