Skip to content
Snippets Groups Projects
Commit 0ffd6954 authored by akiraohgaki's avatar akiraohgaki
Browse files

Merge branch 'develop'

parents e2b6dfa2 e1c71e52
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,4 @@ Download Linux package from:
https://www.opendesktop.org/p/1136805/
And please check the ocs-url wiki for more information.
https://www.opencode.net/OCS/ocs-url/wiki
And please see docs/* for more information.
# How to install
## Install from package
Download Linux package from: https://www.opendesktop.org/p/1136805/
Then click the downloaded package and continue to installation with package manager.
Or install the downloaded package using terminal:
Ubuntu 14.04
$ sudo apt install libqt5svg5 qtdeclarative5-qtquick2-plugin qtdeclarative5-window-plugin qtdeclarative5-controls-plugin
$ sudo dpkg -i /path/to/ocs-url*.deb
Ubuntu 16.04
$ sudo apt install libqt5svg5 qml-module-qtquick-controls
$ sudo dpkg -i /path/to/ocs-url*.deb
Fedora 20
# yum insall qt5-qtbase qt5-qtbase-gui qt5-qtsvg qt5-qtdeclarative qt5-qtquickcontrols
# rpm -i /path/to/ocs-url*.rpm
Fedora 22
# dnf insall qt5-qtbase qt5-qtbase-gui qt5-qtsvg qt5-qtdeclarative qt5-qtquickcontrols
# rpm -i /path/to/ocs-url*.rpm
openSUSE 42.1
# zypper install libQt5Svg5 libqt5-qtquickcontrols
# rpm -i /path/to/ocs-url*.rpm
Arch Linux
# pacman -S qt5-base qt5-svg qt5-declarative qt5-quickcontrols
# pacman -U /path/to/ocs-url*.pkg.tar.xz
## Install from source
Make git clone, or download the source archive and extract it.
Build and install
$ cd /path/to/ocs-url
$ ./scripts/prepare
$ qmake PREFIX=/usr
$ make
$ sudo make install
Uninstall
$ sudo make uninstall
# How to use
## Web browser
Just click a OCS-URL (ocs://) links, or type OCS-URL in browser's address bar.
If you use Firefox, a program selection window opens the first time you open OCS-URL,
and you can choose "ocs-url" as custom URL handler.
If you don't get the program selection window or you are using another browser,
please set the ocs-url program as custom URL handler for ocs:// scheme in the browser's settings.
## Command-line
Execute ocs-url program with argument OCS-URL.
$ ocs-url "ocs://install?url=http%3A%2F%2Fexample.com%2Ficons.tar.gz&type=icons"
# Internationalization
ocs-url/i18n/ is sub project for program internationalization.
## Localization for program
Using two tools lupdate and lrelease to make translation.
Text is gathered from program source files and included in QM files for translation along with other resource files.
### Creating TS (Translation Source) files
To generate TS files, sets TS file name to definition TRANSLATIONS in i18n.pro and run lupdate with i18n.pro.
$ cd /path/to/ocs-url/i18n/
$ lupdate i18n.pro
Then adds translations to the generated TS files using Qt Linguist or text editor.
### Creating QM (Qt Message) files
To generate QM files, run lrelease with i18n.pro.
$ cd /path/to/ocs-url/i18n/
$ lrelease i18n.pro
Then adds the path of the generated QM files to i18n.qrc.
# OCS-URL specification
OCS-URL is a custom URL that represent the installation method of items served on OpenCollaborationServices (OCS).
## URL structure
[scheme]://[command]?[query string]
For example:
ocs://install?url=http%3A%2F%2Fexample.com%2Ficons.tar.gz&type=icons
## Scheme
Scheme | Description
-------|------------
ocs | ocs scheme
ocss | ocs scheme for secure protocol
"ocss" scheme is the same of the ocs scheme for now,
it's a reserved name for secure protocol in the future.
## Command
Command | Description
--------|------------
download | Download the file from specified URL to the installation destination of specified install-type.
install | Make file downloading and trigger installation process.
## Query string
OCS-URL's query string is an option of command.
*All query string values should be urlencoded.*
Parameter | Required | Default | Description
----------|----------|---------|------------
url | Yes | - | File URL
type | - | downloads | Install-type
filename | - | File name from URL | Alternative file name
"filename" option is useful if the file URL does not represent a file name.
### Install-type
Available install-type:
Install-type | Installation destination
-------------|------------------
bin | $HOME/.local/bin
downloads | $HOME/Downloads
documents | $HOME/Documents
pictures | $HOME/Pictures
music | $HOME/Music
videos | $HOME/Videos
wallpapers | $XDG_DATA_HOME/wallpapers
fonts | $HOME/.fonts
cursors | $HOME/.icons
icons | $XDG_DATA_HOME/icons
emoticons | $XDG_DATA_HOME/emoticons
themes | $HOME/.themes
emerald_themes | $HOME/.emerald/themes
enlightenment_themes | $HOME/.e/e/themes
enlightenment_backgrounds | $HOME/.e/e/backgrounds
fluxbox_styles | $HOME/.fluxbox/styles
pekwm_themes | $HOME/.pekwm/themes
icewm_themes | $HOME/.icewm/themes
plasma_plasmoids | $XDG_DATA_HOME/plasma/plasmoids
plasma_look_and_feel | $XDG_DATA_HOME/plasma/look-and-feel
plasma_desktopthemes | $XDG_DATA_HOME/plasma/desktoptheme
kwin_effects | $XDG_DATA_HOME/kwin/effects
kwin_scripts | $XDG_DATA_HOME/kwin/scripts
kwin_tabbox | $XDG_DATA_HOME/kwin/tabbox
aurorae_themes | $XDG_DATA_HOME/aurorae/themes
dekorator_themes | $XDG_DATA_HOME/deKorator/themes
qtcurve | $XDG_DATA_HOME/QtCurve
color_schemes | $XDG_DATA_HOME/color-schemes
gnome_shell_extensions | $XDG_DATA_HOME/gnome-shell/extensions
cinnamon_applets | $XDG_DATA_HOME/cinnamon/applets
cinnamon_desklets | $XDG_DATA_HOME/cinnamon/desklets
cinnamon_extensions | $XDG_DATA_HOME/cinnamon/extensions
nautilus_scripts | $XDG_DATA_HOME/nautilus/scripts
amarok_scripts | $KDEHOME/share/apps/amarok/scripts
yakuake_skins | $KDEHOME/share/apps/yakuake/skins
cairo_clock_themes | $HOME/.cairo-clock/themes
books | $APP_DATA/books
comics | $APP_DATA/comics
$APP_DATA is not environment variable, it's internal variable in the program and expressed to $XDG_DATA_HOME/{application ID or name}.
Available alias name of the install-type:
Alias | Install-type
------|-------------
gnome_shell_themes | themes
cinnamon_themes | themes
gtk2_themes | themes
gtk3_themes | themes
metacity_themes | themes
xfwm4_themes | themes
openbox_themes | themes
kvantum_themes | themes
compiz_themes | emerald_themes
beryl_themes | emerald_themes
plasma4_plasmoids | plasma_plasmoids
plasma5_plasmoids | plasma_plasmoids
plasma5_look_and_feel | plasma_look_and_feel
plasma5_desktopthemes | plasma_desktopthemes
plasma_color_schemes | color_schemes
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment