Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Visual C++ 2010 Express project wizard

Author
Message
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 17th Sep 2011 14:10
I have modified my original project wizard to cater for Visual C++ 2010 Express. The zip file contains two versions, one for if you installed AppGameKit to the 'Program Files' folder, and one for if you installed to the 'Program Files (x86)' folder. Instructions for installing are also included.

I hope this is of use to someone. If you find any problems with it please let me know, it works fine on my system but you never know ...

Of all the things I've lost .. I miss my marbles most of all.

Attachments

Login to view attachments
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 17th Sep 2011 14:22 Edited at: 17th Sep 2011 14:22
Hi Orac,

First of all thank you for taking the time to make this as I'm sure this will come in handy for myself and many others.

Ok, I followed the instructions in the readme file and everything went ok until I tried to create my first project with it. Here's the error I got and unfortunatley couldn't get around it. Didn't really make a difference if I clicked yes or no, everytime I tried to type something it came up. This is the 32 Bit version, running Windows 7, 4GB Ram ddr3, 1.73 intel i7 820qm. If you need more info just ask.



Attachments

Login to view attachments
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 17th Sep 2011 18:27
Hmm, that's interesting.

Common.js and Script.js are script files which contain the helper functions used by the wizards. They are standard Microsoft files that are installed with VC++ Express. The one I modified and included is called default.js and nothing to do with that file.

The error seems to indicate that there is something wrong with the first character in script.js. It may be a long shot, but if you open script.js in notepad, the first line should be a comment with the Microsoft copyright information. Try deleting the line and saving the file and then creating a project. You can see the location of script.js from the error.

Of all the things I've lost .. I miss my marbles most of all.
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 18th Sep 2011 05:44
Orac, I also get these messages which I think relate to the default.js.





Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 18th Sep 2011 10:52
Hi,

The error you are seeing is most likely because the html page default.htm cannot find the script.js helper file. The two errors point to functions that are defined in that Microsoft script. If you installed VC++ to the default location , then navigate to the following C:\Program Files\Microsoft Visual Studio 10.0\VC\VCWizards\1033\ and you should see four files there, two javascript (one of which is the script.js) and two stylesheet files. Open the script.js file in a text editor and you should see the function OnPress (in mine it is at line 450) and also setDirection (the second error) which is the first function in the script.js that is on my system.

I guess I could make my default.js stand-alone by including the necessary functions from script.js and common.js but I'm not sure what the copyright implications would be. Another alternative would be to copy both files into the same folder as default.js and adjust the paths to suit, but then you are doubling up on code which is not usually a good idea.

Of all the things I've lost .. I miss my marbles most of all.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 19th Sep 2011 16:59
I don't think Microsoft really cares since it's all open for modification.
Funnell7
12
Years of Service
User Offline
Joined: 8th Sep 2011
Location: UK, England
Posted: 20th Sep 2011 23:40
Hello Orac, does this work for Visual C++ 2008 Express? Everything seems fine until I click 'Ok' when creating a new project. I see AppGameKit listed, but once I enter a project name and click 'Ok', I see a message in the bottom left corner saying:

Creating project 'Test Project'... project creation failed.

Any ideas? Appreciate the support.
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 21st Sep 2011 14:49
I haven't got access to VC++ 2008 Expres so I can't really say whether it should work or not. My gut feeling is that it should, but hey this is Microsoft we're talking about

How far do you get? Do you get to the point where the AppGameKit Wizard pops up (as shown in the screen shots above) or do you not even get as far as the first screen? If you don't get as far as that, have you checked that the required files have been copied to the correct locations? The wizard (all wizards, not just AGK) rely on files being in very specific locations, some of the paths defined are relative to one another.

Of all the things I've lost .. I miss my marbles most of all.
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 24th Sep 2011 19:23
I am also getting the errors described above. Removing the copyright line did not make the first error go away.

I get an error on every keystroke. If I ignore the errors, I can fill the fields with data, but pressing the accept button generates an error that brings the process to a halt.

I think this would be a really good tool if it worked, please fix the bugs!

Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 25th Sep 2011 11:38 Edited at: 25th Sep 2011 12:12
@Rich

