|
|
|
10-07-2019, 04:25 AM
|
#1
|
Human being with feelings
Join Date: Oct 2019
Posts: 2
|
Expose "Import Configuration" to Extensions?
I'm creating a common Reaper workspace for everyone in my team, using Configurations and a custom extension.
I'd like to be able to import a new configuration from the extension code, but that function is not available in the API afaik. Now, each user has to find the config zipfile and import it manually.
Can this be exposed in the API, or added as a scriptable function/action?
And if I've missed that this exists somewhere, please let me know
|
|
|
10-11-2019, 03:00 AM
|
#2
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
I'm not sure what you mean by "import a new configuration from the extension code".
However, AFAIK, ReaperConfigZips are simply zips of REAPER's resource path, so it is very easy to copy a REAPER configuration, including all extensions. You can copy the resource folder and its subfolders yourself (or add the UserPlugins folder to the ReaperConfigZip), and then copy/unzip the configuration onto the new computer, instead of using REAPER's "Import configuration" action.
|
|
|
10-11-2019, 04:47 AM
|
#3
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Doesn't work like that, as they are a bit more than that.
I wrote a documentation of it here:
https://mespotin.uber.space/Ultrasch...eaperConfigZip
tl;dr;
You can add UserPlugins to the ReaperConfigZip-file, but they aren't imported, as the import-procedure of Reaper doesn't support it at all.
Will be simply ignored.
So yes, importing of UserPlugins and therefore extensions should be supported by ReaperConfigZip too.
Maybe with a warning, that the extensions are Windows/Mac/Linux only, if the versions for the other platforms are missing.
That way, one would know, if the ConfigZip would only work on Mac/Linux/Windows, maybe needing additional installation of stuff.
I would also love to see reapack being included into ReaperConfigZip.
This would help for Reapack-installable extensions as well.
@slin
I think you mean a function like
Code:
boolean retval = reaper.ImportConfigZip(string filename_with_path, maybe_additional_parameters)
?
|
|
|
11-29-2019, 04:09 AM
|
#4
|
Human being with feelings
Join Date: Oct 2019
Posts: 2
|
Thanks for your responses!
@mespotine Yes a function like that, where you could point to a ConfigZip file somewhere and trigger the import with that. Then you could store the latest config on the network and others could just hit an "Update to latest" button in Reaper (that would call the function). Even now, the workflow is "just" drag-drop the latest one - but no-one does even that without me nagging and emailing constantly
I have also tried using ReaPack, but seems like it doesn't work with private repos (and it has to be since what I make will be considered proprietary, so I can't have it public).
I'm leaning towards making some form of custom importer, but that seems like a daunting task...
Btw, the link you posted for the documentation didn't work for me (couldnt find the site).
|
|
|
11-29-2019, 07:25 AM
|
#5
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Hmm..the link works for me. I have tried it on different computers...
|
|
|
08-25-2020, 05:13 AM
|
#6
|
Human being with feelings
Join Date: Aug 2020
Posts: 17
|
Any progress around configurations and the API on the horizon?
@slin did you end up building something external?
@mespotine your suggestion of a function looks like a great start:
Code:
boolean retval = reaper.ImportConfigZip(string filename_with_path, maybe_additional_parameters)
Trying to find solutions for a large noob userbase to select one of a few different configs at startup (incl. the default) via a pop-up, with an invisible config import process.
You can see it wouldn't be too complex > SWS Global Startup Action, with a simple gui for config selection and a function like the above. So disappointing to discover no API support for configs at present. Is there any way to push the topic forward?
|
|
|
08-27-2020, 09:40 AM
|
#7
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
You can choose a resource/config-folder via command-line, so you could have a config-selection in the __startup.lua(which is started automatically when Reaper starts), create different config-folders according to user-selection, restart Reaper via commandline to choose this new config-folder(and close the "old" Reaper-instance as well).
It's a little fiddly to build but generally possible with the current possibilities of Reaper.
|
|
|
09-07-2020, 05:00 AM
|
#8
|
Human being with feelings
Join Date: Aug 2020
Posts: 17
|
Thanks a lot for this! I am getting close, but not sure I have the best approach.
I have multiple full resource folders set up, and am calling Reaper at the command line (via external GUI):
"C:\Program Files\REAPER (x64)\reaper.exe" reaper -cfgfile %APPDATA%\REAPER_CustomResourceConfig-1/2/3etc\Reaper.ini
I do like that this doesn't require the Reaper start & restart process to load a config - But perhaps it's a little bloated overall?
I do realised I could call different .ini files from the same resource folder, but imagine I'd end up with one mega-resource folder that might be hard to manage and update any of the individual configs? Any thoughts/experience?
I couldn't spot the '__startup.lua' script you mentioned to investigate, but just now reading another thread you posted in ( https://forum.cockos.com/showthread.php?t=161181) I'm wondering if these need to be created manually, and are not part of the core Reaper resource files? I'm trying to think through the pros/cons of an internally triggered script, vs. external.
Appreciate any ongoing thoughts - You are pretty clearly master of configs!
Thanks.
|
|
|
09-07-2020, 05:44 AM
|
#9
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,128
|
What I do I in my config is:
I hide the extensions in a folder within the « data » folder
Then in my startup script, I look for the extensions and if they’re not there, I copy them to the right spot and quit Reaper telling the user to restart it.
Works great
|
|
|
09-07-2020, 08:59 AM
|
#10
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
You can restart it yourself by running the Spawn new instance of Reaper action and then running Quit Reaper.
You should also look into the PreviousConfig-folder if there's an old startup over there.
As the import procedure moves to-be-installed files over there, you can find the user's old __startup.lua and restore it from there.
You can overwrite the __startup.lua safely even while it's running.
|
|
|
09-07-2020, 09:04 AM
|
#11
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,630
|
Quote:
Originally Posted by tbnicnac
Thanks a lot for this! I am getting close, but not sure I have the best approach.
I have multiple full resource folders set up, and am calling Reaper at the command line (via external GUI):
"C:\Program Files\REAPER (x64)\reaper.exe" reaper -cfgfile %APPDATA%\REAPER_CustomResourceConfig-1/2/3etc\Reaper.ini
I do like that this doesn't require the Reaper start & restart process to load a config - But perhaps it's a little bloated overall?
I do realised I could call different .ini files from the same resource folder, but imagine I'd end up with one mega-resource folder that might be hard to manage and update any of the individual configs? Any thoughts/experience?
I couldn't spot the '__startup.lua' script you mentioned to investigate, but just now reading another thread you posted in ( https://forum.cockos.com/showthread.php?t=161181) I'm wondering if these need to be created manually, and are not part of the core Reaper resource files? I'm trying to think through the pros/cons of an internally triggered script, vs. external.
Appreciate any ongoing thoughts - You are pretty clearly master of configs!
Thanks.
|
There's no __startup.lua existing in the first place but you can create one.
Just put it in the scriptsfolder and it will be run when Reaper starts.
You don't even need to add it to the actionlist, its pure existence is sufficient.
|
|
|
06-10-2021, 05:54 AM
|
#12
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,128
|
Quote:
Originally Posted by Meo-Ada Mespotine
You can restart it yourself by running the Spawn new instance of Reaper action and then running Quit Reaper.
You should also look into the PreviousConfig-folder if there's an old startup over there.
As the import procedure moves to-be-installed files over there, you can find the user's old __startup.lua and restore it from there.
You can overwrite the __startup.lua safely even while it's running.
|
Hey Meo,
I've been using the "spawn" action with great results thanks!
BUT
If quitting the first instance is stopped by dialog (asking to save current project etc...) then I end up with 2 open instances. Which can be confusing to the user.
How can I tell it to spawn ONLY if the first instance has quit?
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 05:33 AM.
|