Issue #189: Create MSIX package

This commit is contained in:
Jakub Melka 2024-06-29 14:20:35 +02:00
parent b6fda40128
commit 9e0c889a9b
13 changed files with 133 additions and 23 deletions

61
AppxManifest.xml.in Normal file
View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="io.github.JakubMelka.PDF4QT" Publisher="CN=JakubMelka" Version="${PDF4QT_VERSION}.0" />
<Properties>
<DisplayName>PDF4QT</DisplayName>
<PublisherDisplayName>Jakub Melka</PublisherDisplayName>
<Logo>assets\logo.png</Logo>
<Description>Discover the power and versatility of PDF4QTs suite of applications. These tools are designed to transform the way you interact with PDF documents, offering a comprehensive set of features for viewing, editing, manipulating, and comparing PDFs.</Description>
</Properties>
<Resources>
<Resource Language="en-us" />
</Resources>
<Applications>
<Application Id="Pdf4QtEditor" Executable="Pdf4QtEditor.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT Editor"
Description="This program enhances PDF interactions with encryption, document reading, digital signatures, annotation editing, regex text search, PDF editing, page-to-image conversion, and plugins."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.png">
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.fileTypeAssociation">
<uap:FileTypeAssociation Name=".pdf">
<uap:SupportedFileTypes>
<uap:FileType>.pdf</uap:FileType>
</uap:SupportedFileTypes>
<uap:Logo>assets\logo.png</uap:Logo>
</uap:FileTypeAssociation>
</uap:Extension>
</Extensions>
</Application>
<Application Id="Pdf4QtViewer" Executable="Pdf4QtViewer.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT Viewer"
Description="Simplify your viewing experience. This lightweight viewer offers essential viewing functions in a clean, user-friendly interface."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.png">
</uap:VisualElements>
</Application>
<Application Id="Pdf4QtPageMaster" Executable="Pdf4QtPageMaster.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT PageMaster"
Description="Take control of your documents. Manage whole documents or individual pages with ease. Merge documents into a single file, or split them into multiple ones. You can also move, clone, or add pages with a few clicks, all within an intuitive user interface."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.png">
</uap:VisualElements>
</Application>
<Application Id="Pdf4QtDiff" Executable="Pdf4QtDiff.exe" EntryPoint="windows.fullTrustApplication">
<uap:VisualElements DisplayName="PDF4QT PageMaster"
Description="Spot differences effortlessly. This tool allows users to open two documents and receive a detailed list of differences. View these differences in a page-to-page window where they are clearly marked."
BackgroundColor="transparent"
Square150x150Logo="assets\150x150\io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.png"
Square44x44Logo="assets\44x44\io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.png">
</uap:VisualElements>
</Application>
</Applications>
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19045.0" />
</Dependencies>
</Package>

View File

@ -17,7 +17,7 @@
cmake_minimum_required(VERSION 3.16) cmake_minimum_required(VERSION 3.16)
set(PDF4QT_VERSION 1.3.7) set(PDF4QT_VERSION 1.4.0)
message(STATUS "Build type - CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") message(STATUS "Build type - CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
project(PDF4QT VERSION ${PDF4QT_VERSION} LANGUAGES CXX) project(PDF4QT VERSION ${PDF4QT_VERSION} LANGUAGES CXX)
@ -144,27 +144,44 @@ message("CMAKE_PREFIX_PATH = " ${CMAKE_PREFIX_PATH})
message("CMAKE_TOOLCHAIN_FILE = " ${CMAKE_TOOLCHAIN_FILE}) message("CMAKE_TOOLCHAIN_FILE = " ${CMAKE_TOOLCHAIN_FILE})
if(NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY) if(NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
install(FILES Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.desktop if(WIN32)
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.desktop install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Desktop/44x44/
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.desktop RUNTIME DESTINATION ${PDF4QT_INSTALL_BIN_DIR}/assets/44x44
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.desktop FILES_MATCHING
Desktop/io.github.JakubMelka.Pdf4qt.desktop PATTERN *.png)
DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/applications)
install(FILES Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.svg install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Desktop/150x150/
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.svg RUNTIME DESTINATION ${PDF4QT_INSTALL_BIN_DIR}/assets/150x150
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.svg FILES_MATCHING
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.svg PATTERN *.png)
Desktop/io.github.JakubMelka.Pdf4qt.svg
DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/icons/hicolor/scalable/apps) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/AppxManifest.xml.in ${CMAKE_CURRENT_BINARY_DIR}/AppxManifest.xml)
install(FILES Desktop/io.github.JakubMelka.Pdf4qt.appdata.xml DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/metainfo) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/AppxManifest.xml DESTINATION ${PDF4QT_INSTALL_BIN_DIR})
install(FILES Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.png install(FILES assets/logo.png DESTINATION ${PDF4QT_INSTALL_BIN_DIR}/assets)
Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.png else()
Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.png configure_file(make-package.sh.in make-package.sh)
Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.png
Desktop/128x128/io.github.JakubMelka.Pdf4qt.png install(FILES Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.desktop
DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/icons/hicolor/128x128/apps) Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.desktop
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.desktop
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.desktop
Desktop/io.github.JakubMelka.Pdf4qt.desktop
DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/applications)
install(FILES Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.svg
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.svg
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.svg
Desktop/io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.svg
Desktop/io.github.JakubMelka.Pdf4qt.svg
DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/icons/hicolor/scalable/apps)
install(FILES Desktop/io.github.JakubMelka.Pdf4qt.appdata.xml DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/metainfo)
install(FILES Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtDiff.png
Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtPageMaster.png
Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtViewer.png
Desktop/128x128/io.github.JakubMelka.Pdf4qt.Pdf4QtEditor.png
Desktop/128x128/io.github.JakubMelka.Pdf4qt.png
DESTINATION ${PDF4QT_INSTALL_SHARE_DIR}/icons/hicolor/128x128/apps)
endif()
configure_file(make-package.sh.in make-package.sh)
endif() endif()
if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY) if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
@ -186,6 +203,7 @@ if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
FILES_MATCHING FILES_MATCHING
REGEX "(Qt6Core|Qt6Gui|Qt6PrintSupport|Qt6Svg|Qt6TextToSpeech|Qt6Widgets|Qt6Xml|Qt6Multimedia|Qt6Network)\\..*" REGEX "(Qt6Core|Qt6Gui|Qt6PrintSupport|Qt6Svg|Qt6TextToSpeech|Qt6Widgets|Qt6Xml|Qt6Multimedia|Qt6Network)\\..*"
PATTERN "Debug" EXCLUDE PATTERN "Debug" EXCLUDE
PATTERN "*.pdb" EXCLUDE
) )
install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/platforms/ install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/platforms/
@ -194,12 +212,14 @@ if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
PATTERN "qwindows.dll" PATTERN "qwindows.dll"
PATTERN "*.so" PATTERN "*.so"
PATTERN "*.dylib" PATTERN "*.dylib"
PATTERN "*.pdb" EXCLUDE
) )
install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/iconengines/ install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/iconengines/
RUNTIME DESTINATION ${PDF4QT_INSTALL_LIB_DIR}/iconengines/ RUNTIME DESTINATION ${PDF4QT_INSTALL_LIB_DIR}/iconengines/
FILES_MATCHING FILES_MATCHING
REGEX "qsvgicon\\..*" REGEX "qsvgicon\\..*"
PATTERN "*.pdb" EXCLUDE
) )
install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/imageformats/ install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/imageformats/
@ -209,6 +229,7 @@ if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
PATTERN "*.so" PATTERN "*.so"
PATTERN "*.dylib" PATTERN "*.dylib"
REGEX "d\\..*" EXCLUDE REGEX "d\\..*" EXCLUDE
PATTERN "*.pdb" EXCLUDE
) )
install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/styles/ install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/styles/
@ -218,6 +239,7 @@ if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
PATTERN "*.so" PATTERN "*.so"
PATTERN "*.dylib" PATTERN "*.dylib"
REGEX "d\\..*" EXCLUDE REGEX "d\\..*" EXCLUDE
PATTERN "*.pdb" EXCLUDE
) )
install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/texttospeech/ install(DIRECTORY ${PDF4QT_QT_ROOT}/plugins/texttospeech/
@ -227,6 +249,7 @@ if(PDF4QT_INSTALL_DEPENDENCIES AND NOT PDF4QT_BUILD_ONLY_CORE_LIBRARY)
PATTERN "*.so" PATTERN "*.so"
PATTERN "*.dylib" PATTERN "*.dylib"
REGEX "d\\..*" EXCLUDE REGEX "d\\..*" EXCLUDE
PATTERN "*.pdb" EXCLUDE
) )
endif() endif()

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -652,8 +652,11 @@ void MainWindow::setViewDocument(pdf::PDFDocument* document, bool updateCustomPa
{ {
if (document != m_pdfWidget->getDrawWidgetProxy()->getDocument()) if (document != m_pdfWidget->getDrawWidgetProxy()->getDocument())
{ {
m_optionalContentActivity->deleteLater(); if (m_optionalContentActivity)
m_optionalContentActivity = nullptr; {
m_optionalContentActivity->deleteLater();
m_optionalContentActivity = nullptr;
}
if (document) if (document)
{ {

BIN
assets/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

23
assets/logo.svg Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="127.5px" height="106.974px" viewBox="0 0 127.5 106.974" enable-background="new 0 0 127.5 106.974" xml:space="preserve">
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C53620" d="M99.071,34.455V0H55.248v56.362h-8.969
c-3.525,0-3.525,6.206,0,6.206h10.621c1.922,0,2.859,1.518,2.902,3.033c0.087,1.565-0.937,3.168-2.902,3.168H31.374
c-3.569,0-3.569,6.207,0,6.207h15.262c3.971,0,3.971,6.201,0,6.201h-27.49c-3.883,0-3.883,6.202,0,6.202h34.32
c1.203,0.043,2.009,0.671,2.454,1.516c0.671,1.294,0.444,3.038-0.671,4.019c-0.445,0.4-1.025,0.623-1.783,0.672h-16.6
c-3.975,0-3.975,6.202,0,6.202h18.383v7.186H127.5V34.455H99.071z M91.397,90.949c-11.157,0-20.217-9.105-20.217-20.262
s9.06-20.256,20.217-20.256c3.569,0,6.873,1.024,9.771,2.633l-2.541,2.989c-2.188-1.072-4.598-1.743-7.23-1.743
c-9.018,0-16.377,7.322-16.377,16.377c0,9.017,7.36,16.426,16.377,16.426c9.06,0,16.42-7.409,16.42-16.426
c0-2.454-0.623-4.729-1.603-6.825L91.083,81.578l-11.2-9.417l3.168-3.478l7.543,6.293l12.896-15.311l2.497-2.945
c3.482,3.617,5.67,8.524,5.67,13.967C111.657,81.844,102.554,90.949,91.397,90.949z"/>
<g>
<path fill-rule="evenodd" clip-rule="evenodd" fill="#C53620" d="M38.342,56.358h-8.255c-4.148,0-4.148,6.206,0,6.206h8.255
C42.447,62.564,42.447,56.358,38.342,56.358z M21.791,68.762H2.771c-3.695,0-3.695,6.205,0,6.205h19.019
C25.939,74.967,25.939,68.762,21.791,68.762z"/>
</g>
<polygon fill-rule="evenodd" clip-rule="evenodd" fill="#6CBE45" points="102.763,0.018 102.763,30.76 127.5,30.76 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB