Compare commits

...
10 Commits
Author SHA1 Message Date
yyc12345 fe56bfaf73 revert: remove passoc support on Windows.
- remove passoc executable support on Windows.
- but preserve the icons created by upstream for future expanding.
2026-07-02 15:43:58 +08:00
yyc12345 769fe378e8 ci: remove deepin 25 support
This partially reverts commit afcd126c00.

This fork do not need to preserve the support to deepin.
So I simply remove its CI.
2026-07-02 15:36:35 +08:00
yyc12345 54a1c8542f revert: revert feature about saving image as new file with different format.
This reverts commit 5b2255e903.

The feature about saving image as new file with different format is not the goal of an image viewer.
There is no need to keep feature diversity in this fork.
So I simply remove it.
2026-07-02 15:09:54 +08:00
yyc12345 f0bb945c7d doc: update README
- update README to notice the development of SarasaCW Picture.
- temporarily remove the most of old README by HTML comment syntax. these contents will be restored and fixed once I finish refactoring.
2026-07-02 14:44:01 +08:00
yyc12345 870e472f53 ci: remove appveyor config file
- all build work are passing by github. there is no need to keep appvoyer config file.
2026-07-02 14:43:42 +08:00
yyc12345 76677381de build: remove QMake project file
- remove QMake project file. it is already deprecated in original repository. all build should be run as CMake project.
2026-07-02 14:43:20 +08:00
blumiaandyyc12345 d2bd521ad0 fix: show empty url list doesn't reset window title 2026-07-02 14:41:56 +08:00
blumiaandyyc12345 265e894b3f fix(CI): Windows build FTBFS 2026-07-02 14:41:42 +08:00
blumiaandyyc12345 6339a93c6c feat(Windows): open window will be able to use system animation 2026-07-02 14:39:33 +08:00
6da53ced81 i18n: Translations update from Hosted Weblate
Co-authored-by: VenusGirl <VenusGirl@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/pineapple-pictures/application/ko/
Translation: pineapple-pictures/Application
2026-06-29 19:18:11 +08:00
15 changed files with 68 additions and 513 deletions
-35
View File
@@ -1,35 +0,0 @@
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@v6
- 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@v6
with:
name: deepin-25-deb-package
path: build/*.deb
+1 -5
View File
@@ -79,7 +79,7 @@ jobs:
ren .\exiv2-0.28.7-2022msvc-AMD64 dependencies_bin ren .\exiv2-0.28.7-2022msvc-AMD64 dependencies_bin
echo ::endgroup:: echo ::endgroup::
echo ::group::===== zlib ===== echo ::group::===== zlib =====
curl -fsSL -o zlib_src.zip https://zlib.net/zlib132.zip curl -fsSL -o zlib_src.zip https://github.com/madler/zlib/releases/download/v1.3.2/zlib132.zip
7z x zlib_src.zip -y -o"dependencies_src" 7z x zlib_src.zip -y -o"dependencies_src"
ren .\dependencies_src\zlib-1.3.2 zlib || goto :error ren .\dependencies_src\zlib-1.3.2 zlib || goto :error
cmake ./dependencies_src/zlib -Bbuild_dependencies/zlib -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error cmake ./dependencies_src/zlib -Bbuild_dependencies/zlib -DCMAKE_INSTALL_PREFIX="dependencies_bin" || goto :error
@@ -125,10 +125,6 @@ jobs:
cmake --build build --config Release cmake --build build --config Release
cmake --install build --config Release --prefix "%PWD%\build" cmake --install build --config Release --prefix "%PWD%\build"
echo ::endgroup:: 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 ------ :: ------ pkg ------
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 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 robocopy ./dependencies_bin/bin build/bin *.dll
-6
View File
@@ -271,12 +271,6 @@ if (DEFINED QM_FILE_INSTALL_DIR)
endif() endif()
if (WIN32) if (WIN32)
install(
FILES dist/passoc/ppic.pacfg
DESTINATION ${CMAKE_INSTALL_BINDIR}
RENAME default-assoc.pacfg
)
install( install(
FILES FILES
dist/passoc/generic.ico dist/passoc/generic.ico
+16 -5
View File
@@ -1,4 +1,17 @@
Yet another image viewer. # Sarasas Chip Workshop Picture
Yet another legacy Windows Photo Viewer with cross-platform support.
> [!IMPORTANT]
> SarasaCW Picture are still in refactoring. Please do not use it until this message removes.
## Summary
Sarasas Chip Workshop Picture (abbr. SarasaCW Picture) is a lightweight image viewer that has cross-platform support and similar user interface about legacy Windows Photo Viewer. It allows you view JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, HDR, AVIF and some other frequently used image formats files quickly and easily without changing your long-term Windows usage experience.
SarasaCW Picture is the **hard fork** of [Pineapple Pictures](https://github.com/BLumia/pineapple-pictures) since Pineapple Pictures 1.4.1 version.
<!--
|CI|Build Status| |CI|Build Status|
|---|---| |---|---|
@@ -8,10 +21,6 @@ Yet another image viewer.
![Pineapple Pictures - Main Window](https://repository-images.githubusercontent.com/211888654/e8697600-e370-11eb-9b2a-b71e05262954) ![Pineapple Pictures - Main Window](https://repository-images.githubusercontent.com/211888654/e8697600-e370-11eb-9b2a-b71e05262954)
## Summary
Pineapple Pictures is a lightweight image viewer that allows you view JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, HDR, AVIF and some other frequently used image formats files quickly and easily, and also provide a Stay-on-Top window setting that allows you pin the window so you can use it to pin a reference image at the top and then you can work with other software.
## Get it! ## Get it!
### Maintained by the original author ### Maintained by the original author
@@ -71,3 +80,5 @@ It's possible to build it under Windows, Linux, macOS, and maybe other desktop p
## License ## License
Pineapple Pictures as a whole is licensed under MIT license. Individual files may have a different, but compatible license. Pineapple Pictures as a whole is licensed under MIT license. Individual files may have a different, but compatible license.
-->
+17 -4
View File
@@ -1,3 +1,18 @@
# Sarasas Chip Workshop 照片查看器
简单轻量的、具有跨平台支持的、经典样式的 Windows 照片查看器。
> [!IMPORTANT]
> SarasaCW 照片查看器还在重构中。在这条信息被移除之前请不要使用它。
## 简介
Sarasas Chip Workshop 照片查看器(简称 SarasaCW 照片查看器)是一个轻量级的图片查看器。支持跨平台。界面风格类似于经典的 Windows 照片查看器。它可以让你快速轻松地浏览 JPEG、PNG、GIF、SVG、PSD、KRA、XCF、TGA、HDR、AVIF 以及其他一些常用的图片格式,且无需改变你长期的 Windows 使用习惯。
SarasaCW 照片查看器是[菠萝看图](https://github.com/BLumia/pineapple-pictures)的**硬分叉**,该分叉自菠萝看图 1.4.1 版本开始。
<!--
简单轻量的跨平台看图工具。 简单轻量的跨平台看图工具。
|CI|构建状态| |CI|构建状态|
@@ -8,10 +23,6 @@
![Pineapple Pictures - Main Window](https://repository-images.githubusercontent.com/211888654/e8697600-e370-11eb-9b2a-b71e05262954) ![Pineapple Pictures - Main Window](https://repository-images.githubusercontent.com/211888654/e8697600-e370-11eb-9b2a-b71e05262954)
## 简介
菠萝看图是一个轻量图像查看器,允许你简单快捷的查看 JPEG, PNG, GIF, SVG, PSD, KRA, XCF, TGA, HDR, AVIF 等常用格式的图像文件,并提供了置顶窗口的选项以便你在使用其它软件时也可以将参考图片固定在顶端。
## 立即获取! ## 立即获取!
### 由原作者维护 ### 由原作者维护
@@ -72,3 +83,5 @@ $ cmake --build . # 如果你使用 Makefile 作为 CMake 生成器,也可以
## 许可协议 ## 许可协议
菠萝看图整体使用 MIT 协议进行发布。项目所随的部分源文件可能具备不同但与之兼容的许可协议。 菠萝看图整体使用 MIT 协议进行发布。项目所随的部分源文件可能具备不同但与之兼容的许可协议。
-->
-2
View File
@@ -55,7 +55,6 @@ void ActionManager::setupAction(MainWindow *mainWindow)
CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame); CREATE_NEW_ACTION(mainWindow, actionAnimationNextFrame);
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open); CREATE_NEW_THEMEICON_ACTION(mainWindow, actionOpen, document-open);
CREATE_NEW_THEMEICON_ACTION(mainWindow, actionSaveAs, document-save-as);
CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip); CREATE_NEW_ACTION(mainWindow, actionHorizontalFlip);
CREATE_NEW_ACTION(mainWindow, actionFitInView); CREATE_NEW_ACTION(mainWindow, actionFitInView);
CREATE_NEW_ACTION(mainWindow, actionFitByWidth); CREATE_NEW_ACTION(mainWindow, actionFitByWidth);
@@ -85,7 +84,6 @@ void ActionManager::retranslateUi(MainWindow *mainWindow)
Q_UNUSED(mainWindow); Q_UNUSED(mainWindow);
actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open...", nullptr)); actionOpen->setText(QCoreApplication::translate("MainWindow", "&Open...", nullptr));
actionSaveAs->setText(QCoreApplication::translate("MainWindow", "Save &As...", nullptr));
actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr)); actionActualSize->setText(QCoreApplication::translate("MainWindow", "Actual size", nullptr));
actionToggleMaximize->setText(QCoreApplication::translate("MainWindow", "Toggle maximize", nullptr)); actionToggleMaximize->setText(QCoreApplication::translate("MainWindow", "Toggle maximize", nullptr));
-1
View File
@@ -23,7 +23,6 @@ public:
public: public:
QAction *actionOpen; QAction *actionOpen;
QAction *actionSaveAs;
QAction *actionActualSize; QAction *actionActualSize;
QAction *actionToggleMaximize; QAction *actionToggleMaximize;
+24
View File
@@ -11,6 +11,22 @@
#include <QVBoxLayout> #include <QVBoxLayout>
#include <QWindow> #include <QWindow>
#ifdef Q_OS_WIN
#include "windows.h"
void fixWindowStyle(QWidget * that)
{
HWND hwnd = (HWND)that->winId();
LONG style = GetWindowLong(hwnd, GWL_STYLE);
style |= WS_THICKFRAME | WS_CAPTION | WS_MAXIMIZEBOX | WS_MINIMIZEBOX | WS_SYSMENU;
SetWindowLong(hwnd, GWL_STYLE, style);
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0,
SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE |
SWP_NOZORDER | SWP_NOACTIVATE);
}
#endif
FramelessWindow::FramelessWindow(QWidget *parent) FramelessWindow::FramelessWindow(QWidget *parent)
: QWidget(parent) : QWidget(parent)
, m_centralLayout(new QVBoxLayout(this)) , m_centralLayout(new QVBoxLayout(this))
@@ -41,6 +57,14 @@ void FramelessWindow::installResizeCapture(QObject* widget)
widget->installEventFilter(this); widget->installEventFilter(this);
} }
void FramelessWindow::showEvent(QShowEvent *event)
{
#ifdef Q_OS_WIN
fixWindowStyle(this);
#endif // Q_OS_WIN
return QWidget::showEvent(event);
}
bool FramelessWindow::eventFilter(QObject* o, QEvent* e) bool FramelessWindow::eventFilter(QObject* o, QEvent* e)
{ {
switch (e->type()) { switch (e->type()) {
+3
View File
@@ -20,6 +20,9 @@ public:
void setCentralWidget(QWidget * widget); void setCentralWidget(QWidget * widget);
void installResizeCapture(QObject* widget); void installResizeCapture(QObject* widget);
protected slots:
void showEvent(QShowEvent *event) override;
protected: protected:
bool eventFilter(QObject *o, QEvent *e) override; bool eventFilter(QObject *o, QEvent *e) override;
bool mouseHover(QHoverEvent* event, QWidget* wg); bool mouseHover(QHoverEvent* event, QWidget* wg);
+1 -71
View File
@@ -38,7 +38,6 @@
#include <QProcess> #include <QProcess>
#include <QDesktopServices> #include <QDesktopServices>
#include <QMessageBox> #include <QMessageBox>
#include <QImageWriter>
#ifdef HAVE_QTDBUS #ifdef HAVE_QTDBUS
#include <QDBusInterface> #include <QDBusInterface>
@@ -291,6 +290,7 @@ void MainWindow::galleryCurrent(bool showLoadImageHintWhenEmpty, bool reloadImag
setWindowTitle(m_pm->urlByIndex(index).fileName()); setWindowTitle(m_pm->urlByIndex(index).fileName());
} else if (showLoadImageHintWhenEmpty && m_pm->totalCount() <= 0) { } else if (showLoadImageHintWhenEmpty && m_pm->totalCount() <= 0) {
m_graphicsView->showText(QCoreApplication::translate("GraphicsScene", "Drag image here")); m_graphicsView->showText(QCoreApplication::translate("GraphicsScene", "Drag image here"));
setWindowTitle(QString());
} }
updateGalleryButtonsVisibility(); updateGalleryButtonsVisibility();
@@ -505,12 +505,6 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event)
menu->addAction(paste); menu->addAction(paste);
} }
#if 0
if (currentFileUrl.isValid()) {
menu->addAction(m_am->actionSaveAs);
}
#endif // 0
menu->addSeparator(); menu->addSeparator();
menu->addAction(m_am->actionHorizontalFlip); menu->addAction(m_am->actionHorizontalFlip);
@@ -703,70 +697,6 @@ void MainWindow::on_actionOpen_triggered()
} }
} }
void MainWindow::on_actionSaveAs_triggered()
{
QUrl currentFileUrl = currentImageFileUrl();
if (!currentFileUrl.isValid()) {
QMessageBox::warning(this, tr("Save As"), tr("No image is currently open."));
return;
}
QStringList supportedFormats;
QStringList nameFilters;
const QList<QByteArray> imageFormats = QImageWriter::supportedImageFormats();
for (const QByteArray &format : imageFormats) {
QString formatStr = QString::fromLatin1(format).toLower();
if (!formatStr.isEmpty()) {
supportedFormats << formatStr;
nameFilters << tr("%1 Image (*.%2)").arg(formatStr.toUpper(), formatStr);
}
}
if (imageFormats.isEmpty()) {
QMessageBox::warning(this, tr("Save As"),
tr("No supported image formats are available."));
return;
}
QString selectedFilter;
QString saveFilePath = QFileDialog::getSaveFileName(this,
tr("Save As"),
QStandardPaths::writableLocation(QStandardPaths::PicturesLocation),
nameFilters.join(";;"),
&selectedFilter);
if (saveFilePath.isEmpty()) {
return; // User cancelled
}
// Ensure the file has the correct extension
QString expectedExtension;
const int filterIndex = nameFilters.indexOf(selectedFilter);
if (filterIndex != -1) {
expectedExtension = supportedFormats.at(filterIndex);
}
if (!expectedExtension.isEmpty() && !saveFilePath.endsWith('.' + expectedExtension, Qt::CaseInsensitive)) {
saveFilePath += '.' + expectedExtension;
}
// Save the image
QImageReader imageReader(currentFileUrl.toLocalFile());
imageReader.setAutoTransform(true);
imageReader.setDecideFormatFromContent(true);
imageReader.setAllocationLimit(0);
QImage img(imageReader.read());
QImageWriter writer(saveFilePath);
writer.setFormat(expectedExtension.toLatin1());
if (!writer.write(img)) {
QMessageBox::warning(this, tr("Save As"),
tr("Failed to save image: %1").arg(writer.errorString()));
return;
}
}
void MainWindow::on_actionActualSize_triggered() void MainWindow::on_actionActualSize_triggered()
{ {
m_graphicsView->resetScale(); m_graphicsView->resetScale();
-1
View File
@@ -75,7 +75,6 @@ protected:
private slots: private slots:
void on_actionOpen_triggered(); void on_actionOpen_triggered();
void on_actionSaveAs_triggered();
void on_actionActualSize_triggered(); void on_actionActualSize_triggered();
void on_actionToggleMaximize_triggered(); void on_actionToggleMaximize_triggered();
+6 -6
View File
@@ -236,27 +236,27 @@
<location filename="../mainwindow.cpp" line="734"/> <location filename="../mainwindow.cpp" line="734"/>
<location filename="../mainwindow.cpp" line="764"/> <location filename="../mainwindow.cpp" line="764"/>
<source>Save As</source> <source>Save As</source>
<translation type="unfinished"></translation> <translation> </translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="710"/> <location filename="../mainwindow.cpp" line="710"/>
<source>No image is currently open.</source> <source>No image is currently open.</source>
<translation type="unfinished"></translation> <translation> .</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="722"/> <location filename="../mainwindow.cpp" line="722"/>
<source>%1 Image (*.%2)</source> <source>%1 Image (*.%2)</source>
<translation type="unfinished"></translation> <translation>%1 (*.%2)</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="728"/> <location filename="../mainwindow.cpp" line="728"/>
<source>No supported image formats are available.</source> <source>No supported image formats are available.</source>
<translation type="unfinished"></translation> <translation> .</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="765"/> <location filename="../mainwindow.cpp" line="765"/>
<source>Failed to save image: %1</source> <source>Failed to save image: %1</source>
<translation type="unfinished"></translation> <translation> : %1</translation>
</message> </message>
<message> <message>
<location filename="../mainwindow.cpp" line="854"/> <location filename="../mainwindow.cpp" line="854"/>
@@ -320,7 +320,7 @@
<message> <message>
<location filename="../actionmanager.cpp" line="88"/> <location filename="../actionmanager.cpp" line="88"/>
<source>Save &amp;As...</source> <source>Save &amp;As...</source>
<translation type="unfinished"></translation> <translation> (&amp;A)...</translation>
</message> </message>
<message> <message>
<location filename="../actionmanager.cpp" line="93"/> <location filename="../actionmanager.cpp" line="93"/>
-158
View File
@@ -1,158 +0,0 @@
image:
- Visual Studio 2022
environment:
CMAKE_INSTALL_PREFIX: C:\projects\cmake
LIBZ: C:\projects\zlib
LIBEXPAT: C:\projects\libexpat
LIBAVIF: C:\projects\libavif
LIBEXIV2: C:\projects\exiv2
PPKG: C:\projects\ppkg
matrix:
- job_name: mingw_64_qt6_8
QTDIR: C:\Qt\6.8\mingw_64
MINGW64: C:\Qt\mingw_64\Tools\mingw1310_64
KF_BRANCH: v6.24.0
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"
install:
- mkdir %CMAKE_INSTALL_PREFIX%
- mkdir %LIBZ%
- mkdir %LIBEXPAT%
- mkdir %LIBAVIF%
- mkdir %LIBEXIV2%
- mkdir %PPKG%
- cd %APPVEYOR_BUILD_FOLDER%
- git submodule update --init --recursive
- set PATH=%PATH%;%CMAKE_INSTALL_PREFIX%;%QTDIR%\bin;%MINGW64%\bin;%PPKG%
- set CC=%MINGW64%\bin\gcc.exe
- set CXX=%MINGW64%\bin\g++.exe
build_script:
# prepare
- mkdir 3rdparty
- choco install ninja
- cd %PPKG%
- curl -fsSL -o ppkg.exe https://github.com/BLumia/pineapple-package-manager/releases/latest/download/ppkg.exe
- cd %APPVEYOR_BUILD_FOLDER%
# download and install zlib for KArchive
- cd %LIBZ%
- curl -fsSL -o zlib132.zip https://zlib.net/zlib132.zip
- 7z x zlib132.zip -y
- cd zlib-1.3.2
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# install ECM so we can build KImageFormats
- cd 3rdparty
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/extra-cmake-modules.git
- git rev-parse HEAD
- cd extra-cmake-modules
- cmake -G "Ninja" . -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DBUILD_TESTING=OFF
- cmake --build .
- cmake --build . --target install
- cd %APPVEYOR_BUILD_FOLDER%
# install AOM for libavif AV1 decoding support...
- cd 3rdparty
#- git clone -b v3.9.1 --depth 1 https://aomedia.googlesource.com/aom
#- cd aom
#- mkdir build.aom
#- cd build.aom
#- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DENABLE_DOCS=OFF -DBUILD_SHARED_LIBS=ON -DAOM_TARGET_CPU=generic -DENABLE_TESTS=OFF -DENABLE_TESTDATA=OFF -DENABLE_TOOLS=OFF -DENABLE_EXAMPLES=0
#- cmake --build . --config Release
#- cmake --build . --config Release --target install/strip
- mkdir aom
- cd aom
- curl -fsSL -o ppkg-aom.zip https://sourceforge.net/projects/pineapple-package-manager/files/packages/mingw-w64-x86_64-windows/aom-3.9.1-2.zip
- ppkg ppkg-aom.zip
- 7z x ppkg-aom.zip LICENSE -y
- cd %APPVEYOR_BUILD_FOLDER%
# install libavif for avif format support of KImageFormats
- cd %LIBAVIF%
- curl -fsSL -o libavif-v1_3_0.zip https://github.com/AOMediaCodec/libavif/archive/v1.3.0.zip
- 7z x libavif-v1_3_0.zip -y
- cd libavif-1.3.0
- mkdir build
- cd build
- cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% -DAVIF_CODEC_AOM=SYSTEM -DAVIF_CODEC_AOM_DECODE=ON -DAVIF_CODEC_AOM_ENCODE=ON -DAVIF_LIBYUV=LOCAL
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# install KArchive for kra format support of KImageFormats
- cd 3rdparty
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/karchive.git
- git rev-parse HEAD
- cd karchive
- mkdir build
- cd build
- cmake .. -G "Ninja" -DBUILD_TESTING=OFF -DWITH_LIBZSTD=OFF -DWITH_BZIP2=OFF -DWITH_LIBLZMA=OFF -DWITH_OPENSSL=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX%
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# build libexpat for libexiv2
- cd %LIBEXPAT%
- 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%
# build libexiv2
- cd %LIBEXIV2%
- curl -fsSL -o v%EXIV2_VERSION%.zip https://github.com/Exiv2/exiv2/archive/v%EXIV2_VERSION%.zip
- 7z x v%EXIV2_VERSION%.zip -y
- cd exiv2-%EXIV2_VERSION%
- cmake -G "Ninja" . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%CMAKE_INSTALL_PREFIX% %EXIV2_CMAKE_OPTIONS%
- cmake --build . --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# install KImageFormats
- cd 3rdparty
- git clone -b %KF_BRANCH% -q https://invent.kde.org/frameworks/kimageformats.git
- git rev-parse HEAD
- cd kimageformats
- mkdir build
- cd build
- cmake .. -G "Ninja" -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DKDE_INSTALL_QTPLUGINDIR=%QTDIR%\plugins
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
- cd %APPVEYOR_BUILD_FOLDER%
# finally...
- mkdir build
- cd build
- cmake .. -G "Ninja" %PPIC_CMAKE_OPTIONS% -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%CMAKE_INSTALL_PREFIX% -DCMAKE_INSTALL_PREFIX='%cd%'
- cmake --build . --config Release
- cmake --build . --config Release --target install/strip
# fixme: I don't know how to NOT make the binary installed to the ./bin/ folder...
- cd bin
- copy %APPVEYOR_BUILD_FOLDER%\LICENSE
- copy %CMAKE_INSTALL_PREFIX%\bin\libaom.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libexpat-1.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libexiv2.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libavif.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libz.dll
- copy %CMAKE_INSTALL_PREFIX%\bin\libKF?Archive.dll
- windeployqt %WINDEPLOYQT_ARGS% .\ppic.exe
# copy 3rdparty licenses for the libs we vendored for windows...
- mkdir licenses
- cd licenses
- 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_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
- cd ..
# for debug..
- tree /f
- cd %APPVEYOR_BUILD_FOLDER%
- xcopy %CMAKE_INSTALL_PREFIX% .\cmake-prefix-copy /E /H /C /I
artifacts:
- path: build\bin
- path: cmake-prefix-copy
-118
View File
@@ -1,118 +0,0 @@
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
-101
View File
@@ -1,101 +0,0 @@
# SPDX-FileCopyrightText: 2025 Gary Wang <git@blumia.net>
#
# SPDX-License-Identifier: MIT
QT += core widgets gui svg svgwidgets
TARGET = ppic
TEMPLATE = app
DEFINES += PPIC_VERSION_STRING=\\\"x.y.z\\\"
win32 {
DEFINES += FLAG_PORTABLE_MODE_SUPPORT=1
}
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++17 lrelease embed_translations
SOURCES += \
app/aboutdialog.cpp \
app/main.cpp \
app/framelesswindow.cpp \
app/mainwindow.cpp \
app/graphicsview.cpp \
app/bottombuttongroup.cpp \
app/graphicsscene.cpp \
app/navigatorview.cpp \
app/opacityhelper.cpp \
app/toolbutton.cpp \
app/settings.cpp \
app/settingsdialog.cpp \
app/metadatamodel.cpp \
app/metadatadialog.cpp \
app/exiv2wrapper.cpp \
app/actionmanager.cpp \
app/playlistmanager.cpp \
app/shortcutedit.cpp \
app/fileopeneventhandler.cpp
HEADERS += \
app/aboutdialog.h \
app/framelesswindow.h \
app/mainwindow.h \
app/graphicsview.h \
app/bottombuttongroup.h \
app/graphicsscene.h \
app/navigatorview.h \
app/opacityhelper.h \
app/toolbutton.h \
app/settings.h \
app/settingsdialog.h \
app/metadatamodel.h \
app/metadatadialog.h \
app/exiv2wrapper.h \
app/actionmanager.h \
app/playlistmanager.h \
app/shortcutedit.h \
app/fileopeneventhandler.h
TRANSLATIONS = \
app/translations/PineapplePictures_en.ts \
app/translations/PineapplePictures_zh_CN.ts \
app/translations/PineapplePictures_de.ts \
app/translations/PineapplePictures_es.ts \
app/translations/PineapplePictures_fr.ts \
app/translations/PineapplePictures_nb_NO.ts \
app/translations/PineapplePictures_nl.ts \
app/translations/PineapplePictures_ru.ts \
app/translations/PineapplePictures_si.ts \
app/translations/PineapplePictures_id.ts
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
RESOURCES += \
assets/resources.qrc
# Generate from svg:
# 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)
QMAKE_TARGET_PRODUCT = Pineapple Pictures
QMAKE_TARGET_DESCRIPTION = Pineapple Pictures - Image Viewer
QMAKE_TARGET_COPYRIGHT = MIT/Expat License - Copyright (C) 2024 Gary Wang
# MSVC only, since QMake doesn't have a CMAKE_CXX_STANDARD_LIBRARIES or cpp_winlibs similar thing
win32-msvc* {
LIBS += -luser32
}