Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
akiraohgaki
ocs-manager
Commits
c0c78ec3
Commit
c0c78ec3
authored
Feb 27, 2019
by
akiraohgaki
Browse files
Merge branch 'develop'
parents
626d8567
333677a9
Pipeline
#292
passed with stage
in 5 minutes and 36 seconds
Changes
6
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
app/configs/application.json
View file @
c0c78ec3
{
"id"
:
"ocs-manager"
,
"name"
:
"ocs-manager"
,
"version"
:
"0.7.
1
"
,
"version"
:
"0.7.
2
"
,
"organization"
:
"Opendesktop.org"
,
"domain"
:
"org.opendesktop.ocs-manager"
,
"icon"
:
":/desktop/ocs-manager.svg"
,
...
...
app/configs/install_types.json
View file @
c0c78ec3
{
"bin"
:
{
"name"
:
"Software"
,
"destination"
:
"$HOME/.local/bin"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.local/bin"
,
"generic_destination"
:
"$APP_DATA/bin"
},
"downloads"
:
{
"name"
:
"Downloads"
,
"destination"
:
"$XDG_DOWNLOAD_DIR"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DOWNLOAD_DIR"
,
"generic_destination"
:
"$APP_DATA/downloads"
},
"documents"
:
{
"name"
:
"Documents"
,
"destination"
:
"$XDG_DOCUMENTS_DIR"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DOCUMENTS_DIR"
,
"generic_destination"
:
"$APP_DATA/documents"
},
"pictures"
:
{
"name"
:
"Pictures"
,
"destination"
:
"$XDG_PICTURES_DIR"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_PICTURES_DIR"
,
"generic_destination"
:
"$APP_DATA/pictures"
},
"music"
:
{
"name"
:
"Music"
,
"destination"
:
"$XDG_MUSIC_DIR"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_MUSIC_DIR"
,
"generic_destination"
:
"$APP_DATA/music"
},
"videos"
:
{
"name"
:
"Videos"
,
"destination"
:
"$XDG_VIDEOS_DIR"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_VIDEOS_DIR"
,
"generic_destination"
:
"$APP_DATA/videos"
},
"wallpapers"
:
{
"name"
:
"Wallpapers"
,
"destination"
:
"$XDG_DATA_HOME/wallpapers"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/wallpapers"
,
"generic_destination"
:
"$APP_DATA/wallpapers"
},
"fonts"
:
{
"name"
:
"Fonts"
,
"destination"
:
"$HOME/.fonts"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.fonts"
,
"generic_destination"
:
"$APP_DATA/fonts"
},
"cursors"
:
{
"name"
:
"Cursors"
,
"destination"
:
"$HOME/.icons"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.icons"
,
"generic_destination"
:
"$APP_DATA/cursors"
},
"icons"
:
{
"name"
:
"Icons"
,
"destination"
:
"$XDG_DATA_HOME/icons"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/icons"
,
"generic_destination"
:
"$APP_DATA/icons"
},
"emoticons"
:
{
"name"
:
"Emoticons"
,
"destination"
:
"$XDG_DATA_HOME/emoticons"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/emoticons"
,
"generic_destination"
:
"$APP_DATA/emoticons"
},
"themes"
:
{
"name"
:
"Desktop Themes"
,
"destination"
:
"$HOME/.themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.themes"
,
"generic_destination"
:
"$APP_DATA/themes"
},
"emerald_themes"
:
{
"name"
:
"Emerald Themes"
,
"destination"
:
"$HOME/.emerald/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.emerald/themes"
,
"generic_destination"
:
"$APP_DATA/emerald_themes"
},
"enlightenment_themes"
:
{
"name"
:
"Enlightenment Themes"
,
"destination"
:
"$HOME/.e/e/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.e/e/themes"
,
"generic_destination"
:
"$APP_DATA/enlightenment_themes"
},
"enlightenment_backgrounds"
:
{
"name"
:
"Enlightenment Backgrounds"
,
"destination"
:
"$HOME/.e/e/backgrounds"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.e/e/backgrounds"
,
"generic_destination"
:
"$APP_DATA/enlightenment_backgrounds"
},
"fluxbox_styles"
:
{
"name"
:
"Fluxbox Styles"
,
"destination"
:
"$HOME/.fluxbox/styles"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.fluxbox/styles"
,
"generic_destination"
:
"$APP_DATA/fluxbox_styles"
},
"pekwm_themes"
:
{
"name"
:
"PekWM Themes"
,
"destination"
:
"$HOME/.pekwm/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.pekwm/themes"
,
"generic_destination"
:
"$APP_DATA/pekwm_themes"
},
"icewm_themes"
:
{
"name"
:
"IceWM Themes"
,
"destination"
:
"$HOME/.icewm/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.icewm/themes"
,
"generic_destination"
:
"$APP_DATA/icewm_themes"
},
"plasma_plasmoids"
:
{
"name"
:
"Plasma Plasmoids"
,
"destination"
:
"$XDG_DATA_HOME/plasma/plasmoids"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/plasma/plasmoids"
,
"generic_destination"
:
"$APP_DATA/plasma_plasmoids"
},
"plasma_look_and_feel"
:
{
"name"
:
"Plasma Look and Feel"
,
"destination"
:
"$XDG_DATA_HOME/plasma/look-and-feel"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/plasma/look-and-feel"
,
"generic_destination"
:
"$APP_DATA/plasma_look_and_feel"
},
"plasma_desktopthemes"
:
{
"name"
:
"Plasma Desktop Themes"
,
"destination"
:
"$XDG_DATA_HOME/plasma/desktoptheme"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/plasma/desktoptheme"
,
"generic_destination"
:
"$APP_DATA/plasma_desktopthemes"
},
"kwin_effects"
:
{
"name"
:
"KWin Effects"
,
"destination"
:
"$XDG_DATA_HOME/kwin/effects"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/kwin/effects"
,
"generic_destination"
:
"$APP_DATA/kwin_effects"
},
"kwin_scripts"
:
{
"name"
:
"KWin Scripts"
,
"destination"
:
"$XDG_DATA_HOME/kwin/scripts"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/kwin/scripts"
,
"generic_destination"
:
"$APP_DATA/kwin_scripts"
},
"kwin_tabbox"
:
{
"name"
:
"KWin Window Switcher"
,
"destination"
:
"$XDG_DATA_HOME/kwin/tabbox"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/kwin/tabbox"
,
"generic_destination"
:
"$APP_DATA/kwin_tabbox"
},
"aurorae_themes"
:
{
"name"
:
"Aurorae Themes"
,
"destination"
:
"$XDG_DATA_HOME/aurorae/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/aurorae/themes"
,
"generic_destination"
:
"$APP_DATA/aurorae_themes"
},
"dekorator_themes"
:
{
"name"
:
"deKorator Themes"
,
"destination"
:
"$XDG_DATA_HOME/deKorator/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/deKorator/themes"
,
"generic_destination"
:
"$APP_DATA/dekorator_themes"
},
"qtcurve"
:
{
"name"
:
"QtCurve Themes"
,
"destination"
:
"$XDG_DATA_HOME/QtCurve"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/QtCurve"
,
"generic_destination"
:
"$APP_DATA/qtcurve"
},
"color_schemes"
:
{
"name"
:
"KDE Color Schemes"
,
"destination"
:
"$XDG_DATA_HOME/color-schemes"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/color-schemes"
,
"generic_destination"
:
"$APP_DATA/color_schemes"
},
"gnome_shell_extensions"
:
{
"name"
:
"Gnome Shell Extensions"
,
"destination"
:
"$XDG_DATA_HOME/gnome-shell/extensions"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/gnome-shell/extensions"
,
"generic_destination"
:
"$APP_DATA/gnome_shell_extensions"
},
"cinnamon_applets"
:
{
"name"
:
"Cinnamon Applets"
,
"destination"
:
"$XDG_DATA_HOME/cinnamon/applets"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/cinnamon/applets"
,
"generic_destination"
:
"$APP_DATA/cinnamon_applets"
},
"cinnamon_desklets"
:
{
"name"
:
"Cinnamon Desklets"
,
"destination"
:
"$XDG_DATA_HOME/cinnamon/desklets"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/cinnamon/desklets"
,
"generic_destination"
:
"$APP_DATA/cinnamon_desklets"
},
"cinnamon_extensions"
:
{
"name"
:
"Cinnamon Extensions"
,
"destination"
:
"$XDG_DATA_HOME/cinnamon/extensions"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/cinnamon/extensions"
,
"generic_destination"
:
"$APP_DATA/cinnamon_extensions"
},
"nautilus_scripts"
:
{
"name"
:
"Nautilus Scripts"
,
"destination"
:
"$XDG_DATA_HOME/nautilus/scripts"
,
"destination"
:
""
,
"xdg_destination"
:
"$XDG_DATA_HOME/nautilus/scripts"
,
"generic_destination"
:
"$APP_DATA/nautilus_scripts"
},
"amarok_scripts"
:
{
"name"
:
"Amarok Scripts"
,
"destination"
:
"$KDEHOME/share/apps/amarok/scripts"
,
"destination"
:
""
,
"xdg_destination"
:
"$KDEHOME/share/apps/amarok/scripts"
,
"generic_destination"
:
"$APP_DATA/amarok_scripts"
},
"yakuake_skins"
:
{
"name"
:
"Yakuake Skins"
,
"destination"
:
"$KDEHOME/share/apps/yakuake/skins"
,
"destination"
:
""
,
"xdg_destination"
:
"$KDEHOME/share/apps/yakuake/skins"
,
"generic_destination"
:
"$APP_DATA/yakuake_skins"
},
"cairo_clock_themes"
:
{
"name"
:
"Cairo-Clock Themes"
,
"destination"
:
"$HOME/.cairo-clock/themes"
,
"destination"
:
""
,
"xdg_destination"
:
"$HOME/.cairo-clock/themes"
,
"generic_destination"
:
"$APP_DATA/cairo_clock_themes"
},
"books"
:
{
"name"
:
"Books"
,
"destination"
:
"$APP_DATA/books"
,
"destination"
:
""
,
"xdg_destination"
:
"$APP_DATA/books"
,
"generic_destination"
:
"$APP_DATA/books"
},
"comics"
:
{
"name"
:
"Comics"
,
"destination"
:
"$APP_DATA/comics"
,
"destination"
:
""
,
"xdg_destination"
:
"$APP_DATA/comics"
,
"generic_destination"
:
"$APP_DATA/comics"
}
}
app/src/handlers/confighandler.cpp
View file @
c0c78ec3
...
...
@@ -207,8 +207,15 @@ void ConfigHandler::importAppConfigInstallTypes()
auto
installTypes
=
appConfig_
.
get
(
"install_types"
);
for
(
const
auto
&
key
:
installTypes
.
keys
())
{
auto
installtype
=
installTypes
[
key
].
toObject
();
installtype
[
"destination"
]
=
convertPathString
(
installtype
[
"destination"
].
toString
());
installtype
[
"generic_destination"
]
=
convertPathString
(
installtype
[
"generic_destination"
].
toString
());
auto
xdgDestination
=
convertPathString
(
installtype
[
"xdg_destination"
].
toString
());
auto
genericDestination
=
convertPathString
(
installtype
[
"generic_destination"
].
toString
());
installtype
[
"xdg_destination"
]
=
xdgDestination
;
installtype
[
"generic_destination"
]
=
genericDestination
;
#ifdef APP_DESKTOP
installtype
[
"destination"
]
=
xdgDestination
;
#else
installtype
[
"destination"
]
=
genericDestination
;
#endif
installTypes
[
key
]
=
installtype
;
}
auto
installTypesAlias
=
appConfig_
.
get
(
"install_types_alias"
);
...
...
app/src/handlers/itemhandler.cpp
View file @
c0c78ec3
...
...
@@ -145,14 +145,13 @@ void ItemHandler::uninstall(const QString &itemKey)
auto
installedItem
=
configHandler_
->
getUsrConfigInstalledItems
()[
itemKey
].
toObject
();
auto
installType
=
installedItem
[
"install_type"
].
toString
();
Qtil
::
Dir
destDir
;
#ifdef APP_DESKTOP
destDir
.
setPath
(
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"destination"
].
toString
());
Qtil
::
Dir
destDir
(
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"destination"
].
toString
());
#ifdef APP_DESKTOP
for
(
const
auto
filename
:
installedItem
[
"files"
].
toArray
())
{
QFileInfo
fileInfo
(
destDir
.
path
()
+
"/"
+
filename
.
toString
());
// plasmapkg: Installation process
has should be
saved plasmapkg into destination directory
// plasmapkg: Installation process
will
saved plasmapkg into destination directory
Qtil
::
Package
package
(
fileInfo
.
filePath
());
...
...
@@ -192,8 +191,6 @@ void ItemHandler::uninstall(const QString &itemKey)
}
}
#else
destDir
.
setPath
(
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"generic_destination"
].
toString
());
for
(
const
auto
filename
:
installedItem
[
"files"
].
toArray
())
{
QFileInfo
fileInfo
(
destDir
.
path
()
+
"/"
+
filename
.
toString
());
if
(
fileInfo
.
isDir
())
{
...
...
@@ -341,11 +338,10 @@ void ItemHandler::installDownloadedFile(Qtil::NetworkResource *resource)
result
[
"message"
]
=
tr
(
"Installing"
);
emit
installStarted
(
result
);
Qtil
::
Dir
destDir
;
#ifdef APP_DESKTOP
destDir
.
setPath
(
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"destination"
].
toString
());
Qtil
::
Dir
destDir
(
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"destination"
].
toString
());
// plasmapkg: Need to save package to remove installed files later
#ifdef APP_DESKTOP
// plasmapkg: Should save a package to remove installed files in uninstall process
if
(
installType
==
"bin"
&&
package
.
installAsProgram
(
tempDestDir
.
path
()
+
"/"
+
filename
))
{
...
...
@@ -396,8 +392,6 @@ void ItemHandler::installDownloadedFile(Qtil::NetworkResource *resource)
return
;
}
#else
destDir
.
setPath
(
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"generic_destination"
].
toString
());
if
(
Qtil
::
File
(
package
.
path
()).
copy
(
tempDestDir
.
path
()
+
"/"
+
filename
))
{
result
[
"message"
]
=
tr
(
"The file has been installed"
);
}
...
...
app/src/handlers/updatehandler.cpp
View file @
c0c78ec3
...
...
@@ -37,12 +37,7 @@ void UpdateHandler::checkAll()
auto
filename
=
installedItem
[
"filename"
].
toString
();
auto
installType
=
installedItem
[
"install_type"
].
toString
();
QString
filePath
=
""
;
#ifdef APP_DESKTOP
filePath
=
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"destination"
].
toString
()
+
"/"
+
filename
;
#else
filePath
=
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"generic_destination"
].
toString
()
+
"/"
+
filename
;
#endif
auto
filePath
=
configHandler_
->
getAppConfigInstallTypes
()[
installType
].
toObject
()[
"destination"
].
toString
()
+
"/"
+
filename
;
QString
updateMethod
=
""
;
...
...
pkg/appimage/appimagebuild
View file @
c0c78ec3
#!/bin/bash
PKGNAME
=
'ocs-manager'
PKGVER
=
'0.7.
1
'
PKGVER
=
'0.7.
2
'
PKGREL
=
'1'
#UPDINFO='zsync|http://***/ocs-manager-x86_64.AppImage.zsync'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment