Skip to content

Commit 3b9b166

Browse files
committed
Add Wix installer
- Copy and update the installer from the netpbm-wic-codec. - Update property_store: use 2 arrays for the property map, one can be static.
1 parent 01b340e commit 3b9b166

31 files changed

+727
-330
lines changed

.editorconfig

+8-11
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,31 @@
1-
# Copyright (c) Team CharLS.
1+
# SPDX-FileCopyrightText: © 2018 Team CharLS
22
# SPDX-License-Identifier: BSD-3-Clause
33

44
root = true
55

66
[*]
7+
charset = utf-8
8+
indent_style = space
9+
trim_trailing_whitespace = true
710

811
# Spell checker configuration
912
spelling_exclusion_path = spelling.dic
1013

11-
[*.{h,cpp}]
14+
[*.{hpp,cpp,ixx}]
1215
end_of_line = crlf
13-
charset = utf-8-bom
14-
trim_trailing_whitespace = true
1516
insert_final_newline = true
16-
indent_style = space
1717
indent_size = 4
1818
cpp_space_pointer_reference_alignment = left
1919

2020
[*.props]
21-
trim_trailing_whitespace = true
22-
indent_style = space
2321
indent_size = 2
2422

2523
[*.{wxs,wxi}]
26-
trim_trailing_whitespace = true
27-
indent_style = space
2824
indent_size = 2
2925

3026
[*.{vcxproj,wixproj}]
31-
trim_trailing_whitespace = true
32-
indent_style = space
3327
indent_size = 2
3428

29+
[*.md]
30+
trim_trailing_whitespace = false # Ending with 2 spaces is used for layout in Markdown
31+
indent_size = 2

CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2024 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
6+
# Changelog
7+
8+
All notable changes to this project will be documented in this file.
9+
10+
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
11+
12+
## [0.3.0 - 2024-12-10]
13+
14+
### Added
15+
16+
- Initial release.

Directory.Build.props

+20-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,20 @@
2323

2424
<!-- WinRT is needed for the COM support, disable generation of Windows Metadata (is slow) -->
2525
<CppWinRTGenerateWindowsMetadata>false</CppWinRTGenerateWindowsMetadata>
26+
27+
<Version>0.3.0</Version>
28+
29+
<!-- Define properties for WIX projects -->
30+
<DefineConstants>FourPartsVersion=$(Version).0;</DefineConstants>
31+
<Pedantic>true</Pedantic>
32+
33+
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio><!-- Enable faster builds for SDK style projects in Visual Studio 2022 17.5 and newer. -->
34+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
35+
36+
<_CertificateThumbprint Condition="'$(_CertificateThumbprint)' != ''">$(CertificateThumbprint)</_CertificateThumbprint>
37+
<_CertificateThumbprint Condition="'$(_CertificateThumbprint)' == ''">b834c6c1d7e0ae8e76cadcf9e2e7a273133a5df6</_CertificateThumbprint>
38+
<_TimestampUrl Condition="'$(_TimestampUrl)' != ''"> $(TimestampUrl)</_TimestampUrl>
39+
<_TimestampUrl Condition="'$(_TimestampUrl)' == ''">http://time.certum.pl/</_TimestampUrl>
2640
</PropertyGroup>
2741

2842
<ItemDefinitionGroup>
@@ -177,14 +191,19 @@
177191
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
178192
<EnablePREfast>true</EnablePREfast> <!-- For release builds, enable the MS static analyzer build into the C++ compiler. -->
179193
<DisableAnalyzeExternal>true</DisableAnalyzeExternal>
194+
<AdditionalOptions>%(AdditionalOptions) /Brepro</AdditionalOptions>
195+
<RuntimeTypeInfo>false</RuntimeTypeInfo>
196+
<UseFullPaths>false</UseFullPaths>
197+
<FunctionLevelLinking>true</FunctionLevelLinking>
198+
<IntrinsicFunctions>true</IntrinsicFunctions>
180199
</ClCompile>
181200
<Link>
182201
<EnableCOMDATFolding>true</EnableCOMDATFolding>
183202
<OptimizeReferences>true</OptimizeReferences>
184203
<LinkIncremental>false</LinkIncremental>
185204