Sorry, but I can't find bugs in the wizard. Partly because it works perfectly on my VC++ 2010 Express installation and partly because the error message is indicating that the default.htm file (which I supplied) cannot find the function setDirection which is defined in the Microsoft supplied script.js file. On my installation this file is found at C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCWizards\1033. Make absolutely certain it is there otherwise the wizard will fail. If you look at the default.htm file, near the bottom at lines 191 to 205, this is where the path to the two files is set up. This is not my code, it is Microsofts.

Are you able to create a non-AGK project by using the wizard?

[Edit] I've attached a screen capture of the wizard in action, file size is 6MB.

Of all the things I've lost .. I miss my marbles most of all.

Attachments

Login to view attachments
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 25th Sep 2011 12:22
Quote: "Are you able to create a non-AGK project by using the wizard?"

I can create one using the vs10_template and linking the libraries.

XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 26th Sep 2011 20:49 Edited at: 26th Sep 2011 20:52
Yeah I don't understand why this works on yours but not on mine. I'm going to go back and redo my install for Express and see if that helps.
By the way where do you have the AppGameKit installed?
That might be the key to figuring out what the issue is.
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 26th Sep 2011 22:03
I just installed it to the default location, which in my case was C:\Program Files (x86)\The Game Creators\AGK\. I don't think that is the problem though, if the AppGameKit was installed in some other place then when you tried to compile a project it would fail because it couldn't find the headers and libraries. The problem most people seem to be having is the wizard not being able to find the supporting javascript files.

Can you post the path you have to the two javascript files (script.js and common.js)?

Of all the things I've lost .. I miss my marbles most of all.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 27th Sep 2011 03:40 Edited at: 27th Sep 2011 04:23
They can be found in
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\VCWizards\1033

By the way I wanted to mention that I think you got the Packages for the 32bit and 64bit backwards. I was looking at the default.js script under the 64 bit Folder from your Zip and it mentions the default path for the 32 Bit version.



Would it be possible to get a new package build? Maybe that could correct the issues we are having considering it's working on your one system.
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 27th Sep 2011 09:17 Edited at: 27th Sep 2011 09:20
@XanthorXIII

The packages are the correct way round but maybe my explanation is not too good ..

When I mention 32-bit/64-bit I'm talking about the version of Windows. By default, 64-bit versions of Windows install native 64-bit programs into a folder called C:\Program Files\ and 32-bit programs into a directory called C:\Program Files (x86)\ whereas 32-bit Windows installs everything by default into C:\Program Files\.

Perhaps what I should have said is the 64-bit version is for if you have installed everything (both AppGameKit and VC++) into the (x86) folder and the 32-bit version is for if you have installed everything into the C:\Program Files\ folder.

From the look of your path, you appear to be using a 64-bit version of Windows (because of the (x86) bit) so you should use the 64-bit package. I'm still confused though because the paths are only important when it comes to compiling and building because they define where the project has to look for the libraries and headers. If you look in default.js lines 144-145 for example



you can see what I mean. The 32-bit version doesn't have the (x86) bit in the path.

BTW, I have tested both versions, one on my VC++ Express, 64-bit Windows 7 machine at home and the other on VC++ Express, 32-bit Windows XP at work before releasing and both worked fine.

I'm away on holiday for my sons wedding for a week now so may not get chance to reply much, keep plugging away, I'd really like to get to the bottom of this!

Of all the things I've lost .. I miss my marbles most of all.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 28th Sep 2011 00:12
Orac,
Did you do the install on a Clean box that does not have Visual Studio 2010 installed? I think that the scripts being used for Visual Studio 2010 are different than the ones for Express which is why it's working for you but not for us. I did an install on my laptop with XP this morning that did not have Visual C++ Express
or AGK. Completed both, loaded the template for 32Bit tried it, same error.
We need to try to break this process down to each step to see where the issue is occurring.
Spinkii
12
Years of Service
User Offline
Joined: 28th Sep 2011
Location: Perth, UK
Posted: 28th Sep 2011 12:02
Hi Guys,

I haven't had a problem using it - it worked first time for me. The following procedure worked well (using 32-bit Windows 7), when installing it:

