Merge branch 'main' into dev
This commit is contained in:
@@ -669,15 +669,19 @@ def xdgInstall():
|
|||||||
with open("./novelwriter.desktop", mode="w+") as outFile:
|
with open("./novelwriter.desktop", mode="w+") as outFile:
|
||||||
outFile.write(desktopData)
|
outFile.write(desktopData)
|
||||||
|
|
||||||
|
# Remove old desktop icon
|
||||||
|
exCode = subprocess.call(
|
||||||
|
["xdg-desktop-icon", "uninstall", "novelwriter.desktop"]
|
||||||
|
)
|
||||||
|
|
||||||
|
# Install application launcher
|
||||||
exCode = subprocess.call(
|
exCode = subprocess.call(
|
||||||
["xdg-desktop-menu", "install", "--novendor", "./novelwriter.desktop"]
|
["xdg-desktop-menu", "install", "--novendor", "./novelwriter.desktop"]
|
||||||
)
|
)
|
||||||
if exCode == 0:
|
if exCode == 0:
|
||||||
print("Installed menu desktop file")
|
print("Installed menu launcher file")
|
||||||
else:
|
else:
|
||||||
print(f"Error {exCode}: Could not install menu desktop file")
|
print(f"Error {exCode}: Could not install menu launcher file")
|
||||||
|
|
||||||
print("")
|
|
||||||
|
|
||||||
# Install MimeType
|
# Install MimeType
|
||||||
# ================
|
# ================
|
||||||
@@ -691,8 +695,6 @@ def xdgInstall():
|
|||||||
else:
|
else:
|
||||||
print(f"Error {exCode}: Could not install mimetype")
|
print(f"Error {exCode}: Could not install mimetype")
|
||||||
|
|
||||||
print("")
|
|
||||||
|
|
||||||
# Install Icons
|
# Install Icons
|
||||||
# =============
|
# =============
|
||||||
|
|
||||||
@@ -757,17 +759,28 @@ def xdgUninstall():
|
|||||||
print("=============")
|
print("=============")
|
||||||
print("")
|
print("")
|
||||||
|
|
||||||
|
# Application Menu Icon
|
||||||
exCode = subprocess.call(
|
exCode = subprocess.call(
|
||||||
["xdg-desktop-menu", "uninstall", "novelwriter.desktop"]
|
["xdg-desktop-menu", "uninstall", "novelwriter.desktop"]
|
||||||
)
|
)
|
||||||
if exCode == 0:
|
if exCode == 0:
|
||||||
print("Uninstalled menu desktop file")
|
print("Uninstalled menu launcher file")
|
||||||
else:
|
else:
|
||||||
print(f"Error {exCode}: Could not uninstall menu desktop file")
|
print(f"Error {exCode}: Could not uninstall menu launcher file")
|
||||||
|
|
||||||
|
# Desktop Icon
|
||||||
|
# (No longer installed)
|
||||||
|
exCode = subprocess.call(
|
||||||
|
["xdg-desktop-icon", "uninstall", "novelwriter.desktop"]
|
||||||
|
)
|
||||||
|
if exCode == 0:
|
||||||
|
print("Uninstalled desktop launcher file")
|
||||||
|
else:
|
||||||
|
print(f"Error {exCode}: Could not uninstall desktop launcher file")
|
||||||
|
|
||||||
sizeArr = ["16", "22", "24", "32", "48", "64", "96", "128", "256", "512"]
|
sizeArr = ["16", "22", "24", "32", "48", "64", "96", "128", "256", "512"]
|
||||||
|
|
||||||
# App Icon
|
# App Icons
|
||||||
for aSize in sizeArr:
|
for aSize in sizeArr:
|
||||||
exCode = subprocess.call([
|
exCode = subprocess.call([
|
||||||
"xdg-icon-resource", "uninstall", "--noupdate",
|
"xdg-icon-resource", "uninstall", "--noupdate",
|
||||||
|
|||||||
Reference in New Issue
Block a user