install: add Makefile and systemd unit #2

Closed
leohearts wants to merge 1 commit from leohearts/typesim:patch-underwear into meow
Contributor
No description provided.
@ -0,0 +4,4 @@
cargo build --release
install: build-release
cp -rf . ~/.local/share/typesim
install -Dm644 ./systemd/typesim.service ~/.local/share/systemd/user/typesim.service
Owner

not all distro use systemd (i am not using it for example), so the installation should be copying binary and audio files only?

not all distro use systemd (i am not using it for example), so the installation should be copying binary and audio files only?
Author
Contributor

audio files
not a good idea because i did so and figured out that we can't put ./audio in user's home.

> audio files not a good idea because i did so and figured out that we can't put ./audio in user's home.
Author
Contributor

anyway you could get I'm totally making fun for ... you know, see my branch name.

anyway you could get I'm totally making fun for ... you know, see my branch name.
Owner

@leohearts wrote in #2 (comment):

not a good idea because i did so and figured out that we can't put ./audio in user's home.

weired, i think something like install -Dm 664 audio/* $HOME/.local/share/typesim/audio/ should work...

@leohearts wrote in https://git.gay/saeziae/typesim/pulls/2#issuecomment-5105: > not a good idea because i did so and figured out that we can't put ./audio in user's home. weired, i think something like `install -Dm 664 audio/* $HOME/.local/share/typesim/audio/` should work...
Author
Contributor

So then we'll need something like a wrapper script to cd before executing the real binary ...

So then we'll need something like a wrapper script to `cd` before executing the real binary ...
@ -0,0 +15,4 @@
#ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
ExecStart=sh -c "cd ~/.local/share/typesim; ~/.local/share/typesim/target/release/typesim"
Owner

use workDir instead of cding it ? and maybe i should not hardcode path of audio files in the program.

use `workDir` instead of `cd`ing it ? and maybe i should not hardcode path of audio files in the program.
Author
Contributor

Workdir must be an absolute path and doesn't support ~/

Workdir must be an absolute path and doesn't support ~/
leohearts closed this pull request 2025-04-24 00:13:07 +02:00
Owner

see the newest change which implements Makefile and installation and configfile

see the newest change which implements Makefile and installation and configfile

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
saeziae/typesim!2
No description provided.