Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Guide: Compile VS project in command line
No permission to create posts
January 17, 2019
1:50 pm
Avatar
Frodson
Member
Members
Forum Posts: 45
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Hi here's a micro-tutorial on how to compile the VS/RAFX projects from the command prompt. This way, you can use the code editor of your choice, some even have an integrated terminal, so you never leave the window:

1. Open a terminal and type `msbuild`. If it tells you that the command is not found, you have to add the path to msbuild to your environment PATH variable. Else you can skip to point 3.

2. Follow the easy steps in this answer and put in the path. In my case the path to be added was
`C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\`
(make sure the folder contains MSBuild.exe)

3. Back in the terminal navigate to your project folder and build the project with
`msbuild my_kickass_project.sln`

It should now build, as it does in VS.
I relly needed to use another editor as I'm very used to visual studio code (which despite the name is an entire different thing than Visual Studio.) For reasons that are beyond me, microsoft decided to give the two editors completely different keymaps.

Hope this helps somebody! Cool

January 17, 2019
7:10 pm
Avatar
Frodson
Member
Members
Forum Posts: 45
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

@ Will: First of all hello again 🙂 I'll be somewhat active here again, since I started working on Odin version 2 (after aquiring tons of coding-skills from work over the last two years)

ontopic:
For future versions it would be nice to have the option to choose a different editor in preferences. It wouldn't interface as nicely regarding the status window in the top right of RAFX and rebuild button wouldn't work. But other than that should be fine? Right now RAFX always opens VS all the time, which isn't that much of a problem, but would be nicer/leaner otherwise.

Fred

January 17, 2019
7:30 pm
Avatar
Frodson
Member
Members
Forum Posts: 45
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Ok upon further inspection I found that RAFX will only recognize changes in the plugin if the code was compiled by VS. I guess it still has the old version loaded and isn't reloading? (why would it...)

January 22, 2019
10:17 am
Avatar
W Pirkle
Admin
Forum Posts: 267
Member Since:
January 28, 2017
sp_UserOfflineSmall Offline

Hi Frodson

There is a good reason that RackAFX can only load projects compiled with Visual Studio and that has to do with the "RackAFX DLL as VST2/3 DLL" which involves linking your plugin to a static LIB. That LIB has to be compiled in VS to match the footprint of the RackAFX interface. 

I've sunsetted the RAFX1 API (but not the software) and have moved efforts to ASPiK. There is a long Forum topic on the main page about it. 

I will be releasing RackAFX7 soon that will export projects in the ASPiK format and will use the new RAFX2 API, which is really just an ultra-thin wrapper for the internal ASPiK code block. When you export the project as AAX, AU or VST3 it removes the ASPiK core so that there is ZERO RackAFX code involved and you get the same results as making an ASPiK project using the ASPiKreator software. I designed ASPiK in its entirety first, then I went back to RackAFX and created the RAFX2 API. There will be more information on RackAFX7 soon, and it will have a new website! 

RackAFX7 is setup to create Visual Studio projects, however the RAFX2 API does not require linking to that static LIB - and your plugin will massively shrink in size as a result. However, it also means your plugin won't run as a VST instantly - you have to export the ASPiK project and compile it as such. The main trade-off is that your plugin project carries all of its own GUI code generation stuff (that static LIB played a dual-role: it also implemented your GUI in RackAFX as well as VST2/VST3 hosts). And it involves building and linking to VSTGUI4. 

Check out the ASPiK website here:

http://www.aspikplugins.com/

If you watch the tutorials you will get a hint of what RackAFX7 generates (very clean directory structures, no "trick" or "hack" code, no hand-rolled VSTGUI4 editor objects or XML parsers - it is all done in a proper manner, from the VSTGUI library integration to the custom view and custom sub-controller interfaces). 

Lastly, there will be an option to create a RackAFX7 project without ASPiK - the only reason I could see to do this might be for a Unity game DLL where there is no GUI. 

ASPiK is open source, and the Git repository will be up in a few weeks. It uses CMake to generate Visual Studio and Xcode projects. You might work on modifying the CMake files to generate non-Visual Studio projects.

I will post again when RackAFX7 is ready (and have a pointer to the new website for it).

- Will

January 25, 2019
9:40 pm
Avatar
Frodson
Member
Members
Forum Posts: 45
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Hi Will, Thanks for your answer! My original post was more catered toward the possibility of simply using another editor. I'm fine with using VS as a compiler, as long as I can do it from the terminal 🙂

It's good to hear that RAFX and its projects are moving on and becoming compilable in different ways. I myself will move to JUCE this time after the prototyping.
I had problems with the GUI zapping and lagging in some clients the last time. (Which is most certainly due to my lack of understanding for the underlying code, not RAFX.) However it seems people seem to suggest JUCE over VSTGUI for ease of use, and I'm planning to dig deep this time around.

Fred

January 25, 2019
10:02 pm
Avatar
Frodson
Member
Members
Forum Posts: 45
Member Since:
September 7, 2015
sp_UserOfflineSmall Offline

Ok I just figured why RAFX won't see my terminal compiled solutions: It compiled for x64 by default. With the addition of

`msbuild my_kickass_project.sln  /p:Configuration=Debug;Platform=x86`

Everything will run smoothly 🙂

Forum Timezone: America/New_York

Most Users Ever Online: 55

Currently Online:
9 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Skyler: 48

Derek: 46

Frodson: 45

Peter: 41

clau_ste: 39

Gwen: 32

JimmyM: 30

TheSmile: 28

EZB: 24

lppier: 23

Member Stats:

Guest Posters: 1

Members: 534

Moderators: 1

Admins: 4

Forum Stats:

Groups: 11

Forums: 31

Topics: 558

Posts: 2185

Newest Members:

TomJ, Giscard, Alejandro Florez, Tomaso, Jonas, Ralph, Wayne, Steve Duell, Cal, LamebrainEddy

Moderators: W Pirkle: 267

Administrators: Tom: 67, JD Young: 80, Will Pirkle: 0, W Pirkle: 267