From 6b8c54398d4a686ba4cb3911c5fef90a96766881 Mon Sep 17 00:00:00 2001 From: eelke Date: Sun, 4 Sep 2022 12:43:09 +0200 Subject: [PATCH] Add installation and releasenotes sections to the user manual. --- .gitignore | 1 + .gitlab-ci.yml | 27 ++++++++++++------- docs/conf.py | 5 ++-- docs/index.rst | 7 +++-- docs/installation.rst | 16 +++++++++++ docs/releasenotes.rst | 5 ++++ pglab/About.cpp | 2 +- pglab/ConnectionManagerWindow.cpp | 14 +++++++--- pglab/ConnectionManagerWindow.h | 2 ++ pglab/ConnectionManagerWindow.ui | 6 +++++ releasenotes/config.yaml | 2 ++ ...include-releasenotes-53aca515c5c124fd.yaml | 4 +++ 12 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 docs/installation.rst create mode 100644 docs/releasenotes.rst create mode 100644 releasenotes/config.yaml create mode 100644 releasenotes/notes/docs-include-releasenotes-53aca515c5c124fd.yaml diff --git a/.gitignore b/.gitignore index 645129f..35dfb13 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ srcdoc/ pglabAll.pro.user.4.8-pre1 *.user /pglabAll.pro.user* +/public/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4558dee..9c157d6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -8,25 +8,34 @@ cache: - "$CI_PROJECT_DIR/pip-cache" key: "$CI_PROJECT_ID" +.install_sphinx: + before_script: + - pip install -U sphinx + - pip install -U sphinx-theme-pd + - pip install -U reno[sphinx] + + test-docs: stage: test + extends: + - .install_sphinx script: - - pip install -U sphinx - - pip install -U sphinx-theme-pd - - sphinx-build -b html docs public + - sphinx-build -b html docs userdocs + artifacts: + paths: + - userdocs only: - branches - except: - - main -pages: +deploy: stage: deploy + extends: + - .install_sphinx script: - - pip install -U sphinx - - pip install -U sphinx-theme-pd - sphinx-build -b html docs public artifacts: paths: - public only: - - main + - tags + diff --git a/docs/conf.py b/docs/conf.py index 785f808..6ce7a1e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ copyright = '2021-2022, Eelke Klein' author = 'Eelke Klein' # The full version, including alpha/beta/rc tags -release = 'https://eelke.gitlab.io/pgLab/' +# release = '1.0' # -- General configuration --------------------------------------------------- @@ -31,6 +31,7 @@ release = 'https://eelke.gitlab.io/pgLab/' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ +'reno.sphinxext' ] # Add any paths that contain templates here, relative to this directory. @@ -54,4 +55,4 @@ html_theme_path = [sphinx_theme_pd.get_html_theme_path()] # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] +html_static_path = [] diff --git a/docs/index.rst b/docs/index.rst index 08e8642..ff59f1d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,13 +10,12 @@ pgLab User Manual :maxdepth: 2 :caption: Contents: + releasenotes + installation + Indices and tables ================== * :ref:`genindex` * :ref:`search` -Fork this project -================== - -* https://eelke.gitlab.io/pgLab/ diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 0000000..9a416a9 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,16 @@ +============ +Installation +============ + +Currently only binaries for Windows 64-bit are provided. + +------- +Windows +------- + +Downloads can be found `here `_. + +Unpack the contents of the 7zip archive to a folder of your choosing for instance +`C:\\Program files\\pgLab`. You can run the pgLab.exe from there. If it is complaining +about missing files this is probably because the required Visual C++ Runtime has +not yet been installed on your machine you can get it from `microsoft `_. diff --git a/docs/releasenotes.rst b/docs/releasenotes.rst new file mode 100644 index 0000000..9d6d0ae --- /dev/null +++ b/docs/releasenotes.rst @@ -0,0 +1,5 @@ +============ +Releasenotes +============ + +.. release-notes:: diff --git a/pglab/About.cpp b/pglab/About.cpp index e5c3753..a38b4b1 100644 --- a/pglab/About.cpp +++ b/pglab/About.cpp @@ -8,7 +8,7 @@ void ShowAboutDialog(QWidget *parent) QString pgLabVersionString = "0.2"; QString releaseNotesUrl = "file:///" + QCoreApplication::applicationDirPath() + "\\releasenotes.html"; QString year = QString::fromLatin1(__DATE__, 11).right(4); - QMessageBox::about(parent, "pgLab " + pgLabVersionString, QMessageBox::tr( + QMessageBox::about(parent, "pgLab", QMessageBox::tr( "

Version %3

" "

Releasenotes

" "

Copyrights 2016-%1, Eelke Klein, All Rights Reserved.

" diff --git a/pglab/ConnectionManagerWindow.cpp b/pglab/ConnectionManagerWindow.cpp index 10bdc06..5377631 100644 --- a/pglab/ConnectionManagerWindow.cpp +++ b/pglab/ConnectionManagerWindow.cpp @@ -3,13 +3,13 @@ #include "ui_ConnectionManagerWindow.h" #include "MasterController.h" #include "ConnectionController.h" +#include "ConnectionListModel.h" +#include +#include #include #include -#include "ConnectionListModel.h" - - -#include #include +#include ConnectionManagerWindow::ConnectionManagerWindow(MasterController *master, QWidget *parent) : QMainWindow(parent) @@ -109,3 +109,9 @@ void ConnectionManagerWindow::on_actionAbout_triggered() ShowAboutDialog(this); } + +void ConnectionManagerWindow::on_actionManual_triggered() +{ + QDesktopServices::openUrl(QString("https://eelke.gitlab.io/pgLab/#pglab-user-manual")); +} + diff --git a/pglab/ConnectionManagerWindow.h b/pglab/ConnectionManagerWindow.h index 8ad70b3..680915d 100644 --- a/pglab/ConnectionManagerWindow.h +++ b/pglab/ConnectionManagerWindow.h @@ -41,6 +41,8 @@ private slots: void on_actionAbout_triggered(); + void on_actionManual_triggered(); + private: Ui::ConnectionManagerWindow *ui; MasterController *m_masterController; diff --git a/pglab/ConnectionManagerWindow.ui b/pglab/ConnectionManagerWindow.ui index 6eee4e4..2d52b88 100644 --- a/pglab/ConnectionManagerWindow.ui +++ b/pglab/ConnectionManagerWindow.ui @@ -34,6 +34,7 @@ Fi&le + @@ -175,6 +176,11 @@ QToolButton { About + + + Manual + + diff --git a/releasenotes/config.yaml b/releasenotes/config.yaml new file mode 100644 index 0000000..fa9f8f3 --- /dev/null +++ b/releasenotes/config.yaml @@ -0,0 +1,2 @@ +--- +encoding: utf8 diff --git a/releasenotes/notes/docs-include-releasenotes-53aca515c5c124fd.yaml b/releasenotes/notes/docs-include-releasenotes-53aca515c5c124fd.yaml new file mode 100644 index 0000000..88d25e6 --- /dev/null +++ b/releasenotes/notes/docs-include-releasenotes-53aca515c5c124fd.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + Release notes are now included in the user manual.