186205
<!-- Store only the filename of the PDB file into the .exe/.dll for deterministic builds. -->
187-
<AdditionalOptions>/PDBALTPATH:%_PDB% %(AdditionalOptions)</AdditionalOptions>
206+
<AdditionalOptions>/PDBALTPATH:%_PDB% /Brepro %(AdditionalOptions)</AdditionalOptions>
188207
</Link>
189208
</ItemDefinitionGroup>
190209
</Project>

Directory.Packages.props

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2024 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
6+
<Project>
7+
<ItemGroup>
8+
<PackageVersion Include="WixToolset.Bal.wixext" Version="5.0.2" />
9+
<PackageVersion Include="WixToolset.Util.wixext" Version="5.0.2" />
10+
</ItemGroup>
11+
</Project>

README.md

+22-18
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,24 @@ This Windows Imaging Component (WIC) codec makes it possible to decode and encod
1515

1616
The Windows Imaging Component (WIC) is a built-in codec framework of Windows that makes it possible to create independent native image codecs that can be used by a large set of applications. WIC is implemented using COM technology. Image codecs for many popular formats are already pre-installed on Windows.
1717

18-
### Status
18+
## Installing
1919

20-
This project is the development phase:
20+
### Requirements
2121

22-
- No installer with pre-built binaries is available, manually building and registering is required.
22+
- Windows 11 or Windows 10 (version 22H2).
23+
- x86, x64 or ARM64 processor
2324

24-
### Supported Operation Systems
25+
### Via GitHub with EXE
2526

26-
The JPEG-LS WIC codec supports the following Windows operating systems:
27+
Go to the [releases](https://github.com/team-charls/jpegls-wic-codec/releases) page and click on
28+
Assets at the bottom to show the files available in the release.
29+
Please use the appropriate installer that matches your machine's architecture.
2730

28-
- Windows 11 and 10 (x86, x64, ARM64)
29-
- Windows Server 2022 and 2019 (x86, x64)
31+
> [!NOTE]
32+
> Microsoft Defender SmartScreen may show a warning about an unrecognised app when running the installer. Click on "More Info" + "Run anyway" to continue the installation.
33+
The installer and the DLL are signed, but Defender SmartScreen requires an EV code signing certificate, which is only available to commercial organisations.
3034

31-
Note: on Windows 10 "N" the Media Feature Pack needs to be installed.
32-
33-
### Applications that can use the JPEG-LS WIC codec
35+
## Applications that can use the JPEG-LS WIC codec
3436

3537
The following application have been validated to work with the JPEG-LS WIC codec:
3638

@@ -41,7 +43,7 @@ The following application have been validated to work with the JPEG-LS WIC codec
4143
- ZackViewer <https://github.com/peirick/ZackViewer>. This viewer can also be used to convert from one image encoding format to another.
4244
- Microsoft Office applications like Word, Excel, PowerPoint. These applications can, when the JPEG-LS codec is installed, import JPEG-LS images in their documents.
4345

44-
#### Windows 10 Microsoft Photos Application not supported
46+
### Windows 10 Microsoft Photos Application not supported
4547

4648
The standard Windows 10 Microsoft Photos application cannot be used at this moment as it is limited to the WIC codecs that are pre-installed on Windows or are provided by Microsoft in the Microsoft Store.
4749
Microsoft currently does not make it possible to create WIC codecs that can be uploaded to the Microsoft Store.
@@ -72,11 +74,11 @@ The following table provides the codec identification information:
7274

7375
The following table lists the GUIDs used to identify the native JPEG-LS codec components:
7476

75-
| Component | Friendly Name | GUID |
76-
|------------------|-----------------------------|--------------------------------------|
77-
| Container Format | id::container_format_jpegls | 52c25458-282d-4ef4-a69f-021bb2984543 |
78-
| Decoder | id::jpegls_decoder | e57dc18b-019c-47f2-8ed0-bf587be4ff1b |
79-
| Encoder | id::jpegls_encoder | 70a823ea-009f-402f-9bda-e9b8f6332d61 |
77+
| Component | GUID |
78+
|------------------|--------------------------------------|
79+
| Container Format | 52c25458-282d-4ef4-a69f-021bb2984543 |
80+
| Decoder | e57dc18b-019c-47f2-8ed0-bf587be4ff1b |
81+
| Encoder | 70a823ea-009f-402f-9bda-e9b8f6332d61 |
8082

8183
The following table lists the pixel formats that can be decoded:
8284

@@ -105,10 +107,12 @@ The following table lists the pixel formats that can be encoded:
105107

106108
Note \*\*: BGR images will be converted and saved as RGB. JPEG-LS provides no support to set a BGR color space in the SPIFF header.
107109

108-
## Build Instructions
110+
## Manual Build Instructions
111+
112+
Remark: to build this reprository Visual Studio 2022 17.12 or newer with the extension HeatWave for VS2022 installed is needed.
109113

110114
1. Clone this repo, use clone --recurse-submodules to ensure the CharLS git submodule is also cloned correctly in your local git repository.
111-
2. Open Visual Studio 2022 17.8.0 or newer and open the jpeg-wic-codec.sln. Batch build all projects.
115+
2. Use Visual Studio open the jpegls-wic-codec.sln. Batch build all projects.
112116
3. Or use a Developer Command Prompt and run MSBuild in the root of the cloned repository.
113117

114118
## Installation

SECURITY.md

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!--
2+
SPDX-FileCopyrightText: © 2024 Team CharLS
3+
SPDX-License-Identifier: BSD-3-Clause
4+
-->
5+
6+
# Security Policy
7+
8+
## Supported Versions
9+
10+
| Version | Supported |
11+
| ------- | ------------------ |
12+
| 0.3.0 | :white_check_mark: |
13+
14+
## Reporting a Vulnerability
15+
16+
Security issues should be reported privately by creating a security advisory on GitHub.
17+
18+
Please do not open a public issue for anything you think might have a security implication.

create-setup.cmd

-10
This file was deleted.

create-signed-builds.cmd

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
:: SPDX-FileCopyrightText: © 2024 Team CharLS
2+
:: SPDX-License-Identifier: BSD-3-Clause
3+
4+
:: Build signed x86
5+
msbuild -t:clean -p:Configuration=Release -p:Platform=Win32
6+
msbuild -t:restore -p:Configuration=Release -p:Platform=Win32
7+
msbuild -t:build -p:Configuration=Release -p:Platform=Win32 -p:CHARLS_DETERMINISTIC_BUILD=true -p:SignOutput=true -p:CertificateThumbprint=%1 -p:TimestampUrl=%2
8+
9+
:: Build signed x64
10+
msbuild -t:clean -p:Configuration=Release -p:Platform=x64
11+
msbuild -t:restore -p:Configuration=Release -p:Platform=x64
12+
msbuild -t:build -p:Configuration=Release -p:Platform=x64 -p:CHARLS_DETERMINISTIC_BUILD=true -p:SignOutput=true -p:CertificateThumbprint=%1 -p:TimestampUrl=%2
13+
14+
:: Build signed ARM64
15+
msbuild -t:clean -p:Configuration=Release -p:Platform=ARM64
16+
msbuild -t:restore -p:Configuration=Release -p:Platform=ARM64
17+
msbuild -t:build -p:Configuration=Release -p:Platform=ARM64 -p:CHARLS_DETERMINISTIC_BUILD=true -p:SignOutput=true -p:CertificateThumbprint=%1 -p:TimestampUrl=%2
18+

global.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"msbuild-sdks": {
3+
"WixToolset.Sdk": "5.0.2"
4+
}
5+
}

jpegls-wic-codec.sln

