Old 11-20-2015, 08:53 PM   #1
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default cannot build sws, pleez heelp

cannot build SWS due to Reascript.cpp and varag.h errors: http://pastebin.com/raw.php?i=qTJDsJQy
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 11-24-2015, 02:44 AM   #2
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

You probably need to delete the SWS plugin and then rewrite the REAPER API headers.
IXix is offline   Reply With Quote
Old 11-25-2015, 10:34 AM   #3
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

Thanks for the help IXix, tried that, no luck.

varag.h seems not to be written in C++... I think visual studio is trying to compile it.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 11-25-2015, 03:10 PM   #4
IXix
Human being with feelings
 
Join Date: Jan 2007
Location: mcr:uk
Posts: 3,889
Default

Sorry then, I don't know. Just found I can't build it myself. I need to update my tools.
IXix is offline   Reply With Quote
Old 11-25-2015, 06:00 PM   #5
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

I think you need to save the output of reascript_vararg.php to reascript_vararg.h to get a valid C++ code you can build. I haven't tried though...

It's part of their build scripts:

Windows: https://github.com/Jeff0S/sws/blob/2...n.vcxproj#L104
OS X: https://github.com/Jeff0S/sws/blob/2...ld.command#L16
cfillion is offline   Reply With Quote
Old 12-10-2015, 04:11 AM   #6
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

This is for exporting c++ functions to reascript, right? Do you know where Cockos wrote about how to do that? I'd like to learn. Gonna look around... Found something!: http://forum.cockos.com/showthread.php?t=155079

ok I think I get it...it's not working because php file isn't doing anything (php file just gets copied as a .h file, no changes). I have php installed on my computer, I can do php -v and it outputs a version... so why doesn't it do anything?

Ok, I deleted pre-build, pre-link, post build, I removed #include reascript_vararg.h, removed all the action export macros... now it builds... however I still really need to get the php file working.

Can anyone explain how to run the php file correctly for the varag.h file?
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 12-10-2015, 11:13 AM   #7
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by Argitoth View Post
Can anyone explain how to run the php file correctly for the varag.h file?
This is how the SWS's .vcxproj file I linked above does it:

Code:
php reascript_vararg.php > reascript_vararg.h
In Windows's command prompt: go to the SWS directory (cd C:\Users\Argitoth\path\to\sws\) then run the php command as above.

Last edited by cfillion; 12-10-2015 at 11:51 AM.
cfillion is offline   Reply With Quote
Old 12-10-2015, 12:01 PM   #8
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

i figured it out actually, building via visual studio works. the problem is that my copy of the reascript_vararg.php begins with
PHP Code:
<?
when it should actually be:

PHP Code:
<?php
It's missing the php and I think this problem may be committed to the repository.
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template

Last edited by Argitoth; 12-10-2015 at 12:07 PM.
Argitoth is offline   Reply With Quote
Old 12-10-2015, 12:14 PM   #9
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Ah, good!

PHP actually supports the "<?" syntax as well (though it is discouraged) via a setting in the php.ini file: http://php.net/manual/en/ini.core.ph...short-open-tag.

http://php.net/manual/en/language.ba...ax.phptags.php
cfillion is offline   Reply With Quote
Old 12-10-2015, 12:32 PM   #10
Argitoth
Human being with feelings
 
Argitoth's Avatar
 
Join Date: Feb 2008
Location: Mesa, AZ
Posts: 2,057
Default

all this trouble to save 3 characters of code?

thanks cfillion
__________________
Soundemote - Home of the chaosfly and pretty oscilloscope.
MyReaperPlugin - Easy-to-use cross-platform C++ REAPER extension template
Argitoth is offline   Reply With Quote
Old 05-15-2018, 11:12 PM   #11
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I have the same problem:
">Reascript.cpp(52): fatal error C1083: Cannot open include file: 'reascript_vararg.h': No such file or directory"

