From cdfa8b78a49192b505227679c4e1440043e21255 Mon Sep 17 00:00:00 2001 From: Gary Wang Date: Wed, 3 Dec 2025 00:10:42 +0800 Subject: [PATCH] feat(Windows): install passoc default config file --- CMakeLists.txt | 8 +++ dist/passoc/ppic.pacfg | 110 +++++++++++++++++++++++++++++++++++++++++ pineapple-pictures.pro | 2 +- 3 files changed, 119 insertions(+), 1 deletion(-) create mode 100644 dist/passoc/ppic.pacfg diff --git a/CMakeLists.txt b/CMakeLists.txt index 74cdd1f..5f7a825 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,6 +270,14 @@ if (DEFINED QM_FILE_INSTALL_DIR) ) endif() +if (WIN32) + install( + FILES dist/passoc/ppic.pacfg + DESTINATION ${CMAKE_INSTALL_BINDIR} + RENAME default-assoc.pacfg + ) +endif() + feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) # CPACK: General Settings diff --git a/dist/passoc/ppic.pacfg b/dist/passoc/ppic.pacfg new file mode 100644 index 0000000..7c7a437 --- /dev/null +++ b/dist/passoc/ppic.pacfg @@ -0,0 +1,110 @@ +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/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 diff --git a/pineapple-pictures.pro b/pineapple-pictures.pro index ae31466..b18d11d 100644 --- a/pineapple-pictures.pro +++ b/pineapple-pictures.pro @@ -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)