8 Commits

Author SHA1 Message Date
e09348e064 chore: bump release info to 1.3.0 2025-12-18 00:44:57 +08:00
Hosted Weblate
fce6a835b7 i18n: Translations update from Hosted Weblate
Co-authored-by: Andrey <andrey@mailbox.org>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ru/
Translation: pineapple-pictures/Application
2025-12-16 17:32:28 +01:00
afcd126c00 feat(CI): add deepin 25 build 2025-12-17 00:31:42 +08:00
aa025b0f3b Revert "chore: avoid use screenAt(QCursor::pos())"
I actually forgot why I did this, I might thought this API
is deprecated?

Reverting this resolved the issue that window is not appeared
at the screen that currently the cursor is at.

This reverts commit 4375fe1c2d.
2025-12-14 11:26:21 +08:00
e6e738412d chore(CI): add passoc binary for msvc build and minor tweaks
Resolve https://github.com/BLumia/pineapple-pictures/issues/13
2025-12-14 00:23:55 +08:00
2e748e19e1 fix: correct license for files under dist/passoc 2025-12-11 00:47:19 +08:00
4b5c9e9ebd chore: add icons for Windows file assoc 2025-12-11 00:07:31 +08:00
cdfa8b78a4 feat(Windows): install passoc default config file 2025-12-03 00:10:42 +08:00
18 changed files with 266 additions and 43 deletions

35
.github/workflows/deepin.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
name: deepin 25 CI
on: [push, pull_request, workflow_dispatch]
jobs:
build-deepin-25-deb:
runs-on: ubuntu-latest
container:
image: linuxdeepin/deepin:crimson
options: --user root
steps:
- name: Update package lists and install basic tools
run: |
apt update
apt install -y git ca-certificates curl file
- uses: actions/checkout@v4
- name: Get build dept.
run: |
apt install -y cmake qt6-base-dev qt6-svg-dev qt6-tools-dev libexiv2-dev
- name: Build it
run: |
git config --global --add safe.directory '*' # to avoid "fatal: detected dubious ownership in repository at xxx"
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build build -j
cd build
cpack -G DEB
- name: Try install it
run: |
cd build
apt install -y ./*.deb
- uses: actions/upload-artifact@v4
with:
name: deepin-25-deb-package
path: build/*.deb

View File

@@ -1,6 +1,6 @@
name: Ubuntu CI
on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]
jobs:
ubuntu-24-04-build:

View File

@@ -74,9 +74,9 @@ jobs:
set CMAKE_PREFIX_PATH=%PWD%/dependencies_bin
mkdir dependencies_src
echo ::group::===== exiv2 =====
curl -fsSL -o exiv2_bin.zip https://github.com/Exiv2/exiv2/releases/download/v0.28.5/exiv2-0.28.5-2022msvc-AMD64.zip
curl -fsSL -o exiv2_bin.zip https://github.com/Exiv2/exiv2/releases/download/v0.28.7/exiv2-0.28.7-2022msvc-AMD64.zip
7z x exiv2_bin.zip -y
ren .\exiv2-0.28.5-2022msvc-AMD64 dependencies_bin
ren .\exiv2-0.28.7-2022msvc-AMD64 dependencies_bin
echo ::endgroup::
echo ::group::===== zlib =====
curl -fsSL -o zlib_src.zip https://zlib.net/zlib131.zip
@@ -125,8 +125,12 @@ jobs:
cmake --build build --config Release
cmake --install build --config Release --prefix "%PWD%\build"
echo ::endgroup::
echo ::group::===== passoc stuff =====
curl -fsSL -o passoc-standalone.zip https://github.com/BLumia/pineapple-assoc-manager/releases/latest/download/pineapple-assoc-manager-qt${{ matrix.qt_ver }}-standalone.zip
7z x passoc-standalone.zip passoc.exe -y -o"build/bin"
echo ::endgroup::
:: ------ pkg ------
windeployqt --verbose=2 --no-compiler-runtime --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe
windeployqt --verbose=2 --no-compiler-runtime --no-quick-import --no-translations --no-network --no-opengl-sw --no-system-d3d-compiler --no-system-dxc-compiler --skip-plugin-types tls,networkinformation build\bin\ppic.exe
robocopy ./dependencies_bin/bin build/bin *.dll
if ErrorLevel 8 (exit /B 1)
copy LICENSE build\bin

View File

@@ -4,7 +4,7 @@
cmake_minimum_required(VERSION 3.16)
project(pineapple-pictures VERSION 1.2.1) # don't forget to update NEWS file and AppStream metadata.
project(pineapple-pictures VERSION 1.3.0) # don't forget to update NEWS file and AppStream metadata.
include(GNUInstallDirs)
include(FeatureSummary)
@@ -270,6 +270,25 @@ if (DEFINED QM_FILE_INSTALL_DIR)
)
endif()
if (WIN32)
install(
FILES dist/passoc/ppic.pacfg
DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME default-assoc.pacfg
)
install(
FILES
dist/passoc/generic.ico
dist/passoc/jpeg.ico
dist/passoc/gif.ico
dist/passoc/svg.ico
dist/passoc/png.ico
dist/passoc/psd.ico
DESTINATION "${CMAKE_INSTALL_BINDIR}/icons"
)
endif()
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
# CPACK: General Settings
@@ -285,7 +304,7 @@ elseif (APPLE)
elseif (UNIX)
set (CPACK_SYSTEM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}")
set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat-plugins")
set (CPACK_DEBIAN_PACKAGE_RECOMMENDS "kimageformat6-plugins")
endif()
include(CPack)

21
NEWS
View File

@@ -1,3 +1,23 @@
Version 1.3.0
~~~~~~~~~~~~~
Released: 2025-12-20
Features:
* New option to limit SVG support to SVG Tiny 1.2 standard
* Windows: ship tools and configurations that help user associate image files to this program
Bugfixes:
* Fix window not appear at the screen that the mouse cursor is at
* Fix Windows prebuilt binary having AVIF plugin included but not actually support it
Miscellaneous:
* CPack DEB: will now recommend "kimageformat6-plugins" instead of the KF5 version
* Update translations
* Update exiv2 version for Windows binary build
Contributors:
VenusGirl, Andrey
Version 1.2.1
~~~~~~~~~~~~~
Released: 2025-11-22
@@ -214,4 +234,3 @@ Bugfixes:
Contributors:
yyc12345

View File

@@ -9,11 +9,17 @@ SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ["README**.md", "NEWS", "assets/**.rc.in", "assets/**.qrc", "dist/**"]
path = ["README**.md", "NEWS", "assets/**.rc.in", "assets/**.qrc", "dist/appstream/**", "dist/**.in", "dist/**.desktop"]
precedence = "aggregate"
SPDX-FileCopyrightText = "None"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = ["dist/passoc/**"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2025 Gary Wang"
SPDX-License-Identifier = "MIT"
[[annotations]]
path = ["app/translations/**.ts", "assets/plain/translators.html"]
precedence = "aggregate"

View File

@@ -222,7 +222,7 @@ void MainWindow::adjustWindowSizeBySceneRect()
if (m_graphicsView->scaleFactor() < 1 || size().expandedTo(sceneSizeWithMargins) != size()) {
// if it scaled down by the resize policy:
QSize screenSize = window()->screen()->availableSize();
QSize screenSize = qApp->screenAt(QCursor::pos())->availableSize();
if (screenSize.expandedTo(sceneSize) == screenSize) {
// we can show the picture by increase the window size.
QSize finalSize = (screenSize.expandedTo(sceneSizeWithMargins) == screenSize) ?
@@ -584,7 +584,7 @@ void MainWindow::centerWindow()
Qt::LeftToRight,
Qt::AlignCenter,
this->size(),
window()->screen()->availableGeometry()
qApp->screenAt(QCursor::pos())->availableGeometry()
)
);
}

View File

@@ -111,7 +111,7 @@
<message>
<location filename="../aboutdialog.cpp" line="48"/>
<source>Avoid resetting the zoom/rotation/flip state that was applied to the image view when switching between images.</source>
<translation type="unfinished"></translation>
<translation>Избегайте сброса настроек масштабирования/поворота/поворота, которые были применены к просмотру изображения при переключении между изображениями.</translation>
</message>
<message>
<location filename="../aboutdialog.cpp" line="63"/>
@@ -237,22 +237,22 @@
<message>
<location filename="../mainwindow.cpp" line="783"/>
<source>Image From Clipboard</source>
<translation type="unfinished"></translation>
<translation>Изображение из буфера обмена</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="801"/>
<source>Are you sure you want to move &quot;%1&quot; to recycle bin?</source>
<translation type="unfinished"></translation>
<translation>Вы уверены, что хотите переместить &quot;%1&quot; в корзину?</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="805"/>
<source>Failed to move file to trash</source>
<translation type="unfinished"></translation>
<translation>Не удалось переместить файл в корзину</translation>
</message>
<message>
<location filename="../mainwindow.cpp" line="806"/>
<source>Move to trash failed, it might caused by file permission issue, file system limitation, or platform limitation.</source>
<translation type="unfinished"></translation>
<translation>Перемещение в корзину не удалось, возможно, из-за проблем с правами доступа к файлу, ограничений файловой системы или ограничений платформы.</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="106"/>
@@ -286,7 +286,7 @@
<location filename="../aboutdialog.cpp" line="47"/>
<source>Keep transformation</source>
<comment>The &apos;transformation&apos; means the flip/rotation status that currently applied to the image view</comment>
<translation type="unfinished"></translation>
<translation>Сохранять трансформацию</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="90"/>
@@ -301,12 +301,12 @@
<message>
<location filename="../actionmanager.cpp" line="99"/>
<source>Pause/Resume Animation</source>
<translation type="unfinished"></translation>
<translation>Пауза/Возобновление анимации</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="100"/>
<source>Animation Go to Next Frame</source>
<translation type="unfinished"></translation>
<translation>Перейти к следующему кадру анимации</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="102"/>
@@ -316,17 +316,17 @@
<message>
<location filename="../actionmanager.cpp" line="103"/>
<source>Fit to view</source>
<translation type="unfinished"></translation>
<translation>Уместить все</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="104"/>
<source>Fit to width</source>
<translation type="unfinished"></translation>
<translation>Уместить по ширине</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="105"/>
<source>Fit long image</source>
<translation type="unfinished"></translation>
<translation>Уместить по длине</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="108"/>
@@ -361,7 +361,7 @@
<message>
<location filename="../actionmanager.cpp" line="94"/>
<source>Rotate left</source>
<translation type="unfinished"></translation>
<translation>Повернуть влево</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="96"/>
@@ -377,7 +377,7 @@
<location filename="../mainwindow.cpp" line="800"/>
<location filename="../actionmanager.cpp" line="109"/>
<source>Move to Trash</source>
<translation type="unfinished"></translation>
<translation>Переместить в корзину</translation>
</message>
<message>
<location filename="../actionmanager.cpp" line="113"/>
@@ -739,27 +739,27 @@
<message>
<location filename="../settingsdialog.cpp" line="41"/>
<source>Options</source>
<translation type="unfinished"></translation>
<translation>Опции</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="53"/>
<source>Shortcuts</source>
<translation type="unfinished"></translation>
<translation>Ярлыки</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="63"/>
<source>Editing shortcuts for action &quot;%1&quot;:</source>
<translation type="unfinished"></translation>
<translation>Сокращенные команды для действия &quot;%1&quot;:</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="72"/>
<source>Failed to set shortcuts</source>
<translation type="unfinished"></translation>
<translation>Не удалось установить ярлыки</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="73"/>
<source>Please check if shortcuts are duplicated with existing shortcuts.</source>
<translation type="unfinished"></translation>
<translation>Пожалуйста, проверьте, не дублируются ли ярлыки с существующими ярлыками.</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="80"/>
@@ -779,7 +779,7 @@
<message>
<location filename="../settingsdialog.cpp" line="83"/>
<source>Toggle fullscreen</source>
<translation type="unfinished"></translation>
<translation>Переключить полноэкранный режим</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="87"/>
@@ -804,7 +804,7 @@
<message>
<location filename="../settingsdialog.cpp" line="94"/>
<source>Windowed</source>
<translation type="unfinished"></translation>
<translation>Оконный</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="98"/>
@@ -838,22 +838,22 @@
<message>
<location filename="../settingsdialog.cpp" line="125"/>
<source>Use built-in close window animation</source>
<translation type="unfinished"></translation>
<translation>Использовать встроенную анимацию закрытия окна</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="126"/>
<source>Use light-color checkerboard</source>
<translation type="unfinished"></translation>
<translation>Использовать легкий шахматный узор</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="127"/>
<source>Loop the loaded gallery</source>
<translation type="unfinished"></translation>
<translation>Зациклить загруженную галерею</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="128"/>
<source>Auto long image mode</source>
<translation type="unfinished"></translation>
<translation>Режим автоматического увеличения изображения</translation>
</message>
<message>
<location filename="../settingsdialog.cpp" line="129"/>
@@ -886,7 +886,7 @@
<message>
<location filename="../shortcutedit.cpp" line="104"/>
<source>No shortcuts</source>
<translation type="unfinished"></translation>
<translation>Нет ярлыков</translation>
</message>
</context>
<context>
@@ -894,7 +894,7 @@
<message>
<location filename="../shortcutedit.cpp" line="70"/>
<source>Shortcut #%1</source>
<translation type="unfinished"></translation>
<translation>Ярлык #%1</translation>
</message>
</context>
<context>
@@ -907,7 +907,7 @@
<message>
<location filename="../main.cpp" line="45"/>
<source>List supported image format suffixes, and quit program.</source>
<translation type="unfinished"></translation>
<translation>Вывести список поддерживаемых суффиксов форматов изображений и завершить работу программы.</translation>
</message>
<message>
<location filename="../main.cpp" line="49"/>

View File

@@ -12,7 +12,7 @@ environment:
QTDIR: C:\Qt\6.8\mingw_64
MINGW64: C:\Qt\mingw_64\Tools\mingw1310_64
KF_BRANCH: master
EXIV2_VERSION: "0.28.5"
EXIV2_VERSION: "0.28.7"
EXIV2_CMAKE_OPTIONS: "-DEXIV2_ENABLE_BROTLI=OFF -DEXIV2_ENABLE_INIH=OFF -DEXIV2_BUILD_EXIV2_COMMAND=OFF"
PPIC_CMAKE_OPTIONS: "-DPREFER_QT_5=OFF"
WINDEPLOYQT_ARGS: "--verbose=2 --no-quick-import --no-translations --no-opengl-sw --no-system-d3d-compiler --skip-plugin-types tls,networkinformation"
@@ -96,9 +96,9 @@ build_script:
- cd %APPVEYOR_BUILD_FOLDER%
# build libexpat for libexiv2
- cd %LIBEXPAT%
- curl -fsSL -o R_2_6_2.zip https://github.com/libexpat/libexpat/archive/R_2_6_2.zip
- 7z x R_2_6_2.zip -y
- cd libexpat-R_2_6_2/expat/
- curl -fsSL -o R_2_7_3.zip https://github.com/libexpat/libexpat/archive/R_2_7_3.zip
- 7z x R_2_7_3.zip -y
- cd libexpat-R_2_7_3/expat/
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DEXPAT_BUILD_EXAMPLES=OFF -DEXPAT_BUILD_TESTS=OFF -DEXPAT_BUILD_TOOLS=OFF
- cmake --build . --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
@@ -143,7 +143,7 @@ build_script:
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\aom\LICENSE License.aom.txt
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\karchive\LICENSES\LGPL-2.0-or-later.txt License.KArchive.txt
- copy %APPVEYOR_BUILD_FOLDER%\3rdparty\kimageformats\LICENSES\LGPL-2.1-or-later.txt License.kimageformats.txt
- copy %LIBEXPAT%\libexpat-R_2_6_2\expat\COPYING License.expat.txt
- copy %LIBEXPAT%\libexpat-R_2_7_3\expat\COPYING License.expat.txt
- copy %LIBAVIF%\libavif-1.3.0\LICENSE License.libavif.txt
- copy %LIBEXIV2%\exiv2-%EXIV2_VERSION%\COPYING License.exiv2.txt
# TODO: Qt, zlib

View File

@@ -81,6 +81,28 @@
</screenshot>
</screenshots>
<releases>
<release type="stable" version="1.3.0" date="2025-12-20T00:00:00Z">
<description>
<p>This release adds the following features:</p>
<ul>
<li>New option to limit SVG support to SVG Tiny 1.2 standard</li>
<li>Windows: ship tools and configurations that help user associate image files to this program</li>
</ul>
<p>This release fixes the following bugs:</p>
<ul>
<li>Fix window not appear at the screen that the mouse cursor is at</li>
<li>Fix Windows prebuilt binary having AVIF plugin included but not actually support it</li>
</ul>
<p>This release includes the following changes:</p>
<ul>
<li>CPack DEB: will now recommend "kimageformat6-plugins" instead of the KF5 version</li>
<li>Update translations</li>
<li>Update exiv2 version for Windows binary build</li>
</ul>
<p>With contributions from:</p>
<p>VenusGirl, Andrey</p>
</description>
</release>
<release type="stable" version="1.2.1" date="2025-11-22T00:00:00Z">
<description>
<p>This release fixes the following bug:</p>

BIN
dist/passoc/generic.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

BIN
dist/passoc/gif.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
dist/passoc/jpeg.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
dist/passoc/png.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

118
dist/passoc/ppic.pacfg vendored Normal file
View File

@@ -0,0 +1,118 @@
targetApp=ppic.exe
friendlyAppName=Pineapple Pictures
friendlyAppName[zh_CN]=菠萝看图
openCommand="\"{targetAppFullPath}\" \"%1\""
[ProgId/jpeg]
name=JPEG Image
name[zh_CN]=JPEG 图像
extensions=jpg,jpeg,jfif
[ProgId/gif]
name=GIF Animation Image
name[zh_CN]=GIF 动图
[ProgId/png]
name=PNG Image
name[zh_CN]=PNG 图像
[ProgId/svg]
name=Scalable Vector Graphics
name[zh_CN]=可缩放矢量图像
[ProgId/webp]
name=WebP Image
name[zh_CN]=WebP 图像
extensions=webp
[ProgId/avif]
name=AV1 Image File
name[zh_CN]=AV1 图像文件
[ProgId/ico]
name=Windows Icon Image
name[zh_CN]=Windows 图标图像
[ProgId/icns]
name=Apple Icon Image
name[zh_CN]=苹果图标图像
[ProgId/psd]
name=Photoshop Document
name[zh_CN]=Photoshop 文档
extensions=psd,psb,pdd,psdt
[ProgId/kra]
name=Krita Document
name[zh_CN]=Krita 文档
[ProgId/xcf]
name=GIMP Document
name[zh_CN]=GIMP 文档
[ProgId/tga]
name=TARGA Image
name[zh_CN]=TARGA 图像
[ProgId/tif]
name=Tagged Image File Format
name[zh_CN]=标签图像文件格式
extensions=tif,tiff
[ProgId/bmp]
name=Bitmap
name[zh_CN]=位图
[ProgId/wbmp]
name=Wireless Bitmap
name[zh_CN]=无线位图
[ProgId/dds]
name=DirectDraw Surface
[ProgId/hdr]
name=High Dynamic Range Image
name[zh_CN]=高动态范围图像
[ProgId/iff]
name=Interchange File Format
name[zh_CN]=可交换文件格式
[ProgId/pic]
name=Softimage Picture
name[zh_CN]=Softimage 图像
[ProgId/pcx]
name=PiCture eXchange PC Paintbrush Image
name[zh_CN]=PC Paintbrush 图像
[ProgId/qoi]
name=Quite OK Image
name[zh_CN]=挺 OK 图像
[ProgId/ras]
name=Sun Raster Image
name[zh_CN]=Sun 栅格图象
extensions=ras,sun
[ProgId/ora]
name=OpenRaster Image
name[zh_CN]=OpenRaster 图象
[ProgId/ani]
name=Animated Cursor
name[zh_CN]=动态光标
[ProgId/pfm]
name=Portable Float Map
extensions=pfm,phm
[ProgId/rgb]
name=Silicon Graphics Image
extensions=rgb,rgba,bw,sgi
[ProgId/pxr]
name=Pixar Raster Image
[ProgId/sct]
name=Scitex Continuous Tone

BIN
dist/passoc/psd.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
dist/passoc/svg.ico vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -87,7 +87,7 @@ RESOURCES += \
assets/resources.qrc
# Generate from svg:
# magick convert -density 512x512 -background none app-icon.svg -define icon:auto-resize app-icon.ico
# magick -density 512x512 -background none app-icon.svg -define icon:auto-resize app-icon.ico
RC_ICONS = assets/icons/app-icon.ico
# Windows only, for rc file (we're not going to use the .rc file in this repo)