mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
more fix for build errors - Linux
This commit is contained in:
@@ -929,7 +929,7 @@ elseif (SLIC3R_FHS)
|
|||||||
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
|
install(DIRECTORY ${SLIC3R_RESOURCES_DIR}/ DESTINATION ${SLIC3R_FHS_RESOURCES}
|
||||||
PATTERN "*/udev" EXCLUDE
|
PATTERN "*/udev" EXCLUDE
|
||||||
)
|
)
|
||||||
install(FILES src/dev-utils/platform/unix/OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
install(FILES src/dev-utils/platform/unix/com.orcaslicer.OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications)
|
||||||
foreach(SIZE 32 128 192)
|
foreach(SIZE 32 128 192)
|
||||||
install(FILES ${SLIC3R_RESOURCES_DIR}/images/OrcaSlicer_${SIZE}px.png
|
install(FILES ${SLIC3R_RESOURCES_DIR}/images/OrcaSlicer_${SIZE}px.png
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME OrcaSlicer.png
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/icons/hicolor/${SIZE}x${SIZE}/apps RENAME OrcaSlicer.png
|
||||||
@@ -938,7 +938,7 @@ elseif (SLIC3R_FHS)
|
|||||||
elseif (CMAKE_MACOSX_BUNDLE)
|
elseif (CMAKE_MACOSX_BUNDLE)
|
||||||
# install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/OrcaSlicer.app/Contents/resources")
|
# install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/OrcaSlicer.app/Contents/resources")
|
||||||
else ()
|
else ()
|
||||||
install(FILES src/dev-utils/platform/unix/OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
|
install(FILES src/dev-utils/platform/unix/com.orcaslicer.OrcaSlicer.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/resources/applications)
|
||||||
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
|
install(DIRECTORY "${SLIC3R_RESOURCES_DIR}/" DESTINATION "${CMAKE_INSTALL_PREFIX}/resources")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|||||||
@@ -327,7 +327,6 @@ modules:
|
|||||||
- | # Desktop integration files
|
- | # Desktop integration files
|
||||||
install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/OrcaSlicer.svg
|
install -Dm644 -t /app/share/icons/hicolor/scalable/apps/ resources/images/OrcaSlicer.svg
|
||||||
install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
|
install -Dm644 ${FLATPAK_ID}.metainfo.xml /app/share/metainfo/${FLATPAK_ID}.metainfo.xml
|
||||||
mv /app/share/applications/OrcaSlicer.desktop /app/share/applications/${FLATPAK_ID}.desktop
|
|
||||||
desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop
|
desktop-file-edit --set-key=Exec --set-value="entrypoint %U" /app/share/applications/${FLATPAK_ID}.desktop
|
||||||
install -Dm755 entrypoint /app/bin
|
install -Dm755 entrypoint /app/bin
|
||||||
install -Dm755 umount /app/bin
|
install -Dm755 umount /app/bin
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ chmod +x AppRun
|
|||||||
cp resources/images/@SLIC3R_APP_KEY@_192px.png @SLIC3R_APP_KEY@.png
|
cp resources/images/@SLIC3R_APP_KEY@_192px.png @SLIC3R_APP_KEY@.png
|
||||||
mkdir -p usr/share/icons/hicolor/192x192/apps
|
mkdir -p usr/share/icons/hicolor/192x192/apps
|
||||||
cp resources/images/@SLIC3R_APP_KEY@_192px.png usr/share/icons/hicolor/192x192/apps/@SLIC3R_APP_KEY@.png
|
cp resources/images/@SLIC3R_APP_KEY@_192px.png usr/share/icons/hicolor/192x192/apps/@SLIC3R_APP_KEY@.png
|
||||||
cat <<EOF > @SLIC3R_APP_KEY@.desktop
|
cat <<EOF > com.orcaslicer.@SLIC3R_APP_KEY@.desktop
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=@SLIC3R_APP_KEY@
|
Name=@SLIC3R_APP_KEY@
|
||||||
Exec=AppRun %F
|
Exec=AppRun %F
|
||||||
@@ -27,21 +27,11 @@ Categories=Utility;
|
|||||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
mkdir -p usr/share/applications
|
||||||
|
cp com.orcaslicer.@SLIC3R_APP_KEY@.desktop usr/share/applications/
|
||||||
|
|
||||||
mkdir -p usr/share/metainfo
|
mkdir -p usr/share/metainfo
|
||||||
cat <<EOF > usr/share/metainfo/@SLIC3R_APP_KEY@.appdata.xml
|
cp @CMAKE_CURRENT_SOURCE_DIR@/scripts/flatpak/com.orcaslicer.@SLIC3R_APP_KEY@.metainfo.xml usr/share/metainfo/
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<component type="desktop-application">
|
|
||||||
<id>@SLIC3R_APP_KEY@.desktop</id>
|
|
||||||
<name>@SLIC3R_APP_KEY@</name>
|
|
||||||
<summary>Open-source 3D slicer for FFF and SLA printers</summary>
|
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
|
||||||
<project_license>AGPL-3.0-or-later</project_license>
|
|
||||||
<description>
|
|
||||||
<p>OrcaSlicer prepares 3D models for printing, including printer profile management, preview tooling, and network-connected device workflows.</p>
|
|
||||||
</description>
|
|
||||||
<launchable type="desktop-id">@SLIC3R_APP_KEY@.desktop</launchable>
|
|
||||||
</component>
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
export ARCH=$(uname -m)
|
export ARCH=$(uname -m)
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ bool DesktopIntegrationDialog::is_integrated()
|
|||||||
if (path.empty())
|
if (path.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// confirmation that OrcaSlicer.desktop exists
|
// confirmation that com.orcaslicer.OrcaSlicer.desktop exists
|
||||||
struct stat buffer;
|
struct stat buffer;
|
||||||
return (stat (path.c_str(), &buffer) == 0);
|
return (stat (path.c_str(), &buffer) == 0);
|
||||||
}
|
}
|
||||||
@@ -342,13 +342,13 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
|||||||
"StartupNotify=false\n"
|
"StartupNotify=false\n"
|
||||||
"StartupWMClass=orca-slicer\n", name_suffix, version_suffix, excutable_path);
|
"StartupWMClass=orca-slicer\n", name_suffix, version_suffix, excutable_path);
|
||||||
|
|
||||||
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
std::string path = GUI::format("%1%/applications/com.orcaslicer.OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||||
if (create_desktop_file(path, desktop_file)){
|
if (create_desktop_file(path, desktop_file)){
|
||||||
BOOST_LOG_TRIVIAL(debug) << "OrcaSlicer.desktop file installation success.";
|
BOOST_LOG_TRIVIAL(debug) << "com.orcaslicer.OrcaSlicer.desktop file installation success.";
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
// write failed - try another path
|
// write failed - try another path
|
||||||
BOOST_LOG_TRIVIAL(debug) << "Attempt to OrcaSlicer.desktop file installation failed. failed path: " << target_candidates[i];
|
BOOST_LOG_TRIVIAL(debug) << "Attempt to com.orcaslicer.OrcaSlicer.desktop file installation failed. failed path: " << target_candidates[i];
|
||||||
target_dir_desktop.clear();
|
target_dir_desktop.clear();
|
||||||
}
|
}
|
||||||
// if all failed - try creating default home folder
|
// if all failed - try creating default home folder
|
||||||
@@ -357,7 +357,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
|||||||
create_path(into_u8(wxFileName::GetHomeDir()), ".local/share/applications");
|
create_path(into_u8(wxFileName::GetHomeDir()), ".local/share/applications");
|
||||||
// create desktop file
|
// create desktop file
|
||||||
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
target_dir_desktop = GUI::format("%1%/.local/share",wxFileName::GetHomeDir());
|
||||||
std::string path = GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
std::string path = GUI::format("%1%/applications/com.orcaslicer.OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix);
|
||||||
if (contains_path_dir(target_dir_desktop, "applications")) {
|
if (contains_path_dir(target_dir_desktop, "applications")) {
|
||||||
if (!create_desktop_file(path, desktop_file)) {
|
if (!create_desktop_file(path, desktop_file)) {
|
||||||
// Desktop file not written - end desktop integration
|
// Desktop file not written - end desktop integration
|
||||||
@@ -379,7 +379,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// save path to desktop file
|
// save path to desktop file
|
||||||
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix));
|
app_config->set("desktop_integration_app_path", GUI::format("%1%/applications/com.orcaslicer.OrcaSlicer%2%.desktop", target_dir_desktop, version_suffix));
|
||||||
|
|
||||||
// Repeat for Gcode viewer - use same paths as for slicer files
|
// Repeat for Gcode viewer - use same paths as for slicer files
|
||||||
// Do NOT add gcode viewer desktop file on ChromeOS
|
// Do NOT add gcode viewer desktop file on ChromeOS
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public:
|
|||||||
|
|
||||||
// methods that actually do / undo desktop integration. Static to be accesible from anywhere.
|
// methods that actually do / undo desktop integration. Static to be accesible from anywhere.
|
||||||
|
|
||||||
// returns true if path to OrcaSlicer.desktop is stored in App Config and existence of desktop file.
|
// returns true if path to com.orcaslicer.OrcaSlicer.desktop is stored in App Config and existence of desktop file.
|
||||||
// Does not check if desktop file leads to this binary or existence of icons and viewer desktop file.
|
// Does not check if desktop file leads to this binary or existence of icons and viewer desktop file.
|
||||||
static bool is_integrated();
|
static bool is_integrated();
|
||||||
// true if appimage
|
// true if appimage
|
||||||
|
|||||||
Reference in New Issue
Block a user