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

Help upgrading to Rack v0.6? #52

Closed
cschol opened this issue Feb 21, 2018 · 27 comments
Closed

Help upgrading to Rack v0.6? #52

cschol opened this issue Feb 21, 2018 · 27 comments

Comments

@cschol
Copy link

cschol commented Feb 21, 2018

Hi Sebastien,

Are you interested in help upgrading to the Rack v0.6 API? The Rack Plugin Repair Team can provide a PR for the changes to upgrade to the new API.

Thank you for providing this awesome plugin!

@sebastien-bouffier
Copy link
Owner

Hello cschol, thanks for your proposal. I am currently facing issues with my last plugin on Linux but I think I will manage to resolve it asap. Once that being done I will start the upgrading process and if at some point I am stuck I will ask you or to the RPRT :)
Do you know what is the eta for 0.6 ?

@cschol
Copy link
Author

cschol commented Feb 22, 2018

Perfect. Let us know. The release date is currently still being decided. Andrew is considering pushing it out a couple of weeks to get the (new) Plugin Manager up and running for v0.6.

@Coirt
Copy link
Contributor

Coirt commented Feb 23, 2018

I'd be happy to help also Sebastien don't hesitate to ask. I changed a few things on my fork in Bar and your .cpp/.hpp that are compatible with 0.6.0dev.

Did a trial run earlier, Forked a single module project and built against 0.6.0dev. Will be moving onto 0.6dev myself try get ahead of it!

21st March I think was decided on Release.

@sebastien-bouffier
Copy link
Owner

Thanks for your proposal but it is almost done :)
I will look to your fork but to save time what did you changed in baR ? Is there a bug ? A missing feature ? An issue on params calibration ?

@Coirt
Copy link
Contributor

Coirt commented Feb 23, 2018

Actually built earlier and got a lot of errors. Some were typos. But others are depreciated errors that changing doesn't seem to fix. Getting errors in the components too think its because of BidooComponents.hpp most errors were in there.

randomf changed to randomUniform clampi clamp rescalef rescale (not in fork)

Some other changes harder to explain but put some comments in the fork.

@cschol
Copy link
Author

cschol commented Feb 23, 2018

Those are deprecation WARNINGS, not errors. Read the API Update Thread on how to make those new calls, for example clamp, non-ambigous. You mostly need to add suffixes to your constants (or cast correctly) to clearly identify the data types.

@sebastien-bouffier
Copy link
Owner

Yep migration done and everything works smooth,
I just need time to make more tests, test again in my linux VM and pray that it will work on all OS X versions.
The biggest part of the upgrade is on components and widgets' headers the rest is find/replace + good cast. @Coirt I will push on saturday I think. I was the good occasion to clean some dead code too :)

@phdsg
Copy link

phdsg commented Feb 23, 2018

setPanel(SVG::load(assetPlugin(plugin, "res/Panel.svg"))); instead of

	box.size = Vec(x, y);

	{
		SVGPanel *panel = new SVGPanel();
		panel->box.size = box.size;
		panel->setBackground(SVG::load(assetPlugin(plugin, "res/Panel.svg")));
		addChild(panel);
	}

is also so much nicer now.

@sebastien-bouffier
Copy link
Owner

yep this upgrade is quite nice and as usual Andrew's code is very clean and readable, template help too and community is great :)

@phdsg
Copy link

phdsg commented Feb 23, 2018

i'll test too as soon as you pushed.

@Coirt
Copy link
Contributor

Coirt commented Feb 23, 2018

Thought it was panel->setBackground(SVG::load(assetPlugin(plugin"SLUG", "res/Panel.svg"))); No?

Seemed to work in the other module I forked. Ahornberg-Microtonal.

@sebastien-bouffier
Copy link
Owner

No. For exemple on baR

struct BARWidget : ModuleWidget {
	BARWidget(BAR *module) : ModuleWidget(module) {
		setPanel(SVG::load(assetPlugin(plugin, "res/BAR.svg")));

		addChild(Widget::create<ScrewSilver>(Vec(RACK_GRID_WIDTH, 0)));
		addChild(Widget::create<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, 0)));
		addChild(Widget::create<ScrewSilver>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
		addChild(Widget::create<ScrewSilver>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));

		BARDisplay *display = new BARDisplay();
		display->module = module;
		display->box.pos = Vec(12.0f, 40.0f);
		display->box.size = Vec(110.0f, 70.0f);
		addChild(display);

@phdsg
Copy link

phdsg commented Feb 23, 2018

@Coirt i just copied the example above from fundamental/mutes, so i don't think so

@Coirt
Copy link
Contributor

Coirt commented Feb 23, 2018

Was looking at luckyxxl found in Repair thread.

@phdsg
Copy link

phdsg commented Feb 23, 2018

luckyxxl hasn't changed the setpanel thing afaics.
it's not a necessary change for 0.6 compliance.

@sebastien-bouffier
Copy link
Owner

There is a template for the migration with the best practices, take this one as reference.

@Coirt
Copy link
Contributor

Coirt commented Feb 23, 2018

It builds for 0.6.0dev though no errors might be another way to do it, idk. That other one I forked did crash when added for the first time though. Also crashes when duped (ctrl+d) Lucky's does not though weirdness. Will try it that way, didn't see that template cheers.

@AScustomWorks
Copy link

Hey, when this change sneaked in?:
setPanel(SVG::load(assetPlugin(plugin, "res/MyModule.svg")));

@phdsg
Copy link

phdsg commented Feb 23, 2018

i think together with the other helper changes for 0.6.

edit: in template since https://github.com/VCVRack/Template/commit/f4bcd719e7a43ca28420cee8005e5b9a98a273c2

@sebastien-bouffier
Copy link
Owner

0.6.0dev just pushed. works fine on windows. tell me if you have any issue on other platforms.

@phdsg
Copy link

phdsg commented Feb 25, 2018

nearly fine... couple svg missing/not loading
chute and ouaive panel
bidooLongSlider

@phdsg
Copy link

phdsg commented Feb 25, 2018

capital letters in the filenames don't match...
i.e. ChUTE vs CHUTE

@phdsg
Copy link

phdsg commented Feb 25, 2018

other than that:
building/loading fine on all platforms
running fine on linux and win
good job :)

@Coirt
Copy link
Contributor

Coirt commented Feb 25, 2018

Get an build error:

src/ANTN.cpp:6:10: fatal error: mpg123.h: No such file or directory
 #include <mpg123.h>

@phdsg
Copy link

phdsg commented Feb 25, 2018

make dep before make

@Coirt
Copy link
Contributor

Coirt commented Feb 25, 2018

That does it!

@cschol
Copy link
Author

cschol commented Mar 3, 2018

Excellent work. Thanks everybody! Closing this issue.

@cschol cschol closed this as completed Mar 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants