RebelTechnology / OwlServer

Web-based Client/Server application for the Open Ware Laboratory
GNU General Public License v2.0
2 stars 2 forks source link

Support various patch types #132

Closed pingdynasty closed 2 years ago

pingdynasty commented 8 years ago

At the moment the patch type (faust, c++ or heavy) is determined by the build script based on file suffix. To support other compilation types (e.g. gen) and mixed compilation the user should have the option of setting a patch type, from one of C++, FAUST, Heavy or Gen.

goozo commented 8 years ago

ok so I'm thinking we'd probably be looking at adding a new property to the patch object known as type? or fileType ? or language ? (incase type is too generic, whatever you think is best) and then we need to pass that through to the compiler, or rather the compiler needs to read that prop off the patch rather than the file extension. but use the file extension if no type prop is present to support legacy patches which are already in the db?

pingdynasty commented 8 years ago

Yes that sounds about right - let's call it compilationType.

The API handler should be updated to read the property and pass the right option to the build script.

As a first stage we just need to see if the property is available and set to 'gen', and add '-gen' to the build command if true.

I've just checked in the build script changes to accept '-gen': https://github.com/pingdynasty/OwlServer/blob/dev/web/scripts/patch-builder/patch-builder.php

For the UI, I have an 'ideal' solution in mind and a simple one. The simple solution simply adds a drop-down to the Create Patch form. The ideal solution hides the drop down until a file has been added, then shows it with the value set according to the uploaded file suffix. So for most situations no additional user interaction is needed.

The Edit form doesn't have to be updated with compilation type until it is rewritten in the SPA.

goozo commented 8 years ago

ok, yes makes sense, I think I had something similar in mind too.

goozo commented 8 years ago

what would the list of valid compilationTypes be?

pingdynasty commented 8 years ago

Compilation display name and type:

goozo commented 8 years ago

what would be the file extensions for each, (as we're trying to auto detect) ?

pingdynasty commented 8 years ago

Default: cpp .pd : pd .dsp : faust

gen can only be selected manually

goozo commented 8 years ago

done