Go Back   Cockos Incorporated Forums > REAPER Forums > ReaScript, JSFX, REAPER Plug-in Extensions, Developer Forum

Reply
 
Thread Tools Display Modes
Old 03-14-2018, 04:02 AM   #41
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by IXix View Post
Could you elaborate on how the provides tag can be used to remove the extension?
Code:
provides: . > filename_without_extension
The syntax is path_in_repo > path_on_install. The dot is a shortcut for the current file. Spaces are supported.

Last edited by cfillion; 03-14-2018 at 04:17 AM.
cfillion is offline   Reply With Quote
Old 03-14-2018, 05:47 AM   #42
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
Code:
provides: . > filename_without_extension
The syntax is path_in_repo > path_on_install. The dot is a shortcut for the current file. Spaces are supported.
Cool! I think I can handle that.
IXix is offline   Reply With Quote
Old 03-15-2018, 03:41 AM   #43
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Fully confident that everything would work just fine, I gave all the files the .jsfx extension, added header data, set up a fresh repo, added all the files and did the initial commit. Then I ran reapack-index and got an empty index again.

I ran it again with the -V option and this is what it said:
Code:
xxxxxxxxx\AppData\Roaming\REAPER\Effects\IX>reapack-index -V
found git repository in xxxxxxxxx/AppData/Roaming/REAPER/Effects/IX
reading configuration from xxxxxxxxx/.reapack-index.conf
configuration file is unreadable, skipping
reading configuration from xxxxxxxxx/AppData/Roaming/REAPER/Effects/IX/.reapack-index.conf
configuration file is unreadable, skipping
{:check=>false, :commit=>nil, :ignore=>[], :message=>"index: $changelog", :output=>"index.xml", :progress=>true, :quiet=>false, :rebuild=>false, :scan=>[], :strict=>false, :url_template=>"auto", :verbose=>true, :warnings=>true}
processing f767e71: Initial commit - Added REAPER bundled plugins with Reapack headers
processing eb6024a: index: 1 modified metadata, empty index
Nothing to do!
What did I do wrong?????
Here's one of the headers. They're all of a similar pattern...
Code:
/*******************************************************************************
version: 1.0
desc: MIDI CC LFO Generator
author: IX
provides: . > MIDI_CCRider
about:
  # MIDI CC Rider
  Generates MIDI CC messages with an LFO.
  Useful back in the day. Pretty obsolete these days. 
link: http://wiki.cockos.com/wiki/index.php/Jesusonic_Effects_Documentation#IX_Jesusonic_Plugins
********************************************************************************
* Copyright 2007-2011 Philip S. Considine
* License: GPL - http://www.gnu.org/licenses/gpl.html
*******************************************************************************/

desc: MIDI CC LFO Generator
desc: MIDI CC LFO Generator [IXix]

//tags: MIDI modulation generator LFO
//author: IXix
I did set up the remote repo but I haven't pushed changes to it yet. Would that matter? I assumed it wouldn't.
IXix is offline   Reply With Quote
Old 03-15-2018, 03:50 AM   #44
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Looks like the files are at the root of the repository. Package files must be in a subfolder which represent the category (eg. MIDI).
cfillion is offline   Reply With Quote
Old 03-15-2018, 04:07 AM   #45
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
Looks like the files are at the root of the repository. Package files must be in a subfolder which represent the category (eg. MIDI).
Oh. That's vexing. Ah well...
IXix is offline   Reply With Quote
Old 03-15-2018, 02:20 PM   #46
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

This is proving to be much more difficult than I expected but I'm making progress.

Code:
  RTF conversion failed because the pandoc executable cannot be found in your PATH.
  Try again after installing pandoc <http://pandoc.org/>.
This is the first I've heard of pandoc. Should it have been installed by one of the other packages I had to install?

Also the indexer complains that the various sequence/keymap/scale files don't have a version tag. I can't add headers to those files so can I tell it to ignore a folder or something?
IXix is offline   Reply With Quote
Old 03-15-2018, 10:04 PM   #47
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Pandoc is an optional dependency needed to convert the about documentation from Markdown into RTF.

