Interested in working on Construct Classic?

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Sat Apr 16, 2011 2:30 pm

You only need the UI library for the editor, so you can change the runtime and plugins without it. You can still also change the editor code, you just can't build it... :( - that's part of why we started with a clean slate for C2.
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Sat Apr 16, 2011 9:44 pm

[quote:zs0pcldj]Here's one question to all who already work on plugins, and please don't be annoyed. :oops:
I saw the thread, where it is explained that you need something for VS Express in order to work on plugins. But I really don't get it. There's something like a 600 MB download, but then again you only need certain parts of it. I don't even know, what functionality it has. And where to install them and how to integrate them, so VS Express knows about it? Isn't there an easier way?[/quote:zs0pcldj]
After you install Visual C++ Express the only thing left for you to do to be able to build the plugin templates in th sdk is to get a hold of the ATL and MFC libraries. The ATL and MFC libraries are basically a gui toolkit that is included in the Full version of Visual Studio, but not the express versions.

I was able to get an outdated version of those libraries that work from the WDK (Windows Driver Kit). Here is a link to the latest WDK ~600mb. I used a slightly older version that I can't download anymore, so hopefully the needed files are still there. You may also be able to get the same files from the "Windows Server 2003 R2 Platform SDK" ~400mb, newer versions of the SDK don't have the files.

Then all that left is to let Visual C++ Express know where to find the mfc/atl includes and libraries. This Link has a good explanation to how it's done.

Also here is another post that may be useful in getting it working:[url:zs0pcldj]http://www.scirra.com/forum/viewtopic.php?f=7&t=5600&start=10#p44745[/url:zs0pcldj]

At this point you should be able to build the template plugins and many of the plugins in the SVN. There may be some code or settings you may need to tweak here and there to get it to work, but nothing major. If you want to be able to build the sprite plugin or construct's runtime you will also need the DirectX SDK August 2009 ~540mb.

The only easier alternative is to buy Visual C++ then the only other file needed would be the directx sdk. If you have any other questions or problems let me know.

-cheers
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Sun Apr 17, 2011 10:42 am

Thank you very much, ROJOhound! This was very helpful, incl. the links. I will give it a serious try now :)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Mon Apr 18, 2011 3:21 am

I hope I'm not derailing this thread too much but here's another easier way to be able to build plugins without the large sdk downloads.

Installing visual c++ express and construct's SDK still are necessary steps.
Next I found that all that was needed from the MFC and ATL libraries was the CString class.
You can find a free replacement here, just 36kb :D .

Copy "StdString.h" from that zip to the "/Template Win32 VC8-9 Static/" folder.
Edit "StdAfx.h" and comment out these two lines:
[code:2jvgwa5p]#include <atlstr.h>
#include <atltypes.h>[/code:2jvgwa5p]
and add these two lines:
[code:2jvgwa5p]#include "StdString.h"
typedef CStdString CString;[/code:2jvgwa5p]

Next:[url:2jvgwa5p]http://sourceforge.net/apps/mediawiki/construct/index.php?title=How_To:_Create_a_plugin[/url:2jvgwa5p]
B
79
S
24
G
53
Posts: 4,728
Reputation: 40,219

Post » Mon Apr 18, 2011 1:11 pm

Wow, ROJOhound, you should turn your last post here into a separate thread, and it should be stickied.

I did exactly what you proposed, and the only thing additionally left to do was to open "ConstructSDK.rc" and comment out
[code:1leexwxx]#include "afxres.h"[/code:1leexwxx][size=85:1leexwxx](I replaced it with "windows.h" instead of commenting out, but I think this is nonsense)[/size:1leexwxx]

and
[code:1leexwxx]#include "afxres.rc"[/code:1leexwxx]

afxres is part of mfc, but I'm working with the "Template Win32 VC8-9 Static", so I simply hope, that they aren't needed.

I've gone through the GradientCalc Tutorial and successfully created the plugin and it works without problems. That encourages me to think, afxres isn't needed...

Summary:
To be able to create plugins for Construct 0.x, you need
1) Visual C++ 2008 Express
2) Construct's plugin SDK
3) WtlStdString
4) changes to the template as described by ROJO and me

...no 600MB downloads needed anymore :)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Mon Apr 18, 2011 3:47 pm

Since the files needed are freely available, couldn't you just create a zip of the files, changes, while keeping folder structure, and add that to the SDK?
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Tue Apr 19, 2011 11:26 pm

I wouldn't recommend changing the SDK this way. It still is a quick'n'dirty patch, and was only tested with the creation of a relative simple plugin. I'm still in doubt if all string tasks will work.

But if it is fine for Scirra, I could prepare an alternative download. Then everyone can freely decide wether to get the official SDK, or the at-your-own-risk patched version.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Apr 30, 2011 1:05 am

As a monkey just poking around, I think that would be a pretty good idea.
I did try the posted fixes, and had one error:
[code:1eukctmm]LINK : fatal error LNK1168: cannot open ..\..\IDE\Plugins\Runtime\Template.csx for writing[/code:1eukctmm]
Then again that might just be a firewall issue, or nothing at all, as apparently it did seem to compile ok.

[code:1eukctmm]+ Template: My condition
-> Template: Example action (Template.MyExpression)[/code:1eukctmm]
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat Apr 30, 2011 1:44 am

If the IDE is open, you can't compile over the .csx files it has loaded (Windows prevents writing to files that are open). Try closing Construct and building again.
Scirra Founder
B
359
S
214
G
72
Posts: 22,948
Reputation: 178,532

Post » Sat Apr 30, 2011 3:47 pm

Could have sworn it was closed, but I made sure it was closed, and it went with no errors the second time.
Thanks.

So there you have it, If I can can get it to work with no experience in C++ then just about anybody can.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

PreviousNext

Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 1 guest