building c++ plugins for 7.01

Discussions concerning programming of SOFTIMAGE©
Manticor
Posts: 160
Joined: 09 Jun 2011, 22:41

building c++ plugins for 7.01

Post by Manticor » 19 Jan 2015, 21:46

Hi I wonder if someone can help me with some info of what is needed to compile plugins with xsi 7.01

Ive decided to extend the life of our beloved xsi by learning c++ to extend it for future purposes ( as there is no real alternative that is better ... aside from newer versions...which sadly the powers that be will not invest in) .I do have quite a bit of knowledge now using python and the xsi sdk so I thought Id go the whole way and learn c++ .

Ive read on exsi that the compiler should be visual studio 2005 sp1 ... only thing is ive spent the past day trying to get vs 2005 to be able to get x64 build option to work but to no avail.
Is it possible to use a newer version of visual studio express to build for xsi 7.01 ? ive tried VSE 2010 but it goes throught the motions of upgrading the files but fails.VSE 2008 builds ok but i cant get x64 to work either even after do some hacks to the registry after following this blog

https://jenshuebel.wordpress.com/2009/02/12/visual-c-2008-express-edition-and-64-bit-targets/

So after a lot of attempts Im drawing a blank ... so I thought i would ask the community for help.

If anyone could help with what i need to do to be able to compile x64 plugins for 7.01 ( with links to any files that i would need) I would be deeply grateful

oh and im using windows 7 ...

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: building c++ plugins for 7.01

Post by Daniel Brassard » 19 Jan 2015, 22:40

Do you have the service patch security upgrade installed?

http://www.microsoft.com/en-us/download ... x?id=14431
$ifndef "Softimage"
set "Softimage" "true"
$endif

Manticor
Posts: 160
Joined: 09 Jun 2011, 22:41

Re: building c++ plugins for 7.01

Post by Manticor » 20 Jan 2015, 19:44

ive installed both x64 and x86 versions today and also installed windows platform sdk ... hasnt changed anything .
Ive seen in the sdk docs that i should be able to type devenv at the softimage command prompt to get things working ...but that doesnt work.
Maybe i shoukd start from absolute basics working with VS before attempting to build the examples .
Thanks for the help Daniel

User avatar
FXDude
Posts: 1129
Joined: 19 Jun 2012, 21:59

Re: building c++ plugins for 7.01

Post by FXDude » 21 Jan 2015, 15:21

Not that more technical issues don't get resolved here, but you might have better chances to get help on the XSI list for this sort of thing.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: building c++ plugins for 7.01

Post by Daniel Brassard » 21 Jan 2015, 21:46

Maybe this will help

https://msdn.microsoft.com/en-us/librar ... s.80).aspx

64-bit tools are not available on Visual C++ 2005 Express Edition by default. To enable 64-bit tools on Visual C++ 2005 Express Edition, install the .NET Framework SDK in addition to Visual C++ 2005 Express Edition. Otherwise, an error occurs when you attempt to configure a project to target a 64-bit platform using Visual C++ 2005 Express Edition.

http://www.microsoft.com/en-ca/download ... px?id=8279

Devenv is the Visual Studio shell executable that point to the devenv.exe file. Their is no devenv coming with VS Express. For Visual Studio Express edition, the executable file is called vcexpress.exe.

Devenv lets you set various options for the integrated development environment (IDE), and also build, debug, and deploy projects, from the command line. vcexpress does not have all the switches of devenv.

MSDN now recommands using MSBuild instead of devenv to build projects. MSBuild seems to come along with VC Express at no cost.

Start by building a softimage example from the sdk to test the environment.

Similar method for VCE 2010



There is also a bat file that you can program to start VSE from the Softimage command line. Not in front of Soft at the moment but as soon as I can I'll post my bat file content.
Last edited by Daniel Brassard on 22 Jan 2015, 16:09, edited 2 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

User avatar
FXDude
Posts: 1129
Joined: 19 Jun 2012, 21:59

Re: building c++ plugins for 7.01

Post by FXDude » 21 Jan 2015, 22:58

That's a great (important) find! (addressing something that seems to be tricky)
So thanks so much for your help Daniel! (and of course Leo)
:-!

It seems to nail what you were looking for Manticor, but do let us know how it goes.

luceric
Posts: 1251
Joined: 22 Jun 2009, 00:08

Re: building c++ plugins for 7.01

Post by luceric » 22 Jan 2015, 02:29

the XSI sdk intructions tell you to start devenv from a softimage command shell not to do a build, but rather so that it will inherit the variables that point to where the XSI SDK is installed. devenv is the command to start the Visual Studio GUI. If it's something else for vc express, start that .exe instead.

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: building c++ plugins for 7.01

Post by Daniel Brassard » 22 Jan 2015, 03:21

Here is an example of the .bat file that work with VCExpress. This file works for VC2010 / Softimage 2013.

Bat file targeted for a 32-bit environment

Code: Select all

@echo off

call "C:\Program Files\Autodesk\Softimage 2013\Application\bin\Setenv.bat"
call "H:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86

set PATH
set XSISDK_ROOT="C:\Program Files\Autodesk\Softimage 2013\XSISDK\"

"H:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" /useenv

echo on
This one is the same as above but for a 64-bit environment

Code: Select all

@echo off

call "C:\Program Files\Autodesk\Softimage 2013\Application\bin\Setenv.bat"
call "H:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" amd64

