summaryrefslogtreecommitdiffstats
path: root/Tools/msi/common.wxs
diff options
context:
space:
mode:
Diffstat (limited to 'Tools/msi/common.wxs')
-rw-r--r--Tools/msi/common.wxs16
1 files changed, 14 insertions, 2 deletions
diff --git a/Tools/msi/common.wxs b/Tools/msi/common.wxs
index 398d94a..d8f3cde 100644
--- a/Tools/msi/common.wxs
+++ b/Tools/msi/common.wxs
@@ -53,11 +53,23 @@
</Fragment>
<Fragment>
- <?ifdef InstallDirectoryGuidSeed ?>
<Directory Id="TARGETDIR" Name="SourceDir">
+ <?ifdef InstallDirectoryGuidSeed ?>
<Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
+ <?endif ?>
</Directory>
- <?endif ?>
+ </Fragment>
+
+ <Fragment>
+ <!-- Locate TARGETDIR automatically assuming we have executables installed -->
+ <Property Id="TARGETDIR">
+ <ComponentSearch Id="PythonExe_Directory" Guid="$(var.PythonExeComponentGuid)">
+ <DirectorySearch Id="PythonExe_Directory" AssignToProperty="yes" Path=".">
+ <FileSearch Id="PythonExe_DirectoryFile" Name="python.exe" />
+ </DirectorySearch>
+ </ComponentSearch>
+ </Property>
+ <Property Id="DetectTargetDir" Value="1" />
</Fragment>
<!-- Top-level directories -->