mirror of
https://github.com/tiffany352/rink-rs
synced 2024-11-10 05:34:14 +00:00
Add a .desktop
file (#168)
It's a small thing, but being able to open rink from the app launcher thing is nice.
This commit is contained in:
parent
90eff58b8e
commit
62b85f2654
2 changed files with 34 additions and 9 deletions
30
PACKAGING.md
30
PACKAGING.md
|
@ -4,7 +4,6 @@ Requirements:
|
|||
|
||||
- Rust compiler toolchain (stable build)
|
||||
- `asciidoctor` for building manpages
|
||||
- `make`
|
||||
|
||||
Additionally, if these libraries are present on the system, they will be
|
||||
used, otherwise they are statically linked:
|
||||
|
@ -17,6 +16,9 @@ baked into the binary so that `cargo install` will work, but for distro
|
|||
packaging these should probably go into `/usr/share` instead. The
|
||||
makefile will do this automatically.
|
||||
|
||||
An example `.desktop` file is available at `cli/rink.desktop`. The
|
||||
website's favicon from `web/site/favicon.png` can be reused as an icon.
|
||||
|
||||
## Makefile-based method
|
||||
|
||||
```sh
|
||||
|
@ -25,8 +27,6 @@ make all prefix=/usr
|
|||
make install prefix=/usr DESTDIR=$pkgdir
|
||||
```
|
||||
|
||||
A makefile is provided for easier packaging.
|
||||
|
||||
Running `make all` will build both the program and the man pages, and
|
||||
`make install` will install them.
|
||||
|
||||
|
@ -35,18 +35,30 @@ arguments. `prefix` is where Rink should look for its files, this should
|
|||
generally be `/usr`. `DESTDIR` is where the files will be copied to upon
|
||||
running `make install`.
|
||||
|
||||
`make man` can be used to build just the manpages if desired. They're
|
||||
placed into the `build/` directory.
|
||||
|
||||
The makefile doesn't automatically install the .desktop file, see below.
|
||||
|
||||
## Manual packaging
|
||||
|
||||
Build the program using cargo. The RINK_PATH environment variable can be
|
||||
set to something like `/usr/share/rink` so that rink will look in this
|
||||
directory for its files. Passing `--no-default-features` will turn off
|
||||
rink bundling the files into its executable file.
|
||||
|
||||
Build the manpages in `docs/` using asciidoctor.
|
||||
set to `/usr/share/rink` so that rink will look in this directory for
|
||||
its files. Passing `--no-default-features` will turn off rink bundling
|
||||
the files into its executable file.
|
||||
|
||||
1. Install `target/release/rink` -> `/usr/bin/rink`.
|
||||
2. Install `core/definitions.units` ->
|
||||
`/usr/share/rink/definitions.units`.
|
||||
3. Install `core/currency.units` -> `/usr/share/rink/currency.units`.
|
||||
4. Install `datepatterns.txt` -> `/usr/share/rink/datepatterns.txt`.
|
||||
5. Install the manpages into the relevant directories.
|
||||
|
||||
### Manpages
|
||||
|
||||
The manpages in `docs/` can be built using asciidoctor, and then
|
||||
installed into the relevant directory.
|
||||
|
||||
### `.desktop` file
|
||||
|
||||
1. Install `cli/rink.desktop` -> `/usr/share/applications/rink.desktop`.
|
||||
2. Install `web/site/favicon.png` -> `/usr/share/pixmaps/rink.png`.
|
||||
|
|
13
cli/rink.desktop
Normal file
13
cli/rink.desktop
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Version=1.5
|
||||
Categories=Utility;Calculator;ConsoleOnly
|
||||
Exec=rink
|
||||
Terminal=true
|
||||
Icon=rink
|
||||
|
||||
Name=Rink
|
||||
Comment=Do calculations using the rink CLI
|
||||
|
||||
Name[pt]=Rink
|
||||
Comment[pt]=Fazer cálculos com o rink CLI
|
Loading…
Reference in a new issue