Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portable Mode #1465

Open
Fred-DTV opened this issue Mar 3, 2021 · 14 comments
Open

Portable Mode #1465

Fred-DTV opened this issue Mar 3, 2021 · 14 comments
Labels
Enhancement New feature or request

Comments

@Fred-DTV
Copy link

Fred-DTV commented Mar 3, 2021

Describe the feature
Unsure if it this would actually be possible, but I would love a portable mode of Companion, like OBS has.

Usecases
It would allow me to have Companion installed on a cloud drive which synchronises across my multiple streaming PCs. This would make updating all of my systems a way easier process.

@Julusian Julusian added the Enhancement New feature or request label Mar 4, 2021
@Julusian
Copy link
Member

Julusian commented Mar 4, 2021

Would you want the config to also be stored with the executable in the drive?

@Fred-DTV
Copy link
Author

Fred-DTV commented Mar 5, 2021

Yes, if possible it would be ideal to have all necessary files to run companion in one folder.

@fdebeer
Copy link

fdebeer commented Mar 12, 2021

Yes, if possible it would be ideal to have all necessary files to run companion in one folder.

or run it from usb-stick as standalone program. easy to change from one pc to another. (dont know if this is possible on mac or linux)

@Fred-DTV
Copy link
Author

After loosing my .db file for a second time today in the last couple of weeks an idea came into my mind,, which would be easy to implement and would at least make the companion setup cloud based and safe:

Would it be possible to define where the db files oder the whole %APPDATA%/companion folder is stored?

This way one could place it in a cloud drive and have constant backups

@Julusian
Copy link
Member

@DachsbauTV you can do this if you set the COMPANION_CONFIG_BASEDIR environment variable when launching companion. I believe a shortcut can be made to launch it in this way.

@Fred-DTV
Copy link
Author

Is there an explanation anywhere on how to to do this in win10? I've googled and looked through the repo but couldn't find anything unfortunately :/

I've tried adding it into the shortcut like this: "C:\Program Files\Companion\Companion.exe" /c set COMPANION_CONFIG_BASEDIR="C:\Users\DistilleryStation\OneDrive\Companion_Settings"

But now companion just shows "invalid" and doesn't work anymore.

@Fred-DTV
Copy link
Author

Fred-DTV commented Aug 30, 2022

And now it doesn't start at all anymore, even without the variable in the shortcut :/
Still just shows undefined (No matter which NIC i choose)

EDIT: Even after a full re-install it shows undefined now. This is actually really stressing me out now haha I have a big live show on Saturday. I would immensly appreciate help

@Julusian
Copy link
Member

The syntax is way worse than I was expecting it to be..
https://stackoverflow.com/a/34769146

@Fred-DTV
Copy link
Author

Fred-DTV commented Aug 30, 2022

Thanks for that. It started now with the settings, however, it still shows the undefined error and none of the buttons is clickable except for the dropdown menu

This is the config i used C:\Windows\System32\cmd.exe /c "SET COMPANION_CONFIG_BASEDIR="C:\Users\DistilleryStation\OneDrive\Companion_Settings"&& START ^"^" ^"C:\Program Files\Companion\Companion.exe^""

@maverickmueller
Copy link

In case anyone finds this later, the solution for me was to use just the directory name, relative to the executable. For instance, here is the batch file that I use to run it in this way:

SET COMPANION_CONFIG_BASEDIR=CompanionSettings
Companion.exe

This is with a folder created within the application directory called 'CompanionSettings'

@Fred-DTV
Copy link
Author

Fred-DTV commented Aug 13, 2023

amazing news @maverickmueller !

Just to clarify: Did you use a shortcut with the expression like this?
"C:\Program Files\Companion\Companion.exe" /c set COMPANION_CONFIG_BASEDIR="CompanionSettings"

@maverickmueller
Copy link

amazing news @maverickmueller !

Just to clarify: Did you use a shortcut with the expression like this?
"C:\Program Files\Companion\Companion.exe" /c set COMPANION_CONFIG_BASEDIR="CompanionSettings"

I actually haven't tested using a shortcut. Just the batch job for now, and I'm not entirely sure how it would translate. But I assume so?

@Fred-DTV
Copy link
Author

Could you maybe post your batch job?

Sorry I am a little over-cautious after last time I tried it scrambled my db's 🙈

@maverickmueller
Copy link

maverickmueller commented Aug 13, 2023

Shortcut wasn't working for me, since the COMPANION_CONFIG_BASEDIR value needs to be set before the executable is called, and isn't passed in as a parameter. But here's my batch setup:

My directory:
image

CompanionPortable.bat:

SET COMPANION_CONFIG_BASEDIR=config  
start "" Companion.exe

(Note: my directory name has changed from CompanionSettings to config since my first comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants