Compare commits

...

4 Commits

Author SHA1 Message Date
nou cb1237cbc4 Fix Info.plist 2026-05-08 11:42:54 +02:00
nou dbc9baba13 Fix Info.plist icon 2026-05-08 09:09:55 +02:00
nou bd99501616 Add support for open with on MacOS 2026-05-08 08:44:46 +02:00
nou fccbf4d810 Update icons 2026-05-05 19:12:32 +02:00
17 changed files with 106 additions and 8 deletions
+10 -1
View File
@@ -29,6 +29,7 @@ add_subdirectory(libXISF)
set(TENMON_SRC set(TENMON_SRC
src/about.cpp src/about.h src/about.cpp src/about.h
src/application.cpp src/application.h
src/batchprocessing.cpp src/batchprocessing.h src/batchprocessing.ui src/batchprocessing.cpp src/batchprocessing.h src/batchprocessing.ui
src/chartgraph.h src/chartgraph.cpp src/chartgraph.h src/chartgraph.cpp
src/database.cpp src/database.h src/database.cpp src/database.h
@@ -74,6 +75,9 @@ elseif(APPLE)
set(tenmon_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/tenmon.icns) set(tenmon_ICON ${CMAKE_CURRENT_SOURCE_DIR}/resources/tenmon.icns)
find_package(Qt6 COMPONENTS DBus REQUIRED) find_package(Qt6 COMPONENTS DBus REQUIRED)
set_source_files_properties(${tenmon_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") set_source_files_properties(${tenmon_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
set(MACOSX_BUNDLE_ICON_FILE "tenmon.icns")
set(MACOSX_BUNDLE_BUNDLE_NAME "tenmon")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "space.nouspiro.tenmon")
else() else()
set(tenmon_ICON "") set(tenmon_ICON "")
find_package(Qt6 COMPONENTS DBus REQUIRED) find_package(Qt6 COMPONENTS DBus REQUIRED)
@@ -112,6 +116,7 @@ endif(STELLARSOLVER_INCLUDE AND STELLARSOLVER_LIB)
target_link_libraries(tenmon PRIVATE Qt6::Widgets Qt6::Sql Qt6::OpenGLWidgets Qt6::Qml Qt6::Charts Qt6::Svg ${EXIF_LIB} ${FITS_LIB} ${RAW_LIB} ${WCS_LIB} ${LCMS2_LIB} XISF) target_link_libraries(tenmon PRIVATE Qt6::Widgets Qt6::Sql Qt6::OpenGLWidgets Qt6::Qml Qt6::Charts Qt6::Svg ${EXIF_LIB} ${FITS_LIB} ${RAW_LIB} ${WCS_LIB} ${LCMS2_LIB} XISF)
if(APPLE) if(APPLE)
target_link_libraries(tenmon PRIVATE Qt6::DBus "-framework CoreFoundation") target_link_libraries(tenmon PRIVATE Qt6::DBus "-framework CoreFoundation")
set_target_properties(tenmon PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in")
elseif(UNIX) elseif(UNIX)
target_link_libraries(tenmon PRIVATE Qt6::DBus) target_link_libraries(tenmon PRIVATE Qt6::DBus)
endif(APPLE) endif(APPLE)
@@ -134,8 +139,12 @@ if(UNIX AND NOT APPLE)
install(SCRIPT install.cmake) install(SCRIPT install.cmake)
else() else()
install(FILES space.nouspiro.tenmon.desktop DESTINATION "${CMAKE_INSTALL_DATADIR}/applications") install(FILES space.nouspiro.tenmon.desktop DESTINATION "${CMAKE_INSTALL_DATADIR}/applications")
install(FILES resources/space.nouspiro.tenmon.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps") install(FILES resources/space.nouspiro.tenmon_16.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/16x16/apps" RENAME space.nouspiro.tenmon.png)
install(FILES resources/space.nouspiro.tenmon_32.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/32x32/apps" RENAME space.nouspiro.tenmon.png)
install(FILES resources/space.nouspiro.tenmon_64.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/64x64/apps" RENAME space.nouspiro.tenmon.png)
install(FILES resources/space.nouspiro.tenmon_128.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps" RENAME space.nouspiro.tenmon.png) install(FILES resources/space.nouspiro.tenmon_128.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/128x128/apps" RENAME space.nouspiro.tenmon.png)
install(FILES resources/space.nouspiro.tenmon_256.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/256x256/apps" RENAME space.nouspiro.tenmon.png)
install(FILES resources/space.nouspiro.tenmon_512.png DESTINATION "${CMAKE_INSTALL_DATADIR}/icons/hicolor/512x512/apps" RENAME space.nouspiro.tenmon.png)
install(FILES space.nouspiro.tenmon.xisf.xml DESTINATION "${CMAKE_INSTALL_DATADIR}/mime/packages") install(FILES space.nouspiro.tenmon.xisf.xml DESTINATION "${CMAKE_INSTALL_DATADIR}/mime/packages")
endif() endif()
install(FILES space.nouspiro.tenmon.metainfo.xml DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo") install(FILES space.nouspiro.tenmon.metainfo.xml DESTINATION "${CMAKE_INSTALL_DATADIR}/metainfo")
+50
View File
@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>tenmon</string>
<key>CFBundleGetInfoString</key>
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
<key>CFBundleIconFile</key>
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
<key>CFBundleIdentifier</key>
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleLongVersionString</key>
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
<key>CFBundleName</key>
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
<key>CFBundleVersion</key>
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>fits</string>
<string>fit</string>
<string>xisf</string>
<string>png</string>
<string>jpg</string>
<string>jpeg</string>
<string>tiff</string>
<string>tif</string>
</array>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
</dict>
</plist>
+1 -1
View File
@@ -1,5 +1,5 @@
<table><tr> <table><tr>
<td style="padding-right:10px"><img src=":/space.nouspiro.tenmon.png"></td> <td style="padding-right:10px"><img src=":/space.nouspiro.tenmon_64.png"></td>
<td><h3>Tenmon</h3> <td><h3>Tenmon</h3>
Tenmon is FITS/XISF image viewer and converter. It also index FITS keywords.<br> Tenmon is FITS/XISF image viewer and converter. It also index FITS keywords.<br>
v@GITVERSION@ Copyright © 2026 Dušan Poizl<br><br> v@GITVERSION@ Copyright © 2026 Dušan Poizl<br><br>
+5 -1
View File
@@ -2,6 +2,10 @@ find_program(XDG-DESKTOP-MENU_EXECUTABLE xdg-desktop-menu)
find_program(XDG-ICON-RESOURCE_EXECUTABLE xdg-icon-resource) find_program(XDG-ICON-RESOURCE_EXECUTABLE xdg-icon-resource)
find_program(XDG-MIME xdg-mime) find_program(XDG-MIME xdg-mime)
execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install --novendor space.nouspiro.tenmon.desktop WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) execute_process(COMMAND ${XDG-DESKTOP-MENU_EXECUTABLE} install --novendor space.nouspiro.tenmon.desktop WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 64 resources/space.nouspiro.tenmon.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 16 resources/space.nouspiro.tenmon_16.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 32 resources/space.nouspiro.tenmon_32.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 64 resources/space.nouspiro.tenmon_64.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 128 resources/space.nouspiro.tenmon_128.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 128 resources/space.nouspiro.tenmon_128.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 256 resources/space.nouspiro.tenmon_256.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-ICON-RESOURCE_EXECUTABLE} install --novendor --size 512 resources/space.nouspiro.tenmon_512.png space.nouspiro.tenmon WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
execute_process(COMMAND ${XDG-MIME} install --novendor space.nouspiro.tenmon.xisf.xml WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) execute_process(COMMAND ${XDG-MIME} install --novendor space.nouspiro.tenmon.xisf.xml WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR})
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 1.4 MiB

+1 -1
View File
@@ -15,7 +15,7 @@
<file>bggr.png</file> <file>bggr.png</file>
<file>grbg.png</file> <file>grbg.png</file>
<file>gbrg.png</file> <file>gbrg.png</file>
<file>space.nouspiro.tenmon.png</file> <file>space.nouspiro.tenmon_64.png</file>
<file>../translations/tenmon_pt_BR.qm</file> <file>../translations/tenmon_pt_BR.qm</file>
<file alias="help">../about/help_en</file> <file alias="help">../about/help_en</file>
<file>colormap.png</file> <file>colormap.png</file>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.
+19
View File
@@ -0,0 +1,19 @@
#include "application.h"
#include <QFileOpenEvent>
Application::Application(int &argc, char **argv) : QApplication(argc, argv)
{
}
bool Application::event(QEvent *event)
{
if (event->type() == QEvent::FileOpen) {
QFileOpenEvent *openEvent = static_cast<QFileOpenEvent *>(event);
emit openFileEvent(openEvent->file());
}
return QApplication::event(event);
}
+16
View File
@@ -0,0 +1,16 @@
#ifndef APPLICATION_H
#define APPLICATION_H
#include <QApplication>
class Application : public QApplication
{
Q_OBJECT
public:
Application(int &argc, char **argv);
bool event(QEvent *event) override;
signals:
void openFileEvent(const QString &file);
};
#endif // APPLICATION_H
+4 -4
View File
@@ -1,5 +1,5 @@
#include "mainwindow.h" #include "mainwindow.h"
#include <QApplication> #include "application.h"
#include <QCommandLineParser> #include <QCommandLineParser>
#include <QSettings> #include <QSettings>
#include <QSurfaceFormat> #include <QSurfaceFormat>
@@ -102,11 +102,10 @@ int main(int argc, char *argv[])
} }
QSurfaceFormat::setDefaultFormat(format); QSurfaceFormat::setDefaultFormat(format);
Application a(argc, argv);
QApplication a(argc, argv);
a.setOrganizationName("nou"); a.setOrganizationName("nou");
a.setApplicationName("Tenmon"); a.setApplicationName("Tenmon");
a.setWindowIcon(QIcon(":/space.nouspiro.tenmon.png")); a.setWindowIcon(QIcon(":/space.nouspiro.tenmon_64.png"));
QTranslator translator; QTranslator translator;
QTranslator translator2; QTranslator translator2;
@@ -127,6 +126,7 @@ int main(int argc, char *argv[])
a.installTranslator(&translator2); a.installTranslator(&translator2);
MainWindow w; MainWindow w;
QObject::connect(&a, &Application::openFileEvent, &w, static_cast<void (MainWindow::*)(const QString&)>(&MainWindow::loadFile));
w.show(); w.show();
if(!cmd.positionalArguments().isEmpty() && !cmd.isSet("script")) if(!cmd.positionalArguments().isEmpty() && !cmd.isSet("script"))