mirror of
				https://github.com/JakubMelka/PDF4QT.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	Installer
This commit is contained in:
		| @@ -24,6 +24,7 @@ namespace pdf | |||||||
|  |  | ||||||
| // Name of the library, together with version | // Name of the library, together with version | ||||||
| static constexpr const char* PDF_LIBRARY_NAME = "Pdf4Qt 1.0.0"; | static constexpr const char* PDF_LIBRARY_NAME = "Pdf4Qt 1.0.0"; | ||||||
|  | static constexpr const char* PDF_LIBRARY_VERSION = "1.0.0"; | ||||||
|  |  | ||||||
| // Structure file constants | // Structure file constants | ||||||
| static constexpr const char* PDF_END_OF_FILE_MARK = "%%EOF"; | static constexpr const char* PDF_END_OF_FILE_MARK = "%%EOF"; | ||||||
|   | |||||||
| @@ -96,3 +96,4 @@ INSTALLS += plugins | |||||||
| RESOURCES += \ | RESOURCES += \ | ||||||
|     pdf4qtviewer.qrc |     pdf4qtviewer.qrc | ||||||
|  |  | ||||||
|  | DEFINES += QT_INSTALL_DIRECTORY=\"\\\"$$[QT_INSTALL_BINS]\\\"\" | ||||||
|   | |||||||
| @@ -57,5 +57,6 @@ | |||||||
|         <file>resources/squiggly.svg</file> |         <file>resources/squiggly.svg</file> | ||||||
|         <file>resources/strikeout.svg</file> |         <file>resources/strikeout.svg</file> | ||||||
|         <file>resources/underline.svg</file> |         <file>resources/underline.svg</file> | ||||||
|  |         <file>../LICENSE.txt</file> | ||||||
|     </qresource> |     </qresource> | ||||||
| </RCC> | </RCC> | ||||||
|   | |||||||
| @@ -23,6 +23,7 @@ | |||||||
| #include "pdfadvancedtools.h" | #include "pdfadvancedtools.h" | ||||||
| #include "pdfdrawspacecontroller.h" | #include "pdfdrawspacecontroller.h" | ||||||
| #include "pdfwidgetutils.h" | #include "pdfwidgetutils.h" | ||||||
|  | #include "pdfconstants.h" | ||||||
|  |  | ||||||
| #include "pdfviewersettings.h" | #include "pdfviewersettings.h" | ||||||
| #include "pdfundoredomanager.h" | #include "pdfundoredomanager.h" | ||||||
| @@ -47,6 +48,7 @@ | |||||||
| #include <QDesktopWidget> | #include <QDesktopWidget> | ||||||
| #include <QMainWindow> | #include <QMainWindow> | ||||||
| #include <QToolBar> | #include <QToolBar> | ||||||
|  | #include <QXmlStreamWriter> | ||||||
|  |  | ||||||
| #ifdef Q_OS_WIN | #ifdef Q_OS_WIN | ||||||
| #pragma comment(lib, "Shell32") | #pragma comment(lib, "Shell32") | ||||||
| @@ -493,6 +495,10 @@ void PDFProgramController::initialize(Features features, | |||||||
|     { |     { | ||||||
|         connect(action, &QAction::triggered, this, &PDFProgramController::onActionCloseTriggered); |         connect(action, &QAction::triggered, this, &PDFProgramController::onActionCloseTriggered); | ||||||
|     } |     } | ||||||
|  |     if (QAction* action = m_actionManager->getAction(PDFActionManager::DeveloperCreateInstaller)) | ||||||
|  |     { | ||||||
|  |         connect(action, &QAction::triggered, this, &PDFProgramController::onActionDeveloperCreateInstaller); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     if (m_recentFileManager) |     if (m_recentFileManager) | ||||||
|     { |     { | ||||||
| @@ -1829,6 +1835,132 @@ void PDFProgramController::onActionCloseTriggered() | |||||||
|     closeDocument(); |     closeDocument(); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | void PDFProgramController::onActionDeveloperCreateInstaller() | ||||||
|  | { | ||||||
|  |     QString directory = QFileDialog::getExistingDirectory(m_mainWindow, tr("Select Directory for Installer")); | ||||||
|  |  | ||||||
|  |     if (directory.isEmpty()) | ||||||
|  |     { | ||||||
|  |         return; | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // Config.xml | ||||||
|  |     { | ||||||
|  |         QDir().mkpath(directory + "/config"); | ||||||
|  |         QFile configFile(directory + "/config/config.xml"); | ||||||
|  |         if (configFile.open(QFile::WriteOnly | QFile::Truncate)) | ||||||
|  |         { | ||||||
|  |             QXmlStreamWriter configWriter(&configFile); | ||||||
|  |             configWriter.setAutoFormatting(true); | ||||||
|  |             configWriter.setAutoFormattingIndent(2); | ||||||
|  |  | ||||||
|  |             configWriter.writeStartDocument(); | ||||||
|  |             configWriter.writeStartElement("Installer"); | ||||||
|  |  | ||||||
|  |             configWriter.writeTextElement("Name", tr("PDF4QT")); | ||||||
|  |             configWriter.writeTextElement("Title", tr("PDF4QT Suite (library, viewer, editor, command line tool)")); | ||||||
|  |             configWriter.writeTextElement("Version", pdf::PDF_LIBRARY_VERSION); | ||||||
|  |             configWriter.writeTextElement("Publisher", tr("Jakub Melka")); | ||||||
|  |             configWriter.writeTextElement("StartMenuDir", "PDF4QT"); | ||||||
|  |             configWriter.writeTextElement("TargetDir", "@ApplicationsDir@/PDF4QT"); | ||||||
|  |             configWriter.writeTextElement("CreateLocalRepository", "true"); | ||||||
|  |             configWriter.writeTextElement("InstallActionColumnVisible", "true"); | ||||||
|  |  | ||||||
|  |             configWriter.writeEndElement(); | ||||||
|  |             configWriter.writeEndDocument(); | ||||||
|  |             configFile.close(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // Installer project file | ||||||
|  |     { | ||||||
|  |         QString qtInstallDirectory = QT_INSTALL_DIRECTORY; | ||||||
|  |         int indexofQtRoot = qtInstallDirectory.lastIndexOf("/Qt/"); | ||||||
|  |         QString binaryCreatorDirectory; | ||||||
|  |  | ||||||
|  |         if (indexofQtRoot != -1) | ||||||
|  |         { | ||||||
|  |             indexofQtRoot += 4; | ||||||
|  |             QString qtRootDirectory = qtInstallDirectory.left(indexofQtRoot); | ||||||
|  |             QString qtInstallerFrameworkRoot = qtRootDirectory + "Tools/QtInstallerFramework/"; | ||||||
|  |  | ||||||
|  |             QDir qtInstallerFrameworkRootDir(qtInstallerFrameworkRoot); | ||||||
|  |             QStringList entries = qtInstallerFrameworkRootDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::Name); | ||||||
|  |  | ||||||
|  |             if (!entries.isEmpty()) | ||||||
|  |             { | ||||||
|  |                 binaryCreatorDirectory = QString("%1/%2/bin").arg(qtInstallerFrameworkRoot, entries.back()); | ||||||
|  |                 binaryCreatorDirectory = QDir(binaryCreatorDirectory).absolutePath(); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |  | ||||||
|  |         QFile configFile(directory + "/installer.pro"); | ||||||
|  |         if (configFile.open(QFile::WriteOnly | QFile::Truncate)) | ||||||
|  |         { | ||||||
|  |             QTextStream stream(&configFile); | ||||||
|  |             stream << "TEMPLATE = aux" << endl << endl; | ||||||
|  |             stream << "INSTALLER_NAME = $$PWD/instpdf4qt" << endl; | ||||||
|  |             stream << "INPUT = $$PWD/config/config.xml $$PWD/packages" << endl; | ||||||
|  |             stream << "pdfforqtinstaller.input = INPUT" << endl; | ||||||
|  |             stream << "pdfforqtinstaller.output = $$INSTALLER_NAME" << endl; | ||||||
|  |             stream << QString("pdfforqtinstaller.commands = %1/binarycreator -c $$PWD/config/config.xml -p $$PWD/packages ${QMAKE_FILE_OUT}").arg(binaryCreatorDirectory) << endl; | ||||||
|  |             stream << "pdfforqtinstaller.CONFIG += target_predeps no_link combine" << endl << endl; | ||||||
|  |             stream << "QMAKE_EXTRA_COMPILERS += pdfforqtinstaller"; | ||||||
|  |             configFile.close(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     // Packages | ||||||
|  |     QDir().mkpath(directory + "/packages"); | ||||||
|  |  | ||||||
|  |     auto addComponentMeta = [&](QString componentName, QString displayName, QString description, QString version, QString internalName, bool forcedInstallation, bool defaultInstall, bool addDefaultLicense) | ||||||
|  |     { | ||||||
|  |         QString componentMetaDirectory = directory + QString("/packages/%1/meta").arg(componentName); | ||||||
|  |         QDir().mkpath(componentMetaDirectory); | ||||||
|  |  | ||||||
|  |         QString metaFileName = QString("%1/package.xml").arg(componentMetaDirectory); | ||||||
|  |  | ||||||
|  |         QFile metaFile(metaFileName); | ||||||
|  |         if (metaFile.open(QFile::WriteOnly | QFile::Truncate)) | ||||||
|  |         { | ||||||
|  |             QXmlStreamWriter metaFileWriter(&metaFile); | ||||||
|  |             metaFileWriter.setAutoFormatting(true); | ||||||
|  |             metaFileWriter.setAutoFormattingIndent(2); | ||||||
|  |  | ||||||
|  |             metaFileWriter.writeStartDocument(); | ||||||
|  |             metaFileWriter.writeStartElement("Package"); | ||||||
|  |  | ||||||
|  |             metaFileWriter.writeTextElement("DisplayName", displayName); | ||||||
|  |             metaFileWriter.writeTextElement("Description", description); | ||||||
|  |             metaFileWriter.writeTextElement("Version", version); | ||||||
|  |             metaFileWriter.writeTextElement("ReleaseDate", QDateTime::currentDateTime().toString("yyyy-MM-dd")); | ||||||
|  |             metaFileWriter.writeTextElement("Name", internalName); | ||||||
|  |             metaFileWriter.writeTextElement("ExpandedByDefault", "true"); | ||||||
|  |             metaFileWriter.writeTextElement("ForcedInstallation", forcedInstallation ? "true" : "false"); | ||||||
|  |             metaFileWriter.writeTextElement("Default", defaultInstall ? "true" : "false"); | ||||||
|  |  | ||||||
|  |             if (addDefaultLicense) | ||||||
|  |             { | ||||||
|  |                 QFile::copy(":/LICENSE.txt", QString("%1/LICENSE.txt").arg(componentMetaDirectory)); | ||||||
|  |  | ||||||
|  |                 metaFileWriter.writeStartElement("Licenses"); | ||||||
|  |                 metaFileWriter.writeStartElement("License"); | ||||||
|  |                 metaFileWriter.writeAttribute("name", tr("License Agreement")); | ||||||
|  |                 metaFileWriter.writeAttribute("file", tr("LICENSE.txt")); | ||||||
|  |                 metaFileWriter.writeEndElement(); | ||||||
|  |                 metaFileWriter.writeEndElement(); | ||||||
|  |             } | ||||||
|  |  | ||||||
|  |             metaFileWriter.writeEndElement(); | ||||||
|  |             metaFileWriter.writeEndDocument(); | ||||||
|  |             metaFile.close(); | ||||||
|  |         } | ||||||
|  |     }; | ||||||
|  |  | ||||||
|  |     // CoreLib package | ||||||
|  |     addComponentMeta("pdf4qt_framework", tr("Framework (Core libraries)"), tr("Framework libraries and other data files required to run all other programs."), pdf::PDF_LIBRARY_VERSION, "pdf4qt_framework", true, true, true); | ||||||
|  | } | ||||||
|  |  | ||||||
| void PDFProgramController::onPageRenderingErrorsChanged(pdf::PDFInteger pageIndex, int errorsCount) | void PDFProgramController::onPageRenderingErrorsChanged(pdf::PDFInteger pageIndex, int errorsCount) | ||||||
| { | { | ||||||
|     if (errorsCount > 0) |     if (errorsCount > 0) | ||||||
|   | |||||||
| @@ -161,6 +161,7 @@ public: | |||||||
|         ToolMagnifier, |         ToolMagnifier, | ||||||
|         ToolScreenshot, |         ToolScreenshot, | ||||||
|         ToolExtractImage, |         ToolExtractImage, | ||||||
|  |         DeveloperCreateInstaller, | ||||||
|         LastAction |         LastAction | ||||||
|     }; |     }; | ||||||
|  |  | ||||||
| @@ -329,6 +330,7 @@ private: | |||||||
|     void onActionOptionsTriggered(); |     void onActionOptionsTriggered(); | ||||||
|     void onActionOpenTriggered(); |     void onActionOpenTriggered(); | ||||||
|     void onActionCloseTriggered(); |     void onActionCloseTriggered(); | ||||||
|  |     void onActionDeveloperCreateInstaller(); | ||||||
|  |  | ||||||
|     void onDrawSpaceChanged(); |     void onDrawSpaceChanged(); | ||||||
|     void onPageLayoutChanged(); |     void onPageLayoutChanged(); | ||||||
|   | |||||||
| @@ -175,6 +175,7 @@ PDFViewerMainWindow::PDFViewerMainWindow(QWidget* parent) : | |||||||
|     m_actionManager->setAction(PDFActionManager::ToolMagnifier, ui->actionMagnifier); |     m_actionManager->setAction(PDFActionManager::ToolMagnifier, ui->actionMagnifier); | ||||||
|     m_actionManager->setAction(PDFActionManager::ToolScreenshot, ui->actionScreenshot); |     m_actionManager->setAction(PDFActionManager::ToolScreenshot, ui->actionScreenshot); | ||||||
|     m_actionManager->setAction(PDFActionManager::ToolExtractImage, ui->actionExtractImage); |     m_actionManager->setAction(PDFActionManager::ToolExtractImage, ui->actionExtractImage); | ||||||
|  |     m_actionManager->setAction(PDFActionManager::DeveloperCreateInstaller, ui->actionDeveloperCreateInstaller); | ||||||
|     m_actionManager->initActions(pdf::PDFWidgetUtils::scaleDPI(this, QSize(24, 24)), true); |     m_actionManager->initActions(pdf::PDFWidgetUtils::scaleDPI(this, QSize(24, 24)), true); | ||||||
|  |  | ||||||
|     for (QAction* action : m_programController->getRecentFileManager()->getActions()) |     for (QAction* action : m_programController->getRecentFileManager()->getActions()) | ||||||
|   | |||||||
| @@ -116,6 +116,7 @@ | |||||||
|     </property> |     </property> | ||||||
|     <addaction name="actionShow_Text_Blocks"/> |     <addaction name="actionShow_Text_Blocks"/> | ||||||
|     <addaction name="actionShow_Text_Lines"/> |     <addaction name="actionShow_Text_Lines"/> | ||||||
|  |     <addaction name="actionDeveloperCreateInstaller"/> | ||||||
|    </widget> |    </widget> | ||||||
|    <widget class="QMenu" name="menuEdit"> |    <widget class="QMenu" name="menuEdit"> | ||||||
|     <property name="title"> |     <property name="title"> | ||||||
| @@ -198,7 +199,7 @@ | |||||||
|   <widget class="QStatusBar" name="statusBar"/> |   <widget class="QStatusBar" name="statusBar"/> | ||||||
|   <action name="actionOpen"> |   <action name="actionOpen"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/open.svg</normaloff>:/resources/open.svg</iconset> |      <normaloff>:/resources/open.svg</normaloff>:/resources/open.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -212,7 +213,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionQuit"> |   <action name="actionQuit"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/quit.svg</normaloff>:/resources/quit.svg</iconset> |      <normaloff>:/resources/quit.svg</normaloff>:/resources/quit.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -279,7 +280,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionRendering_Errors"> |   <action name="actionRendering_Errors"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/rendering-errors.svg</normaloff>:/resources/rendering-errors.svg</iconset> |      <normaloff>:/resources/rendering-errors.svg</normaloff>:/resources/rendering-errors.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -323,7 +324,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionOptions"> |   <action name="actionOptions"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/settings.svg</normaloff>:/resources/settings.svg</iconset> |      <normaloff>:/resources/settings.svg</normaloff>:/resources/settings.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -335,7 +336,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionZoom_In"> |   <action name="actionZoom_In"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/zoom-in.svg</normaloff>:/resources/zoom-in.svg</iconset> |      <normaloff>:/resources/zoom-in.svg</normaloff>:/resources/zoom-in.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -344,7 +345,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionZoom_Out"> |   <action name="actionZoom_Out"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/zoom-out.svg</normaloff>:/resources/zoom-out.svg</iconset> |      <normaloff>:/resources/zoom-out.svg</normaloff>:/resources/zoom-out.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -358,7 +359,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFitPage"> |   <action name="actionFitPage"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/zoom-fit.svg</normaloff>:/resources/zoom-fit.svg</iconset> |      <normaloff>:/resources/zoom-fit.svg</normaloff>:/resources/zoom-fit.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -367,7 +368,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFitWidth"> |   <action name="actionFitWidth"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/zoom-fit-horizontal.svg</normaloff>:/resources/zoom-fit-horizontal.svg</iconset> |      <normaloff>:/resources/zoom-fit-horizontal.svg</normaloff>:/resources/zoom-fit-horizontal.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -379,7 +380,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFitHeight"> |   <action name="actionFitHeight"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/zoom-fit-vertical.svg</normaloff>:/resources/zoom-fit-vertical.svg</iconset> |      <normaloff>:/resources/zoom-fit-vertical.svg</normaloff>:/resources/zoom-fit-vertical.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -391,7 +392,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionProperties"> |   <action name="actionProperties"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/info.svg</normaloff>:/resources/info.svg</iconset> |      <normaloff>:/resources/info.svg</normaloff>:/resources/info.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -400,7 +401,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionSend_by_E_Mail"> |   <action name="actionSend_by_E_Mail"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/send-mail.svg</normaloff>:/resources/send-mail.svg</iconset> |      <normaloff>:/resources/send-mail.svg</normaloff>:/resources/send-mail.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -425,7 +426,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFind"> |   <action name="actionFind"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/find.svg</normaloff>:/resources/find.svg</iconset> |      <normaloff>:/resources/find.svg</normaloff>:/resources/find.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -434,7 +435,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFindPrevious"> |   <action name="actionFindPrevious"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/find-previous.svg</normaloff>:/resources/find-previous.svg</iconset> |      <normaloff>:/resources/find-previous.svg</normaloff>:/resources/find-previous.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -443,7 +444,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionFindNext"> |   <action name="actionFindNext"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/find-next.svg</normaloff>:/resources/find-next.svg</iconset> |      <normaloff>:/resources/find-next.svg</normaloff>:/resources/find-next.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -455,7 +456,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/select-text.svg</normaloff>:/resources/select-text.svg</iconset> |      <normaloff>:/resources/select-text.svg</normaloff>:/resources/select-text.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -487,7 +488,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionRotateRight"> |   <action name="actionRotateRight"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/rotate-right.svg</normaloff>:/resources/rotate-right.svg</iconset> |      <normaloff>:/resources/rotate-right.svg</normaloff>:/resources/rotate-right.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -496,7 +497,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionRotateLeft"> |   <action name="actionRotateLeft"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/rotate-left.svg</normaloff>:/resources/rotate-left.svg</iconset> |      <normaloff>:/resources/rotate-left.svg</normaloff>:/resources/rotate-left.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -505,7 +506,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionPrint"> |   <action name="actionPrint"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/print.svg</normaloff>:/resources/print.svg</iconset> |      <normaloff>:/resources/print.svg</normaloff>:/resources/print.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -522,7 +523,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/magnifier.svg</normaloff>:/resources/magnifier.svg</iconset> |      <normaloff>:/resources/magnifier.svg</normaloff>:/resources/magnifier.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -537,7 +538,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/screenshot-tool.svg</normaloff>:/resources/screenshot-tool.svg</iconset> |      <normaloff>:/resources/screenshot-tool.svg</normaloff>:/resources/screenshot-tool.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -549,7 +550,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/extract-image.svg</normaloff>:/resources/extract-image.svg</iconset> |      <normaloff>:/resources/extract-image.svg</normaloff>:/resources/extract-image.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -566,7 +567,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionUndo"> |   <action name="actionUndo"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/undo.svg</normaloff>:/resources/undo.svg</iconset> |      <normaloff>:/resources/undo.svg</normaloff>:/resources/undo.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -575,7 +576,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionRedo"> |   <action name="actionRedo"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/redo.svg</normaloff>:/resources/redo.svg</iconset> |      <normaloff>:/resources/redo.svg</normaloff>:/resources/redo.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -658,7 +659,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/hyperlink.svg</normaloff>:/resources/hyperlink.svg</iconset> |      <normaloff>:/resources/hyperlink.svg</normaloff>:/resources/hyperlink.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -718,7 +719,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/highlight.svg</normaloff>:/resources/highlight.svg</iconset> |      <normaloff>:/resources/highlight.svg</normaloff>:/resources/highlight.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -730,7 +731,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/underline.svg</normaloff>:/resources/underline.svg</iconset> |      <normaloff>:/resources/underline.svg</normaloff>:/resources/underline.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -742,7 +743,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/strikeout.svg</normaloff>:/resources/strikeout.svg</iconset> |      <normaloff>:/resources/strikeout.svg</normaloff>:/resources/strikeout.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -754,7 +755,7 @@ | |||||||
|     <bool>true</bool> |     <bool>true</bool> | ||||||
|    </property> |    </property> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/squiggly.svg</normaloff>:/resources/squiggly.svg</iconset> |      <normaloff>:/resources/squiggly.svg</normaloff>:/resources/squiggly.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -763,7 +764,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionGoToDocumentStart"> |   <action name="actionGoToDocumentStart"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/previous-start.svg</normaloff>:/resources/previous-start.svg</iconset> |      <normaloff>:/resources/previous-start.svg</normaloff>:/resources/previous-start.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -772,7 +773,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionGoToDocumentEnd"> |   <action name="actionGoToDocumentEnd"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/next-end.svg</normaloff>:/resources/next-end.svg</iconset> |      <normaloff>:/resources/next-end.svg</normaloff>:/resources/next-end.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -781,7 +782,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionGoToNextPage"> |   <action name="actionGoToNextPage"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/next-page.svg</normaloff>:/resources/next-page.svg</iconset> |      <normaloff>:/resources/next-page.svg</normaloff>:/resources/next-page.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -790,7 +791,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionGoToPreviousPage"> |   <action name="actionGoToPreviousPage"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/previous-page.svg</normaloff>:/resources/previous-page.svg</iconset> |      <normaloff>:/resources/previous-page.svg</normaloff>:/resources/previous-page.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -799,7 +800,7 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionGoToNextLine"> |   <action name="actionGoToNextLine"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/next.svg</normaloff>:/resources/next.svg</iconset> |      <normaloff>:/resources/next.svg</normaloff>:/resources/next.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
| @@ -808,17 +809,22 @@ | |||||||
|   </action> |   </action> | ||||||
|   <action name="actionGoToPreviousLine"> |   <action name="actionGoToPreviousLine"> | ||||||
|    <property name="icon"> |    <property name="icon"> | ||||||
|     <iconset resource="pdfforqtviewer.qrc"> |     <iconset resource="pdf4qtviewer.qrc"> | ||||||
|      <normaloff>:/resources/previous.svg</normaloff>:/resources/previous.svg</iconset> |      <normaloff>:/resources/previous.svg</normaloff>:/resources/previous.svg</iconset> | ||||||
|    </property> |    </property> | ||||||
|    <property name="text"> |    <property name="text"> | ||||||
|     <string>Go to previous line</string> |     <string>Go to previous line</string> | ||||||
|    </property> |    </property> | ||||||
|   </action> |   </action> | ||||||
|  |   <action name="actionDeveloperCreateInstaller"> | ||||||
|  |    <property name="text"> | ||||||
|  |     <string>Create Installer</string> | ||||||
|  |    </property> | ||||||
|  |   </action> | ||||||
|  </widget> |  </widget> | ||||||
|  <layoutdefault spacing="6" margin="11"/> |  <layoutdefault spacing="6" margin="11"/> | ||||||
|  <resources> |  <resources> | ||||||
|   <include location="pdfforqtviewer.qrc"/> |   <include location="pdf4qtviewer.qrc"/> | ||||||
|  </resources> |  </resources> | ||||||
|  <connections/> |  <connections/> | ||||||
| </ui> | </ui> | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| #include "pdfviewermainwindowlite.h" | #include "pdfviewermainwindowlite.h" | ||||||
|  | #include "pdfconstants.h" | ||||||
|  |  | ||||||
| #include <QApplication> | #include <QApplication> | ||||||
| #include <QCommandLineParser> | #include <QCommandLineParser> | ||||||
| @@ -12,7 +13,7 @@ int main(int argc, char *argv[]) | |||||||
|  |  | ||||||
|     QCoreApplication::setOrganizationName("MelkaJ"); |     QCoreApplication::setOrganizationName("MelkaJ"); | ||||||
|     QCoreApplication::setApplicationName("PDF4QT Viewer Lite"); |     QCoreApplication::setApplicationName("PDF4QT Viewer Lite"); | ||||||
|     QCoreApplication::setApplicationVersion("1.0.0"); |     QCoreApplication::setApplicationVersion(pdf::PDF_LIBRARY_VERSION); | ||||||
|     QApplication::setApplicationDisplayName(QApplication::translate("Application", "PDF4QT Viewer Lite")); |     QApplication::setApplicationDisplayName(QApplication::translate("Application", "PDF4QT Viewer Lite")); | ||||||
|     QCommandLineParser parser; |     QCommandLineParser parser; | ||||||
|     parser.setApplicationDescription(QCoreApplication::applicationName()); |     parser.setApplicationDescription(QCoreApplication::applicationName()); | ||||||
|   | |||||||
| @@ -1,4 +1,5 @@ | |||||||
| #include "pdfviewermainwindow.h" | #include "pdfviewermainwindow.h" | ||||||
|  | #include "pdfconstants.h" | ||||||
|  |  | ||||||
| #include <QApplication> | #include <QApplication> | ||||||
| #include <QCommandLineParser> | #include <QCommandLineParser> | ||||||
| @@ -12,7 +13,7 @@ int main(int argc, char *argv[]) | |||||||
|  |  | ||||||
|     QCoreApplication::setOrganizationName("MelkaJ"); |     QCoreApplication::setOrganizationName("MelkaJ"); | ||||||
|     QCoreApplication::setApplicationName("PDF4QT Viewer Profi"); |     QCoreApplication::setApplicationName("PDF4QT Viewer Profi"); | ||||||
|     QCoreApplication::setApplicationVersion("1.0.0"); |     QCoreApplication::setApplicationVersion(pdf::PDF_LIBRARY_VERSION); | ||||||
|     QApplication::setApplicationDisplayName(QApplication::translate("Application", "PDF4QT Viewer Profi")); |     QApplication::setApplicationDisplayName(QApplication::translate("Application", "PDF4QT Viewer Profi")); | ||||||
|     QCommandLineParser parser; |     QCommandLineParser parser; | ||||||
|     parser.setApplicationDescription(QCoreApplication::applicationName()); |     parser.setApplicationDescription(QCoreApplication::applicationName()); | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| //    Copyright (C) 2020 Jakub Melka | //    Copyright (C) 2020-2021 Jakub Melka | ||||||
| // | // | ||||||
| //    This file is part of Pdf4Qt. | //    This file is part of Pdf4Qt. | ||||||
| // | // | ||||||
| @@ -16,6 +16,7 @@ | |||||||
| //    along with Pdf4Qt.  If not, see <https://www.gnu.org/licenses/>. | //    along with Pdf4Qt.  If not, see <https://www.gnu.org/licenses/>. | ||||||
|  |  | ||||||
| #include "pdftoolabstractapplication.h" | #include "pdftoolabstractapplication.h" | ||||||
|  | #include "pdfconstants.h" | ||||||
|  |  | ||||||
| #include <QGuiApplication> | #include <QGuiApplication> | ||||||
| #include <QCommandLineParser> | #include <QCommandLineParser> | ||||||
| @@ -26,7 +27,7 @@ int main(int argc, char *argv[]) | |||||||
|     QGuiApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity, true); |     QGuiApplication::setAttribute(Qt::AA_DontCheckOpenGLContextThreadAffinity, true); | ||||||
|     QCoreApplication::setOrganizationName("MelkaJ"); |     QCoreApplication::setOrganizationName("MelkaJ"); | ||||||
|     QCoreApplication::setApplicationName("PdfTool"); |     QCoreApplication::setApplicationName("PdfTool"); | ||||||
|     QCoreApplication::setApplicationVersion("1.0.0"); |     QCoreApplication::setApplicationVersion(pdf::PDF_LIBRARY_VERSION); | ||||||
|  |  | ||||||
|     QStringList arguments = QCoreApplication::arguments(); |     QStringList arguments = QCoreApplication::arguments(); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user