set PATH
set XSISDK_ROOT="C:\Program Files\Autodesk\Softimage 2013\XSISDK\"

"H:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" /useenv

echo on
To note:

Code: Select all

"C:\Program Files\Autodesk\Softimage 2013\Application\bin\Setenv.bat"
point to the setenv file of softimage, if on 7.0 it should be C:\Softimage\XSI_7.0\Application\bin\Setenv.bat

Code: Select all

"H:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
point to the Visual Studio version and location of vcvarsall.bat file on your harddrive. VCExpress 2005 is Microsoft Visual Studio 8.0, VC 2008 is version 9.0, VC 2010 is version 10.0, etc. Note the x86 argument at the end. For 32 bit application you call with the x86 argument, for 64 bit application, you call with the x64 or amd64 argument. Open vcvarsall.bat in a text editor to see all the argument choice of 32 and 64 bit application targeted if you are curious.

Code: Select all

XSISDK_ROOT="C:\Program Files\Autodesk\Softimage 2013\XSISDK\"
point to the softimage XSISDK location, for softimage 7.0 it should be

Code: Select all

XSISDK_ROOT="C:\Softimage\XSI_7.0\XSISDK\"

Code: Select all

"H:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" /useenv
Point to the location of vcexpress.exe executable file on your harddrive. note the /useenv ... Very important

/UseEnv
Causes the integrated development environment (IDE) to use Softimage PATH, INCLUDE, and LIB environment variables for Visual C++ compilation rather than the settings specified in the VC++ Directories section of Projects options in the Options dialog box.

Save your bat file on your harddrive with a distinct name for x32 and x64 application such as VC32XSIx86.bat or VC32XSIx64.bat. Open a command session within Softimage and run one of the bat file from there, VCExpress should start with all the link and environment variables set.

Good luck!
Last edited by Daniel Brassard on 22 Jan 2015, 20:05, edited 10 times in total.
$ifndef "Softimage"
set "Softimage" "true"
$endif

Manticor
Posts: 160
Joined: 09 Jun 2011, 22:41

Re: building c++ plugins for 7.01

Post by Manticor » 22 Jan 2015, 13:11

Wow I come back to this post after a few days and you've solved my problem.
Thanks very much Daniel ,very much appreciated

Lets see how I get on.Im determined to learn this side of xsi.

Manticor
Posts: 160
Joined: 09 Jun 2011, 22:41

Re: building c++ plugins for 7.01

Post by Manticor » 22 Jan 2015, 22:59

Just one more question (sorry)

Do I absolutely have to use vs2005 ? or is it possible to compile the same output with a newer version such as vs2008 or vs2010 ?

User avatar
Daniel Brassard
Posts: 878
Joined: 18 Mar 2010, 23:38
Location: St. Thomas, Ontario
Contact:

Re: building c++ plugins for 7.01

Post by Daniel Brassard » 23 Jan 2015, 02:44

I am not 100% sure but I think you have to match the runtime environment of Softimage as per this entry on Softimage eXSI blog.

http://xsisupport.com/2012/09/24/visual ... softimage/

Maybe Stephen or Luc-Eric can confirm.
$ifndef "Softimage"
set "Softimage" "true"
$endif

tarkovsky
Posts: 59
Joined: 05 Oct 2012, 20:02

Re: building c++ plugins for 7.01

Post by tarkovsky » 23 Jan 2015, 09:29

Curious as to what kind of extensions you would want to implement, and if they well be open sourced? ;;)

bests

Manticor
Posts: 160
Joined: 09 Jun 2011, 22:41

Re: building c++ plugins for 7.01

Post by Manticor » 23 Jan 2015, 20:12

Ill share whatever i create ...as much as i can.im mainly going to start with a couple of uv tools .But im mostly interested in the custom display host to get a game engine running in xsi viewport with camera and models synching.
But i think its going to be a while before i manage that

luceric
Posts: 1251
Joined: 22 Jun 2009, 00:08

Re: building c++ plugins for 7.01

Post by luceric » 23 Jan 2015, 21:07

Daniel Brassard wrote:I am not 100% sure but I think you have to match the runtime environment of Softimage as per this entry on Softimage eXSI blog.

http://xsisupport.com/2012/09/24/visual ... softimage/

Maybe Stephen or Luc-Eric can confirm.
I'm not sure, but it's possible that indeed this would work. but the sample projects with the SDK will not work out-of-the-box

tarkovsky
Posts: 59
Joined: 05 Oct 2012, 20:02

Re: building c++ plugins for 7.01

Post by tarkovsky » 24 Jan 2015, 14:57

Manticor wrote:Ill share whatever i create ...as much as i can.im mainly going to start with a couple of uv tools .But im mostly interested in the custom display host to get a game engine running in xsi viewport with camera and models synching.
But i think its going to be a while before i manage that
Not a gaming man myself, but sounds interesting and UV tools sounds good. Sharing sounds good too! Anyways, godspeed with developement.

t

Manticor
Posts: 160
Joined: 09 Jun 2011, 22:41

Re: building c++ plugins for 7.01

Post by Manticor » 24 Jan 2015, 16:32

ok i managed to get vc compiling properly now .Many thanks for the help .
I found that it wont work on windows 8.1 .. vc installs fine windows 7 sdk doesnt install and windows 8 sdk installs but no option for x64 build in VC after install
windows 7 works fine .

Thanks again for the help

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests