Skip to content

Commit

Permalink
refactored the variables definition slightly, added LibRaw to installer
Browse files Browse the repository at this point in the history
  • Loading branch information
sylikc committed Oct 7, 2023
1 parent 389821a commit 5018819
Showing 1 changed file with 31 additions and 9 deletions.
40 changes: 31 additions & 9 deletions src/JPEGView.Setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,25 @@
<!-- 32-bit / 64-bit variables -->
<?if $(var.Platform) = x64 ?>
<?define Win64 = "yes" ?>
<?define DllBinFolder = "bin64" ?>

<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?define JPEGViewExeSourcePath = "$(var.JPEGView.ProjectDir)\x64\Release\JPEGView.exe" ?>
<?define JxlDllFolder = "$(var.JPEGView.ProjectDir)\libjxl\bin64" ?>
<?define HeifDllFolder = "$(var.JPEGView.ProjectDir)\libheif\bin64" ?>
<?define AvifDllFolder = "$(var.JPEGView.ProjectDir)\libavif\bin64" ?>
<?define LcmsDllFolder = "$(var.JPEGView.ProjectDir)\lcms2\bin64" ?>
<?else ?>
<?define Win64 = "no" ?>
<?define DllBinFolder = "bin" ?>

<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?define JPEGViewExeSourcePath = "$(var.JPEGView.ProjectDir)\x86\Release\JPEGView.exe" ?>
<?define JxlDllFolder = "$(var.JPEGView.ProjectDir)\libjxl\bin" ?>
<?define HeifDllFolder = "$(var.JPEGView.ProjectDir)\libheif\bin" ?>
<?define AvifDllFolder = "$(var.JPEGView.ProjectDir)\libavif\bin" ?>
<?define LcmsDllFolder = "$(var.JPEGView.ProjectDir)\lcms2\bin" ?>
<?endif ?>

<!-- the bin/bin64 folders are consistently named/used in the source, so it's a predictable pattern -->
<?define JxlDllFolder = "$(var.JPEGView.ProjectDir)\libjxl\$(var.DllBinFolder)" ?>
<?define HeifDllFolder = "$(var.JPEGView.ProjectDir)\libheif\$(var.DllBinFolder)" ?>
<?define AvifDllFolder = "$(var.JPEGView.ProjectDir)\libavif\$(var.DllBinFolder)" ?>
<?define LcmsDllFolder = "$(var.JPEGView.ProjectDir)\lcms2\$(var.DllBinFolder)" ?>
<?define RawDllFolder = "$(var.JPEGView.ProjectDir)\libraw\$(var.DllBinFolder)" ?>

<!--
====================================================================================
Package start
Expand Down Expand Up @@ -196,11 +199,18 @@

<Feature Id="ProductFeature" Title="JPEGView" Level="1" Display="expand">
<!-- <ComponentGroupRef Id="ProductComponents" /> -->
<!-- required JPEGView main component -->
<Feature Id="JPEGViewMain" Title="JPEGView" Absent="disallow">
<ComponentRef Id="APPLICATIONFOLDER_comp"/>
<ComponentRef Id="JPEGViewExe"/>
<ComponentRef Id="NavPanel.png"/>
</Feature>

<!-- "optional" DLLs which add support for dynamically linked formats -->
<!-- while JPEGView runs fine without the DLLs,
it has code which assumes these DLLs exist,
so strange behaviors may occur if they're not installed
-->
<Feature Id="FeatureJXL" Title="JPEG XL Support">
<ComponentRef Id="brotlicommonDLL"/>
<ComponentRef Id="brotlidecDLL"/>
Expand All @@ -213,13 +223,19 @@
<ComponentRef Id="heifDLL"/>
<ComponentRef Id="avifDLL"/>
</Feature>
<!-- dcraw is compiled into JPEGView, but doesn't support the latest (newer) camera formats -->
<Feature Id="FeatureRAW" Title="Camera RAW Files Support (newer cameras)">
<ComponentRef Id="rawDLL"/>
</Feature>
<Feature Id="FeatureLCMS" Title="ICC Profile Support (WebP, JPEG XL, HEIF/HEIC/AVIF)">
<ComponentRef Id="lcmsDLL"/>
</Feature>

<Feature Id="FeatureWIC" Title="WIC Support">
<ComponentRef Id="WICLoaderDLL"/>
</Feature>

<!-- config files which are required to operate -->
<Feature Id="ConfigFiles" Title="Config Files" Absent="disallow">
<ComponentRef Id="JPEGView.ini"/>
<ComponentRef Id="JPEGView.ini.tpl"/>
Expand Down Expand Up @@ -499,12 +515,18 @@
</Component>


<!-- DLLs required for ICC Profile support (WebP, JXL, HEIF/HEIC/AVIF) -->
<!-- DLL required for ICC Profile support (WebP, JXL, HEIF/HEIC/AVIF) -->
<Component Id="lcmsDLL" Guid="2a7a5f9a-4100-4eee-8706-a6b9a2a8cf5c">
<File Id="lcms2.dll" Name="lcms2.dll" Source="$(var.LcmsDllFolder)\lcms2.dll" />
</Component>


<!-- DLL required for RAW Files support (newer cameras using LibRaw) -->
<Component Id="rawDLL" Guid="e469088b-ab00-43cd-a5eb-57f09a6cc3b2">
<File Id="libraw.dll" Name="libraw.dll" Source="$(var.RawDllFolder)\libraw.dll" />
</Component>


<!-- DLL required for WIC support -->
<Component Id="WICLoaderDLL" Guid="742ca948-b7d3-4ca4-9aab-2592616416ed">
<File Id="WICLoader.dll" Name="WICLoader.dll" Source="$(var.WICLoader.TargetDir)WICLoader.dll" />
Expand Down

0 comments on commit 5018819

Please sign in to comment.