Added desktop files.

This commit is contained in:
Roman Telezhynskyi 2023-01-11 13:03:32 +02:00
parent 951cf2ae93
commit ef713b1183
12 changed files with 44 additions and 12 deletions

6
dist/puzzle.desktop vendored
View File

@ -2,13 +2,15 @@
Type=Application
Name=Puzzle
Exec=puzzle %F
Version=1.0
Version=1.1
GenericName=Valentina's layout editor
GenericName[uk]=Редактор розкладки Валентини
Comment=Create and edit layouts
Comment[uk]=Створюйте і редагуйте розкладки
Comment[ru]=Создавайте и редактируйте раскладку
Icon=puzzle
Terminal=false
MimeType=application/x-valentina-layout;
Categories=Qt;Utility;FileTools;
TryExec=puzzle
Keywords=layout;nesting
StartupWMClass=puzzle

6
dist/tape.desktop vendored
View File

@ -2,13 +2,15 @@
Type=Application
Name=Tape
Exec=tape %F
Version=1.0
Version=1.1
GenericName=Valentina's measurements editor
GenericName[uk]=Редактор мірок Валентини
Comment=Create and edit measurements
Comment[uk]=Створюйте і редагуйте мірки
Comment[ru]=Создавайте и редактируйте мерки
Icon=tape
Terminal=false
MimeType=application/x-valentina-s-measurements;application/x-valentina-i-measurements;
Categories=Qt;Utility;FileTools;
TryExec=tape
Keywords=measurements
StartupWMClass=tape

View File

@ -2,8 +2,9 @@
Type=Application
Name=Valentina
Exec=valentina %F
Version=1.0
Version=1.1
GenericName=Pattern making program
GenericName[uk]=Програма створення викрійок
Comment=Creating pattern of clothes
Comment[uk]=Створеня викрійок одягу
Icon=valentina
@ -11,3 +12,5 @@ Terminal=false
MimeType=application/x-valentina-pattern;
Categories=Graphics;VectorGraphics;2DGraphics;Qt;Engineering;
TryExec=valentina
Keywords=pattern
StartupWMClass=valentina

View File

@ -1,7 +1,26 @@
import qbs.FileInfo
VApp {
Depends { name: "freedesktop2" }
version: "0.7.52"
type: base.concat("testSuit")
install: true
installDir: buildconfig.installAppPath
installDebugInformation: true
Group {
name: "freedesktop"
prefix: FileInfo.joinPaths(project.sourceDirectory, "dist", FileInfo.pathSeparator())
files: [
product.targetName + ".desktop"
]
}
freedesktop2.desktopKeys: ({
'Exec': FileInfo.joinPaths(qbs.installPrefix,
product.installDir,
product.targetName) + ' %F',
'X-Application-Version': product.version,
})
}

View File

@ -73,7 +73,6 @@ Module {
cmd.highlight = "codegen";
cmd.sourceCode = function() {
var aggregateDesktopKeys = Fdo.parseDesktopFile(input.filePath);
console.info(JSON.stringify(aggregateDesktopKeys));
var desktopKeys = ModUtils.moduleProperty(product, "desktopKeys") || {}
var mainSection = aggregateDesktopKeys['Desktop Entry'];
for (key in desktopKeys) {

View File

@ -40,8 +40,6 @@ function parseDesktopFile(filePath) {
if (line.length == 0) continue;
if (line[0] == '#') continue;
var match = sectionRex.exec(line);
console.info(line)
console.info(match)
if (match) {
var currentSectionName = match[1];
fileValues[currentSectionName] = {};

View File

@ -71,6 +71,10 @@ auto main(int argc, char *argv[]) -> int
VPApplication app(argc, argv);
app.InitOptions();
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
app.setDesktopFileName("puzzle.desktop");
#endif
QTimer::singleShot(0, &app, &VPApplication::ProcessCMD);
#if defined(APPIMAGE) && defined(Q_OS_LINUX)

View File

@ -3,7 +3,6 @@ import qbs.FileInfo
VToolApp {
Depends { name: "buildconfig" }
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
Depends { name: "freedesktop" }
Depends { name: "Qt"; submodules: ["widgets", "svg"] }
Depends { name: "VMiscLib" }
Depends { name: "VLayoutLib" }

View File

@ -68,6 +68,10 @@ auto main(int argc, char *argv[]) -> int
MApplication app(argc, argv);
app.InitOptions();
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
app.setDesktopFileName("tape.desktop");
#endif
QTimer::singleShot(0, &app, &MApplication::ProcessCMD);
#if defined(APPIMAGE) && defined(Q_OS_LINUX)

View File

@ -4,7 +4,6 @@ import qbs.File
VToolApp {
Depends { name: "buildconfig" }
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
Depends { name: "freedesktop" }
Depends { name: "Qt"; submodules: ["widgets", "svg"] }
Depends { name: "VMiscLib"; }
Depends { name: "VPatternDBLib"; }

View File

@ -80,6 +80,10 @@ auto main(int argc, char *argv[]) -> int
VApplication app(argc, argv);
app.InitOptions();
#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)
app.setDesktopFileName("valentina.desktop");
#endif
if (VApplication::IsGUIMode() && VAbstractApplication::VApp()->Settings()->IsAutomaticallyCheckUpdates())
{
// Set feed URL before doing anything else

View File

@ -4,7 +4,6 @@ import qbs.File
VToolApp {
Depends { name: "buildconfig" }
Depends { name: "ib"; condition: qbs.targetOS.contains("macos") }
Depends { name: "freedesktop" }
Depends { name: "Qt"; submodules: ["widgets", "svg", "xmlpatterns", "concurrent"] }
Depends { name: "VPatternDBLib"; }
Depends { name: "VWidgetsLib"; }