1. Copy the ZIP file to a temp folder, e.g. c:\Temp.

2. Extract the entire contents of the ZIP file to the same folder.
- You should end up with a folder of the same name, containing a 32-bit folder and a 64-bit folder (and a README file).

3. Open up the folder for your system in Explorer. In my case, it was the 32-bit folder.

4. Open the following folder in a /new/ Explorer window:
C:\Program Files\Microsoft Visual Studio 10.0\VC

(Remember, if you've got a 64-bit version of Windows, the Program Files folder is actually "Program Files (x86)")

5. Drag and drop *BOTH* of the folders from the 32-bit (or 64-bit) folder, into the *VC* folder you've just opened.

At this point, Windows should ask you to MERGE the folders - you want to say YES to this, as it's not replacing files - only adding files into the folder structure.

6. Start Visual Studio, click "New Project" and look for the AppGameKit template under the VC templates list.

Hopefully this should help!

-- Spinkii
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 28th Sep 2011 15:16
Spinku - I followed your steps exactly, and still get all the script errors from above. I'm going to give up on this wizard and just copy the template project whenever I start a new project, it's too much hassle trying to debug somebody else's code.

Spinkii
12
Years of Service
User Offline
Joined: 28th Sep 2011
Location: Perth, UK
Posted: 28th Sep 2011 19:33 Edited at: 28th Sep 2011 20:07
Stand by for more instructions...

-- Spinkii
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 28th Sep 2011 20:08
@Rich,

Sorry to hear you're giving up on this.

I did a bit of Googling and found out that this error is
Quote: "The infamous IE runtime error "Line: 1 - Invalid Character""

http://www.techrepublic.com/forum/questions/101-307557 and is generated when the script file cannot be found.

I have tried installing the scripts on a completely fresh install of Windows XP/VC++ Express/AGK (in a virtual machine) and it works perfectly! I can't debug something that doesn't fail I stand by my earlier posts that the default.htm file cannot find the two Microsoft script files. It should be possible to copy both Microsoft files to the same location as the wizard script file and adjust the path at the bottom of default.htm so it doesn't have to go looking for them, other than that I'm at a loss to suggest anything else, sorry.

I'm happy to see Spinkii has managed to get it installed and working.

Of all the things I've lost .. I miss my marbles most of all.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 28th Sep 2011 21:21 Edited at: 28th Sep 2011 21:22
I went through the steps you recommended, same issue as Rich. I even went as far as modifying the HTML file to point directly at the files. Same result. I even went as far as hiding the two script files to see if that would produce the same result. It actually didn't run. I hid one and it produced an error.
I'm starting to think that this is more of a Javascript issue at this point with them not being allowed to run, security or something else completely off the wall.
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 29th Sep 2011 03:13
Got it working! What I did was copy/paste the common.js and script.js into the same folder as default.htm and it works!

XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 29th Sep 2011 03:56
Anything else that you may have tried? I just did that, same result as before, it still errors out on me.
Hodgey
14
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 29th Sep 2011 04:06
I played around with the code in the default.htm file but I'm pretty sure I reverted it back to what it originally was. At the bottom of your default.htm does it have this?



XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 29th Sep 2011 07:34
Yes it does.
Spinkii
12
Years of Service
User Offline
Joined: 28th Sep 2011
Location: Perth, UK
Posted: 29th Sep 2011 12:02
Hmm... It's interesting I managed to get it to work first time - granted it wasn't on a fresh install, it was on an existing setup of Visual Studio (on Windows 7) - so maybe my security settings are slightly more relaxed?

From the errors people are getting, it certainly seems like there's some kind of JavaScript security going on. Since the wizard uses the IE rendering engine, it's quite possible the trust levels for the Local Zone aren't allowing the other scripts to execute.

Maybe you should take a look at your zone security, and see if there's anything that might be preventing loading external JavaScripts.

-- Spinkii
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 29th Sep 2011 21:04
At this point I've given up on the Wizard. I've figured out how to add the Libraries and Include paths to the Project so I can just copy it to a new folder of my choice and set it up.
Orac, I have no doubt it works just that in some cases configuration is getting in the way of this such as my machine's and Rich's.
HuntTheShunt
12
Years of Service
User Offline
Joined: 25th Jan 2012
Location:
Posted: 27th Jan 2012 14:44
Any chance of us having your VS2010 project so we can debug it?
HuntTheShunt
12
Years of Service
User Offline
Joined: 25th Jan 2012
Location:
Posted: 27th Jan 2012 14:51
Hi Orac,
I'm having all the problems shown here.
Could we have your vs2010 wizard project so that we can debug the code to find what is going wrong for our installations?
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 28th Jan 2012 01:09
@HuntTheShunt
It's all in the zip file.

Of all the things I've lost .. I miss my marbles most of all.
HuntTheShunt
12
Years of Service
User Offline
Joined: 25th Jan 2012
Location:
Posted: 28th Jan 2012 10:32
Orac,
I've never built a Wizard but the zip seems to contain the results of a VS2010 project.
I was hoping for the VS2010 project that created the wizard.
*.sln;*.suo;*.vcxproj and all it's associated files.
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 30th Jan 2012 13:08
I didn't create it from a project, I took an existing wizard and modified it to suit.

Of all the things I've lost .. I miss my marbles most of all.
MobileCreator
12
Years of Service
User Offline
Joined: 1st Jun 2011
Location: Ottawa - Canada
Posted: 30th Jan 2012 16:00
I've got the file from here, and followed the instructions. It worked like a charm for me. I'm using Visual Studio express 2010 on Windows 7 32 bits.

Great job! Thanks!


Cheers

----------
Paulo
http://www.mobilecreators.com
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 30th Jan 2012 16:58
I made a new project wizard in 2008 c++ to see if the code works. It works until I compile it and get a few errors with sprites.

Go through yourself at a wall.
Orac
17
Years of Service
User Offline
Joined: 16th May 2006
Location: Billingham
Posted: 6th Feb 2012 13:44
@MobileCreator,
Glad it worked for you

@3D point in space
The compile errors shouldn't be related to the wizard. All the wizard does is create a stub program. If you click compile immediately after creating a project from the wizard and before you add any code it should work. Are you able to do this? What are the errors you are getting?

Of all the things I've lost .. I miss my marbles most of all.
3d point in space
14
Years of Service
User Offline
Joined: 30th Jun 2009
Location: Idaho
Posted: 7th Feb 2012 23:16

this is the errors i get from creating a new wizard and coping your code to 2008.

Developer of Space Chips, pianobasic, and zipzapzoom apps.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 8th Mar 2012 06:42 Edited at: 8th Mar 2012 06:53
Ok, I figured out what the hell was going on. Seems Microsoft turned security up too much in Windows 7.
For the files you want to copy to the folder you basically have to go through and unblock all the files. Just right click on the file and there should be an option called unblock.
I found that out from here
http://www.cocos2d-x.org/boards/12/topics/7534
Microsoft gives me a headache sometimes.
For those that were having the issue under Visual Studio Express 2010 please give this a try. I did and the project wizard now runs without error.
Next time I see a Microsoft Windows Developer I'm going to punch him in the jaw.
And Orac, thanks for making this wonderful wizard. It's a shame I didn't figure out what the issue is until now but oh well. On to converting my game.
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 16th Mar 2012 07:11
Orac: TGC Really needs to implement your solution as an install. It works very nicely once you get past the Blocked Files that I ran into.
One thing that I would like to recommend. If you are going to set the Virtual Resolution, please provide a Radio Check to set it by Virtual or by Percentage. That would be great!
Thanks.
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 16th Mar 2012 10:37
I can make an MSI installer for it in a couple of minutes if that would help... just shout!

-- Jim
XanthorXIII
AGK Gold Backer
12
Years of Service
User Offline
Joined: 13th May 2011
Location:
Posted: 25th Mar 2012 03:40
@JimHawkins - Yeah that sounds like a great deal. Although this was really Orac's project to begin with I don't just want to bully him out. There are a couple of things I think would really be great for this that I would like to see done slightly different.
And that's it really.

Login to post a reply

Server time is: 2024-05-02 06:24:36
Your offset time is: 2024-05-02 06:24:36