This page contains information on how to various maintenance tasks related to MComix building and distribution.
Whenever a new translatable string is added to one of the source files, or an existing string is edited, the translation template (found in mcomix/messages/mcomix.pot
) should be updated. At the same time, it is convenient to also update all regular translation files (in mcomix/messages/*/LC_MESSAGES/mcomix.po
) from the template.
For this task, the following code can be put in a shell script to be executed from MComix' root directory. The gettext package is required.
#!/bin/sh
VERSION=$(grep VERSION mcomix/constants.py | sed -e "s/VERSION = //" -e "s/'//g")
MAINTAINER="NAME@HO.ST"
xgettext -LPython -omcomix.pot -pmcomix/messages/ -cTRANSLATORS \
--from-code=utf-8 --package-name=MComix --package-version=${VERSION} \
--msgid-bugs-address=${MAINTAINER} \
mcomix/*.py mcomix/archive/*.py mcomix/library/*.py
for pofile in mcomix/messages/*/LC_MESSAGES/*.po
do
# Merge message files with master template, no fuzzy matching (-N)
msgmerge -U --backup=none ${pofile} mcomix/messages/mcomix.pot
# Compile translation, add "-f" to include fuzzy strings
#msgfmt ${pofile} -o ${pofile%.*}.mo
done
The last, commented out line also automatically compiles a new .mo file from the original .po file, which isn't really necessary unless the translation has been updated.
The following steps should be performed prior to releasing a new version.
ChangeLog.md
is up-to-date. Add a "Release Date" line below the line indicating the current version.mcomix/constants.py
and make sure the VERSION
constant is correct and final. Remove the -dev0
suffix if required.git tag -a 1.3.0 -m "Version 1.3.0"
The source distribution files can be created from any system with Python installed. When following the steps to set up a development environment on [Installation], the build
module can be used to create the source package.
:::bash
python3 -m build -s
This will create mcomix-version.tar.gz
in the dist
subfolder, ready for uploading. Note that the command should not be run on a Windows machine, to avoid files in the archive having executable permission bits set. Building the Windows packages is a bit more difficult and requires:
mingw-w64-x86_64-python3-pillow
, mingw-w64-x86_64-gtk3
, mingw-w64-x86_64-python3
, mingw-w64-x86_64-python3-gobject
, mingw-w64-x86_64-python3-pip
, mingw-w64-x86_64-python-ujson
, mingw-w64-x86_64-python-pymupdf
, mingw-w64-x86_64-libjxl
. pacman -Syuu
.pyinstaller
is automatically installed when development dependencies have been installed, but it shoulld be updated to the latest version with pip-review --auto --local
../mcomix-other
, relative to MComix' root directory. At this time, those are:../mcomix-other/7z/7z.exe
, ../mcomix-other/7z/License.txt
(from 7-zip)../mcomix-other/mutool/COPYING.txt
, ../mcomix-other/mutool/mutool.exe
(from mupdf)../mcomix-other/unrar/license.txt
, ../mcomix-other/unrar/UnRAR64.dll7
(from WinRar)Afterwards, open a MINGW64 shell in MComix root directory and execute:
:::bash
python win32/build_pyinstaller.py
This will compile all necessary libraries and files, and copy them to the directory dist
.
Afterwards, switch back to a regular Windows console and build the MSI installer. This requires the WiX toolset on your PATH. Navigate to MComix' root folder and execute:
:::bash
python win32/build_msi.py
You will be notified if problems occured while the installer is building. The finished installer will be placed in the dist
directory.
The procedure is fairly straight-forward. First, switch to the list of files on MComix' project page, then create a new folder corresponding the the version to be released, e.g. MComix 1.3.0
. Open the folder, click on the "Add file" button, and upload the previously created archive files (mcomix-version.tar.gz
, mcomix-win64-version.zip
and mcomix-win64-version,msi
). When uploading has finished, the now uploaded files should be selected as default files for people visiting the MComix project page. To do this, click on the (i) icon to the right of each file.
Sometimes, uploading the windows packages using the web form can time out. In this case, the files can be uploaded with scp following the SCP upload manual of SourceForge.
At this point, creating a news entry containing the changes in this version (copy-pasted from ChangeLog.md
) might be advisable.
After releasing a new version, it is helpful to edit mcomix/constants.py
and increase the version number. Also append -dev0
so that people running MComix from Git source have some indicator that they're running a work-in-progress version.
On SourceForge, new milestones corresponding to the new version should be started and the old milestones marked as closed. Only the "Support Requests" and "Bugs" trackers need milestones. The milestone "Git" should always be open. The milestone is mainly useful for people reporting bugs - this allows to identify the version where the bug occurs, or -alternatively- where the bug has been fixed.