If I open a command window in the solution directory and run
Code:
php reascript_vararg.php > reascript_vararg.h
then the reascript_vararg.h is succesfully created (I have installed PHP).

But as soon as I try to (re)-build the solution, reascript_vararg.h vanishes and I get the above error. What could be done? Thanks!
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 05-16-2018, 02:26 AM   #12
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

I worked around it like this:
- while having open a cmd at the solution's path, I chose to build the solution and immediately I ran in the command window
Code:
php reascript_vararg.php > reascript_vararg.h
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 05-16-2018, 06:34 AM   #13
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Do you have the SWS folder in a location which needs admin rights to write perhaps (e.g. 'Program Files'), so it can't create reascript_vararg.h ? (if you don't run VS as admin)

Welcome to SWS btw.

Last edited by nofish; 05-16-2018 at 06:45 AM.
nofish is offline   Reply With Quote
Old 05-16-2018, 01:27 PM   #14
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Thanks!

It is at the root of a different partition (with a Windows XP installation).

I think I run VS with admin rights, but I 'll check again.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 05-17-2018, 12:54 PM   #15
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Running it with admin rights or not made no difference. I even moved the solution to a different partition, but again the same problem..

VS recognizes my PHP installation but does not create the reascript_vararg.h

Any ideas what else I could try?
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 05-18-2018, 02:46 PM   #16
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default

Best work-around: I wiped off the code having to do with reascript_vararg.php in the sws_extension.vcxproj and made a .bat file which I run before building:
Code:
@echo off
if exist sws\reascript_vararg.h cmd /k del /q "sws\reascript_vararg.h"
cmd /c "php reascript_vararg.php > reascript_vararg.h"
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)
amagalma is offline   Reply With Quote
Old 05-19-2018, 05:20 AM   #17
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Quote:
Originally Posted by nofish View Post
Welcome to SWS btw.
What is everybody up to regarding SWS.

Is there any chance to separate the "LiveConfigs" code from the Rest of the package ?

It seems that LiveConfigs should be rather unrelated (at least regarding it's purpose), and I'd like to have it as a slim distribution and would be inclined to maintain this part of SWS.

-Michael
mschnell is offline   Reply With Quote
Old 05-19-2018, 05:23 AM   #18
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by mschnell View Post
Is there any chance to separate the "LiveConfigs" code from the Rest of the package ?
Everything is of course possible, it's just code. But it might be a hard thing to do, most likely harder than just learning how to build the whole SWS plugin and making the needed changes into the LiveConfigs in place.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 05-19-2018, 06:27 AM   #19
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Quote:
Originally Posted by mschnell View Post
What is everybody up to regarding SWS.

Is there any chance to separate the "LiveConfigs" code from the Rest of the package ?

It seems that LiveConfigs should be rather unrelated (at least regarding it's purpose), and I'd like to have it as a slim distribution and would be inclined to maintain this part of SWS.

-Michael
Since SWS is open source and under MIT license nobody's stopping you making your own stripped down LiveConfigs only version from it I think.

Last edited by nofish; 05-19-2018 at 09:52 AM.
nofish is offline   Reply With Quote
Old 05-19-2018, 12:17 PM   #20
mschnell
Human being with feelings
 
mschnell's Avatar
 
Join Date: Jun 2013
Location: Krefeld, Germany
Posts: 14,690
Default

Of course I do know this but such "stripped down" seems like a much more intimidating task for a complete SWS source code newbie than e.g. adding some small feature or improving some not so perfect behavior.

And on top of this, the task would include creating a new version of SWS "stripped down" to not including LiveConfigs and have this accepted by the rest of the community.

-Michael
mschnell is offline   Reply With Quote
Old 05-19-2018, 01:44 PM   #21
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default

Quote:
Originally Posted by mschnell View Post
Of course I do know this but such "stripped down" seems like a much more intimidating task for a complete SWS source code newbie than e.g. adding some small feature or improving some not so perfect behavior.
Of course this is also possible by submitting pull requests to SWS.
nofish 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:37 AM.


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