mirror of https://github.com/JakubMelka/PDF4QT.git
Linux installation scripts, some adjustments
This commit is contained in:
parent
91c9315900
commit
df7454580e
|
@ -92,6 +92,8 @@ message("CMAKE_TOOLCHAIN_FILE = " ${CMAKE_TOOLCHAIN_FILE})
|
|||
install(FILES Desktop/Pdf4QtDocDiff.desktop Desktop/Pdf4QtDocPageOrganizer.desktop Desktop/Pdf4QtViewerLite.desktop Desktop/Pdf4QtViewerProfi.desktop DESTINATION usr/share/applications)
|
||||
install(FILES Desktop/Pdf4QtDocDiff.svg Desktop/Pdf4QtDocPageOrganizer.svg Desktop/Pdf4QtViewerLite.svg Desktop/Pdf4QtViewerProfi.svg DESTINATION usr/share/icons)
|
||||
|
||||
configure_file(make-package.sh.in make-package.sh)
|
||||
|
||||
if(PDF4QT_INSTALL_DEPENDENCIES)
|
||||
install(DIRECTORY ${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/bin/
|
||||
TYPE BIN
|
||||
|
|
|
@ -32,7 +32,9 @@
|
|||
#pragma warning(push)
|
||||
#pragma warning(disable:5033)
|
||||
#endif
|
||||
#ifndef CMS_NO_REGISTER_KEYWORD
|
||||
#define CMS_NO_REGISTER_KEYWORD
|
||||
#endif
|
||||
#include <lcms2.h>
|
||||
#include <lcms2_plugin.h>
|
||||
#ifdef PDF4QT_COMPILER_MSVC
|
||||
|
|
|
@ -45,7 +45,9 @@
|
|||
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:5033)
|
||||
#ifndef CMS_NO_REGISTER_KEYWORD
|
||||
#define CMS_NO_REGISTER_KEYWORD
|
||||
#endif
|
||||
#include <lcms2.h>
|
||||
#pragma warning(pop)
|
||||
|
||||
|
|
|
@ -1904,15 +1904,28 @@ void PDFProgramController::updatePageLayoutActions()
|
|||
|
||||
void PDFProgramController::loadPlugins()
|
||||
{
|
||||
QStringList availablePlugins;
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
QDir directory(QApplication::applicationDirPath() + "/pdfplugins");
|
||||
QStringList availablePlugins = directory.entryList(QStringList("*.dll"));
|
||||
availablePlugins = directory.entryList(QStringList("*.dll"));
|
||||
#elif defined(Q_OS_UNIX)
|
||||
#ifndef NDEBUG
|
||||
QDir directory(QApplication::applicationDirPath() + "/../pdfplugins");
|
||||
QStringList availablePlugins = directory.entryList(QStringList("*.so"));
|
||||
availablePlugins = directory.entryList(QStringList("*.so"));
|
||||
#else
|
||||
QDir directory(QApplication::applicationDirPath());
|
||||
if (directory.cdUp() &&
|
||||
directory.cd("lib") &&
|
||||
directory.cd("pdf4qt"))
|
||||
{
|
||||
availablePlugins = directory.entryList(QStringList("*.so"));
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
static_assert(false, "Implement this for another OS!");
|
||||
#endif
|
||||
|
||||
for (const QString& availablePlugin : availablePlugins)
|
||||
{
|
||||
QString pluginFileName = directory.absoluteFilePath(availablePlugin);
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p install/lib/pdf4qt
|
||||
mv -f install/lib/*Plugin.so* install/lib/pdf4qt/
|
||||
|
||||
#mkdir -p install/usr/bin/
|
||||
#mv -f install/bin/* install/usr/bin/
|
||||
|
||||
mkdir -p install/DEBIAN/
|
||||
file="install/DEBIAN/control"
|
||||
|
||||
>$file
|
||||
echo "Package: PDF4QT" >>$file
|
||||
echo "Version: ${PDF4QT_VERSION}" >>$file
|
||||
echo "Section: base" >>$file
|
||||
echo "Priority: optional" >>$file
|
||||
echo "Architecture: amd64" >>$file
|
||||
echo "Depends: libqt6gui6, libqt6xml6, libqt6svg6, libqt6openglwidgets6, libtbb12, libqt6printsupport6, libqt6texttospeech6, qt6-speech-speechd-plugin, qt6-speech-flite-plugin">>$file
|
||||
echo "Maintainer: Jakub Melka" >>$file
|
||||
echo "Description: This software is consisting of PDF rendering library, and several applications, such as advanced document viewer, command line tool, and document page manipulator application. Software is implementing PDF functionality based on PDF Reference 2.0. It is written and maintained by Jakub Melka." >>$file
|
||||
echo "Homepage: https://jakubmelka.github.io/" >>$file
|
||||
echo "Vcs-Browser: https://github.com/JakubMelka/PDF4QT" >>$file
|
||||
|
||||
|
||||
dpkg-deb --build install
|
||||
|
||||
mv install.deb PDF4QT-${PDF4QT_VERSION}.deb
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue