more fix for build errors - Linux
This commit is contained in:
@@ -17,7 +17,7 @@ chmod +x AppRun
|
||||
cp resources/images/@SLIC3R_APP_KEY@_192px.png @SLIC3R_APP_KEY@.png
|
||||
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
|
||||
cat <<EOF > @SLIC3R_APP_KEY@.desktop
|
||||
cat <<EOF > com.orcaslicer.@SLIC3R_APP_KEY@.desktop
|
||||
[Desktop Entry]
|
||||
Name=@SLIC3R_APP_KEY@
|
||||
Exec=AppRun %F
|
||||
@@ -27,21 +27,11 @@ Categories=Utility;
|
||||
MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;
|
||||
EOF
|
||||
|
||||
mkdir -p usr/share/applications
|
||||
cp com.orcaslicer.@SLIC3R_APP_KEY@.desktop usr/share/applications/
|
||||
|
||||
mkdir -p usr/share/metainfo
|
||||
cat <<EOF > usr/share/metainfo/@SLIC3R_APP_KEY@.appdata.xml
|
||||
<?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
|
||||
cp @CMAKE_CURRENT_SOURCE_DIR@/scripts/flatpak/com.orcaslicer.@SLIC3R_APP_KEY@.metainfo.xml usr/share/metainfo/
|
||||
|
||||
|
||||
export ARCH=$(uname -m)
|
||||
|
||||
@@ -209,7 +209,7 @@ bool DesktopIntegrationDialog::is_integrated()
|
||||
if (path.empty())
|
||||
return false;
|
||||
|
||||
// confirmation that OrcaSlicer.desktop exists
|
||||
// confirmation that com.orcaslicer.OrcaSlicer.desktop exists
|
||||
struct stat buffer;
|
||||
return (stat (path.c_str(), &buffer) == 0);
|
||||
}
|
||||
@@ -342,13 +342,13 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
||||
"StartupNotify=false\n"
|
||||
"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)){
|
||||
BOOST_LOG_TRIVIAL(debug) << "OrcaSlicer.desktop file installation success.";
|
||||
BOOST_LOG_TRIVIAL(debug) << "com.orcaslicer.OrcaSlicer.desktop file installation success.";
|
||||
break;
|
||||
} else {
|
||||
// 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();
|
||||
}
|
||||
// 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 desktop file
|
||||
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 (!create_desktop_file(path, desktop_file)) {
|
||||
// Desktop file not written - end desktop integration
|
||||
@@ -379,7 +379,7 @@ void DesktopIntegrationDialog::perform_desktop_integration()
|
||||
return;
|
||||
}
|
||||
// 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
|
||||
// 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.
|
||||
|
||||
// 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.
|
||||
static bool is_integrated();
|
||||
// true if appimage
|
||||
|
||||
Reference in New Issue
Block a user