Quote:
Also the indexer complains that the various sequence/keymap/scale files don't have a version tag. I can't add headers to those files so can I tell it to ignore a folder or something?
.txt is the usual extension of MIDI note names so reapack-index happily attempts to make a package out of these. (It does not prevent the other packages from getting successfully indexed.) You can make it skip files or entire directories using one or more --ignore options.

Code:
reapack-index --ignore FolderWhereTheDataTxtAre

Last edited by cfillion; 03-16-2018 at 12:54 AM.
cfillion is offline   Reply With Quote
Old 03-16-2018, 03:49 AM   #48
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
Pandoc is an optional dependency needed to convert the about documentation from Markdown into RTF.
Should I have been presented with the option to install it? I don't recall seeing it mentioned before but perhaps I missed the reference.

Quote:
Originally Posted by cfillion View Post
.txt is the usual extension of MIDI note names so reapack-index happily attempts to make a package out of these. (It does not prevent the other packages from getting successfully indexed.) You can make it skip files or entire directories using one or more --ignore options.

Code:
reapack-index --ignore FolderWhereTheDataTxtAre
Cool, thanks. Hopefully there'll be no more obstacles!
IXix is offline   Reply With Quote
Old 03-19-2018, 04:41 AM   #49
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

I'm having trouble getting files to go where I need them to go. My jsfx are in "%repo%/Effects/IX/" and I need them to install in "%reaper%/Effects/IX/". Similarly my data files are in "%repo%/Data/subfolder/" and need them to go in "%reaper%/Data/subfolder/". Is there a way to force the install path relative to the Reaper resources folder? I thought it would just take a bit of trial and error with provides but it's not happening.

Another problem is that I have made separate packages to install the data files as suggested, but if I use "provides: ../../Data/ix_sequences.data" in more than one file, the indexer complains of a conflict.
Code:
1) Effects/IX/MIDI_Velocifier II.jsfx failed:
  'Data/ix_sequences.data' conflicts with 'Effects/IX/MIDI_Variant.jsfx'
IXix is offline   Reply With Quote
Old 03-19-2018, 04:45 AM   #50
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Where do the files incorrectly get installed currently?

The default destination path for effect files is Effects/<repo name>/<category>/<file path>. Writing is restricted to Effects/<repo name> but the <category> can be omitted like this:
Code:
provides: . > ../MIDI_Velocifier II
The above installs the current file as Effects/IX/MIDI_Velocifier II (assuming the .jsfx is saved as "MIDI/MIDI_Velocifier II.jsfx" at the root of the git repository – MIDI being the category).

For the data package, don't add it to any provides. The .data file itself is not supposed to be installed on the user's computer (because it contains only metadata tags for reapack-index).

Last edited by cfillion; 03-19-2018 at 05:01 AM.
cfillion is offline   Reply With Quote
Old 03-19-2018, 05:08 AM   #51
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
Code:
provides: . > ../MIDI_Velocifier II
The above installs the file as Effects/IX/MIDI_Velocifier II (assuming the .jsfx is saved as "MIDI/MIDI_Velocifier II.jsfx" at the root of the git repository).
Okay, thanks. I thought I'd tried that but I must have screwed it up. Does that mean that the data files will only go as low as "%reaper%/Data/IX/", so I won't be able to put anything in "%reaper%/Data/ix_sequences"? I need to respect the existing folder structure installed by Reaper.

Quote:
Originally Posted by cfillion View Post
For the data package, don't add it to any provides. The .data file itself is not supposed to be installed on the user's computer (because it contains only metadata tags for reapack-index).
That makes sense but how will ReaPack know that it should install the data files if I install an effect that needs them?
IXix is offline   Reply With Quote
Old 03-19-2018, 05:20 AM   #52
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by IXix View Post
Okay, thanks. I thought I'd tried that but I must have screwed it up. Does that mean that the data files will only go as low as "%reaper%/Data/IX/", so I won't be able to put anything in "%reaper%/Data/ix_sequences"? I need to respect the existing folder structure installed by Reaper.
Data files aren't locked to the repository name so you can write directly to Data/ix_sequences. If ix_sequences is at the root of the git repository you can do it like this:

Code:
@version 1.0
@provides ../ix_sequences/*.txt
Quote:
Originally Posted by IXix View Post
That makes sense but how will ReaPack know that it should install the data files if I install an effect that needs them?
It doesn't. Users that don't use the "install everything" mode of ReaPack will need to install the Sequences package separately.
cfillion is offline   Reply With Quote
Old 03-19-2018, 05:51 AM   #53
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
Data files aren't locked to the repository name so you can write directly to Data/ix_sequences. If ix_sequences is at the root of the git repository you can do it like this:

Code:
@version 1.0
@provides ../ix_sequences/*.txt
Great. Thanks for clearing it up.

Quote:
Originally Posted by cfillion View Post
It doesn't. Users that don't use the "install everything" mode of ReaPack will need to install the Sequences package separately.
Would it be possible to implement something like this...
Code:
@requires package_name
... to make installation of dependencies automatic?
IXix is offline   Reply With Quote
Old 03-19-2018, 07:11 AM   #54
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

Quote:
... to make installation of dependencies automatic?
This is already how @provides works :P
X-Raym is offline   Reply With Quote
Old 03-19-2018, 07:44 AM   #55
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

I did a basic dependency system back in 2016 (the code is in a branch on GitHub). It's relatively complex to solve this problem correctly (eg. pkg A needs pkg B v1.0 but pkg C needs pkg B 2.0, updating shouldn't mysteriously break pkg A). Even more so if dependencies should work cross-repositories (eg. have scripts able to require SWS, if SWS was in reapack).

Dependency Test.gif

The self-contained approach with only @provides is much simpler but requires reused files to be uniquely named (otherwise breakages due to files being overwritten with an unsupported version would be possible).

Last edited by cfillion; 03-19-2018 at 08:18 AM.
cfillion is offline   Reply With Quote
Old 03-19-2018, 07:46 AM   #56
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by X-Raym View Post
This is already how @provides works :P
If packages A and B depend on package C but can't request that C be installed then it's not automatic.
IXix is offline   Reply With Quote
Old 03-19-2018, 07:49 AM   #57
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
It's relatively complex to solve this problem correctly (eg. pkg A needs pkg B v1.0 but pkg C needs pkg B 2.0, updating shouldn't break pkg A). Even more so if dependencies should work cross-repositories (eg. have scripts able to require SWS, if SWS was in reapack)
Ah, can of worms, forget I said anything.
IXix is offline   Reply With Quote
Old 03-19-2018, 08:20 AM   #58
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default

I often simply reference all scripts(even libraries) in the repo as a regular package,
and let the user download the whole pack.

A bit simpler when one package needs to be used by several scripts.
X-Raym is offline   Reply With Quote
Old 03-19-2018, 01:54 PM   #59
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

It's mostly working! Huzzah! The only fly in the ointment is that although the data files are being installed to the desired location, only the last file in the list is installed. Here's the package for the sequence files...
Code:
@description Sequence files for IX effects
@version     1.0
@author      IX
@about       ...
@provides    [data] ix_sequences/1 - All Notes.txt > ../../ix_sequences/1 - All Notes.txt
@provides    [data] ix_sequences/2 - Accent on 1.txt > ../../ix_sequences/2 - Accent on 1.txt
@provides    [data] ix_sequences/2 - Accent on 2.txt > ../../ix_sequences/2 - Accent on 2.txt
@provides    [data] ix_sequences/3 - Accent on 1.txt > ../../ix_sequences/3 - Accent on 1.txt
@provides    [data] ix_sequences/3 - Accent on 2.txt > ../../ix_sequences/3 - Accent on 2.txt
@provides    [data] ix_sequences/3 - Accent on 3.txt > ../../ix_sequences/3 - Accent on 3.txt
@provides    [data] ix_sequences/4 - Accent On 1.txt > ../../ix_sequences/4 - Accent On 1.txt
@provides    [data] ix_sequences/4 - Accent On 2.txt > ../../ix_sequences/4 - Accent On 2.txt
@provides    [data] ix_sequences/4 - Accent On 3.txt > ../../ix_sequences/4 - Accent On 3.txt
@provides    [data] ix_sequences/4 - Accent On 4.txt > ../../ix_sequences/4 - Accent On 4.txt
@provides    [data] ix_sequences/5 - Accent on 5.txt > ../../ix_sequences/5 - Accent on 5.txt
...but only "5 - Accent on 5.txt" gets installed. What did I screw up this time?
IXix is offline   Reply With Quote
Old 03-19-2018, 02:05 PM   #60
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Use a single @provides tag for all files (one file per indented line). (Also you don't need to repeat [data] (per-file type override) because the package type is already data.)

Code:
@provides
  ix_sequences/1 - All Notes.txt   > ../../ix_sequences/1 - All Notes.txt
  ix_sequences/2 - Accent on 1.txt > ../../ix_sequences/2 - Accent on 1.txt
  ix_sequences/2 - Accent on 2.txt > ../../ix_sequences/2 - Accent on 2.txt
  ix_sequences/3 - Accent on 1.txt > ../../ix_sequences/3 - Accent on 1.txt
  ix_sequences/3 - Accent on 2.txt > ../../ix_sequences/3 - Accent on 2.txt
  ix_sequences/3 - Accent on 3.txt > ../../ix_sequences/3 - Accent on 3.txt
  ix_sequences/4 - Accent On 1.txt > ../../ix_sequences/4 - Accent On 1.txt
  ix_sequences/4 - Accent On 2.txt > ../../ix_sequences/4 - Accent On 2.txt
  ix_sequences/4 - Accent On 3.txt > ../../ix_sequences/4 - Accent On 3.txt
  ix_sequences/4 - Accent On 4.txt > ../../ix_sequences/4 - Accent On 4.txt
  ix_sequences/5 - Accent on 5.txt > ../../ix_sequences/5 - Accent on 5.txt

Last edited by cfillion; 03-19-2018 at 02:13 PM.
cfillion is offline   Reply With Quote
Old 03-19-2018, 02:11 PM   #61
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Quote:
Originally Posted by cfillion View Post
Use a single provides tag for all files (one file per indented line). (Also you don't need to repeat [data] (per-file type override) because the package type is already data.)...
Facepalm. Great, all good now! Just got to tinker with links, descriptions and stuff...
IXix is offline   Reply With Quote
Old 07-26-2021, 09:07 PM   #62
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

I somehow have what seems like complicated questions as I didn't see any info on it but simply want to ask about.



What about a simple JSFX function library (.jsfx.inc) that only provides functions?


Can FX files, such as the one above and standard FX, be in a custom named folder so as to organise and not clutter the root FX folder?


What about if an add-on had both an FX file and script file that worked together?
Hypex is offline   Reply With Quote
Old 07-26-2021, 09:48 PM   #63
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by Hypex View Post
What about a simple JSFX function library (.jsfx.inc) that only provides functions?

Can FX files, such as the one above and standard FX, be in a custom named folder so as to organise and not clutter the root FX folder?

What about if an add-on had both an FX file and script file that worked together?
Yes.

(Although, for the .jsfx.inc, the best practice would be have each JSFX that depend on it install their own copy at a compatible version.)
cfillion is offline   Reply With Quote
Old 07-26-2021, 11:12 PM   #64
Hypex
Human being with feelings
 
Join Date: Mar 2015
Location: Australia
Posts: 451
Default

Quote:
Originally Posted by cfillion View Post
Yes.

(Although, for the .jsfx.inc, the best practice would be have each JSFX that depend on it install their own copy at a compatible version.)

That's good to know thanks. I'm thinking about a possible future project and that would need both a jsfx file and script installed. Ideally they would be both installed as part of one package since both parts are needed to work as a whole. I've somewhat now gone beyond the scope of usual packages. To avoid complications it would be good to provide one package that simply installs both jsfx and script in proper place.


I would still need to get used to the naming scheme. From a cursory glance custom folders also need to be named after the author. That's a lot of repeated strings.

Also, a package installing its own copy of a depend, would that be by simply including a copy of the files needed? I've read over the issues needed to solve it for dependency resolving. Linux has a system in place for that, such as debconf, which is quite involved. Still a simple way to specify a depend without supporting the complexities and just a package needed would be useful.

Last edited by Hypex; 07-26-2021 at 11:19 PM.
Hypex is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.