XIVLauncher.Core icon indicating copy to clipboard operation
XIVLauncher.Core copied to clipboard

[Feature] Auto-Launch Wine Application With FFXIV In Prefix

Open viscountexx opened this issue 2 years ago • 7 comments

I currently use the Wine Explorer to launch an application every time I start FFXIV. I could probably find exactly how to set up a script to run what I need (https://github.com/0e4ef622/wine-discord-ipc-bridge/ specifically, for the Discord Rich Presence plugin to work on Linux), but it would be really nice to be able to set certain applications to run in Wine whenever I run FFXIV via the launcher, and I'm sure there's all sorts of other power user gremlins who'd also love this.

Definitely not some high priority need, of course.

viscountexx avatar Sep 19 '23 16:09 viscountexx

We already have (had? dunno if we kept it) a similar system inside of the Windows launcher, so this likely isn't very difficult.

NotNite avatar Sep 19 '23 16:09 NotNite

agreed that this would be useful - but for wine-discord-ipc-bridge in particular, you can avoid having to start it manually by using https://github.com/0e4ef622/wine-discord-ipc-bridge/pull/33

keysmashes avatar Sep 19 '23 16:09 keysmashes

agreed that this would be useful - but for wine-discord-ipc-bridge in particular, you can avoid having to start it manually by using 0e4ef622/wine-discord-ipc-bridge#33

Oh, this looks amazingly helpful, thank you!

viscountexx avatar Sep 19 '23 16:09 viscountexx

The Linux channel on our discord also has a script you can use to start other addons without having to do it fofrom wine explorer. (I'd copy it, but it's a pain on mobile to fix formatting)

https://discord.com/channels/581875019861328007/850387047927250944/1019925861111181353

There is also https://github.com/goatcorp/XIVLauncher.Core/pull/31 which is still under review.

reiichi001 avatar Sep 19 '23 20:09 reiichi001

agreed that this would be useful - but for wine-discord-ipc-bridge in particular, you can avoid having to start it manually by using 0e4ef622/wine-discord-ipc-bridge#33

There is, alternatively, a user systemd approach to this. Using XenHat's Service Script: https://gitlab.com/XenHat/dotfiles/-/blob/main/snowblocks/scripts/scripts/ffxiv_rpc_service and installing the ipc bridge as per normal.

  1. Copy the contents of the above linked file on gitlab into ~/scripts/ffxiv_rpc
  2. Put the below code into ~/.config/systemd/user/ffxiv_rpc.service
[Unit]
Description=Discord Rich Presence Service for FFXIV

[Service]
Type=simple
ExecStart=%h/scripts/ffxiv_rpc

[Install]
WantedBy=default.target
  1. Enable it through systemctl --user enable ffxiv_rpc as explained per https://wiki.archlinux.org/title/Systemd/User

Thanks to the Arch Forums for giving me the proper service file syntax to reference the home directory as well: https://bbs.archlinux.org/viewtopic.php?id=297777#p2184333

You should NOT run this service at a system level.

If you want the service to run immediately alongside enabling it above in step 3, add --now option to the command.

coldReactive avatar Jul 16 '24 18:07 coldReactive

agreed that this would be useful - but for wine-discord-ipc-bridge in particular, you can avoid having to start it manually by using 0e4ef622/wine-discord-ipc-bridge#33

There is, alternatively, a user systemd approach to this. Using XenHat's Service Script: https://gitlab.com/XenHat/dotfiles/-/blob/main/snowblocks/scripts/scripts/ffxiv_rpc_service and installing the ipc bridge as per normal.

1. Copy the contents of the above linked file on gitlab into `~/scripts/ffxiv_rpc`

2. Put the below code into `~/.config/systemd/user/ffxiv_rpc.service`
[Unit]
Description=Discord Rich Presence Service for FFXIV

[Service]
Type=simple
ExecStart=%h/scripts/ffxiv_rpc

[Install]
WantedBy=default.target
3. Enable it through `systemctl --user enable ffxiv_rpc` as explained per https://wiki.archlinux.org/title/Systemd/User

Thanks to the Arch Forums for giving me the proper service file syntax to reference the home directory as well: https://bbs.archlinux.org/viewtopic.php?id=297777#p2184333

You should NOT run this service at a system level.

Holy shit, that's amazing! I'll turn this into a nix home-manager config very soon (and probably share it here in case anyone wants it), thank you so much!

viscountexx avatar Jul 16 '24 18:07 viscountexx

XenHat provided a slightly better service configuration over at https://gitlab.com/XenHat/dotfiles/-/blob/main/snowblocks/systemd/ffxiv-rpc-glue.service

Which should exit when it detects itself no longer doing anything. It should go into the same place as before (and make sure to remove the old service file and use the new one), or just copy the code over.

coldReactive avatar Jul 16 '24 21:07 coldReactive