+42
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2525
EndProject
2626
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "std-header-units", "std-header-units\std-header-units.vcxproj", "{154AD843-E510-4271-A1DC-8EB291482C38}"
2727
EndProject
28+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shell-change-notify-custom-action", "setup\shell-change-notify-custom-action\shell-change-notify-custom-action.vcxproj", "{F2617BE9-5342-498B-BCCA-0174192F010F}"
29+
EndProject
30+
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "installer", "setup\installer\installer.wixproj", "{502A73A3-BE4C-4206-9422-8FC10F3E0950}"
31+
EndProject
32+
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "bootstrapper", "setup\bootstrapper\bootstrapper.wixproj", "{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}"
33+
EndProject
2834
Global
2935
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3036
Debug|ARM64 = Debug|ARM64
@@ -83,6 +89,42 @@ Global
8389
{154AD843-E510-4271-A1DC-8EB291482C38}.Release|Win32.Build.0 = Release|Win32
8490
{154AD843-E510-4271-A1DC-8EB291482C38}.Release|x64.ActiveCfg = Release|x64
8591
{154AD843-E510-4271-A1DC-8EB291482C38}.Release|x64.Build.0 = Release|x64
92+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Debug|ARM64.ActiveCfg = Debug|ARM64
93+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Debug|ARM64.Build.0 = Debug|ARM64
94+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Debug|Win32.ActiveCfg = Debug|Win32
95+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Debug|Win32.Build.0 = Debug|Win32
96+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Debug|x64.ActiveCfg = Debug|x64
97+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Debug|x64.Build.0 = Debug|x64
98+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Release|ARM64.ActiveCfg = Release|ARM64
99+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Release|ARM64.Build.0 = Release|ARM64
100+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Release|Win32.ActiveCfg = Release|Win32
101+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Release|Win32.Build.0 = Release|Win32
102+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Release|x64.ActiveCfg = Release|x64
103+
{F2617BE9-5342-498B-BCCA-0174192F010F}.Release|x64.Build.0 = Release|x64
104+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Debug|ARM64.ActiveCfg = Debug|ARM64
105+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Debug|ARM64.Build.0 = Debug|ARM64
106+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Debug|Win32.ActiveCfg = Debug|x86
107+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Debug|Win32.Build.0 = Debug|x86
108+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Debug|x64.ActiveCfg = Debug|x64
109+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Debug|x64.Build.0 = Debug|x64
110+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Release|ARM64.ActiveCfg = Release|ARM64
111+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Release|ARM64.Build.0 = Release|ARM64
112+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Release|Win32.ActiveCfg = Release|x86
113+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Release|Win32.Build.0 = Release|x86
114+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Release|x64.ActiveCfg = Release|x64
115+
{502A73A3-BE4C-4206-9422-8FC10F3E0950}.Release|x64.Build.0 = Release|x64
116+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Debug|ARM64.ActiveCfg = Debug|ARM64
117+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Debug|ARM64.Build.0 = Debug|ARM64
118+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Debug|Win32.ActiveCfg = Debug|x86
119+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Debug|Win32.Build.0 = Debug|x86
120+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Debug|x64.ActiveCfg = Debug|x64
121+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Debug|x64.Build.0 = Debug|x64
122+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Release|ARM64.ActiveCfg = Release|ARM64
123+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Release|ARM64.Build.0 = Release|ARM64
124+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Release|Win32.ActiveCfg = Release|x86
125+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Release|Win32.Build.0 = Release|x86
126+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Release|x64.ActiveCfg = Release|x64
127+
{E0CA09B4-C157-47C9-8DAD-048D3C24B7F3}.Release|x64.Build.0 = Release|x64
86128
EndGlobalSection
87129
GlobalSection(SolutionProperties) = preSolution
88130
HideSolutionNode = FALSE

jpegls-wic-codec.sln.DotSettings

+4
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@
2525
<s:Boolean x:Key="/Default/UserDictionary/Words/=ARPNOMODIFY/@EntryIndexedValue">True</s:Boolean>
2626
<s:Boolean x:Key="/Default/UserDictionary/Words/=ARPNOREPAIR/@EntryIndexedValue">True</s:Boolean>
2727
<s:Boolean x:Key="/Default/UserDictionary/Words/=bugprone/@EntryIndexedValue">True</s:Boolean>
28+
<s:Boolean x:Key="/Default/UserDictionary/Words/=BUILDARCH/@EntryIndexedValue">True</s:Boolean>
2829
<s:Boolean x:Key="/Default/UserDictionary/Words/=CATID/@EntryIndexedValue">True</s:Boolean>
2930
<s:Boolean x:Key="/Default/UserDictionary/Words/=charls/@EntryIndexedValue">True</s:Boolean>
3031
<s:Boolean x:Key="/Default/UserDictionary/Words/=CLSID/@EntryIndexedValue">True</s:Boolean>
3132
<s:Boolean x:Key="/Default/UserDictionary/Words/=commited/@EntryIndexedValue">True</s:Boolean>
3233
<s:Boolean x:Key="/Default/UserDictionary/Words/=cppcoreguidelines/@EntryIndexedValue">True</s:Boolean>
3334
<s:Boolean x:Key="/Default/UserDictionary/Words/=endian/@EntryIndexedValue">True</s:Boolean>
3435
<s:Boolean x:Key="/Default/UserDictionary/Words/=errc/@EntryIndexedValue">True</s:Boolean>
36+
<s:Boolean x:Key="/Default/UserDictionary/Words/=ffff/@EntryIndexedValue">True</s:Boolean>
3537
<s:Boolean x:Key="/Default/UserDictionary/Words/=ffffff/@EntryIndexedValue">True</s:Boolean>
3638
<s:Boolean x:Key="/Default/UserDictionary/Words/=fmtlib/@EntryIndexedValue">True</s:Boolean>
3739
<s:Boolean x:Key="/Default/UserDictionary/Words/=HKCR/@EntryIndexedValue">True</s:Boolean>
@@ -47,12 +49,14 @@
4749
<s:Boolean x:Key="/Default/UserDictionary/Words/=Lossless/@EntryIndexedValue">True</s:Boolean>
4850
<s:Boolean x:Key="/Default/UserDictionary/Words/=MIDLRT/@EntryIndexedValue">True</s:Boolean>
4951
<s:Boolean x:Key="/Default/UserDictionary/Words/=Multiframe/@EntryIndexedValue">True</s:Boolean>
52+
<s:Boolean x:Key="/Default/UserDictionary/Words/=norestart/@EntryIndexedValue">True</s:Boolean>
5053
<s:Boolean x:Key="/Default/UserDictionary/Words/=subsampled/@EntryIndexedValue">True</s:Boolean>
5154
<s:Boolean x:Key="/Default/UserDictionary/Words/=TARGETDIR/@EntryIndexedValue">True</s:Boolean>
5255
<s:Boolean x:Key="/Default/UserDictionary/Words/=Undefine/@EntryIndexedValue">True</s:Boolean>
5356
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unregister/@EntryIndexedValue">True</s:Boolean>
5457
<s:Boolean x:Key="/Default/UserDictionary/Words/=UNSUPPRESS/@EntryIndexedValue">True</s:Boolean>
5558
<s:Boolean x:Key="/Default/UserDictionary/Words/=VCINSTALLDIR/@EntryIndexedValue">True</s:Boolean>
59+
<s:Boolean x:Key="/Default/UserDictionary/Words/=VCRUNTIME/@EntryIndexedValue">True</s:Boolean>
5660
<s:Boolean x:Key="/Default/UserDictionary/Words/=VRES/@EntryIndexedValue">True</s:Boolean>
5761
<s:Boolean x:Key="/Default/UserDictionary/Words/=WINCODEC/@EntryIndexedValue">True</s:Boolean>
5862
<s:Boolean x:Key="/Default/UserDictionary/Words/=WRONGSTATE/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

0 commit comments

Comments
 (0)