Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Questions about compiling WME Lite  (Read 5185 times)

0 Members and 1 Guest are viewing this topic.

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Questions about compiling WME Lite
« on: September 13, 2013, 07:26:13 PM »

Hello,
I'm currently working on a game using WME and I'd like to make some tests with WME Lite.

I'm trying to compile WME Lite but I have encountered some problems.
I've made some searchs on the forum and I've finally found the solution.

But I'm not a programmer so I've followed instructions without understanding anything at all.
Maybe someone more skilled can check if I made some mistakes? It would reassure me a lot.

Here is a step by step of what I did from the beginning.
I use Windows Vista.

Step 1 :
I clone the repository to a folder on my computer :

So in my folder I get this:


Step 2 :
I download dependencies for Visual Studio and I unpack them to visualc\dep directory.
So I get:


Step 3 :
I open the solution file (visualc\wmelite.sln) in Visual Studio.

I dont know what to choose so I try Visual C# Express 2008 and I get an error message.
Then I try again and I choose Visual C++ Express 2008 and it opens !

Step 4 :
Compiling wmelite.
In Visual Studio, I click on "Build solution" and I get this error message :

1>.\wme.rc(10) : fatal error RC1015: cannot open include file 'afxres.h'.



I've searched on the forum and I've found this topic :
http://forum.dead-code.org/index.php?topic=5098

Em, I don't know if this belongs here, but I'm having some problem building the code for wmelite with Visual Studio 2008 Express for Windows. I followed these instructions http://res.dead-code.org/doku.php/wmelite:building.

First off I get the error: "fatal error RC1015: cannot open include file 'afxres.h'." in wme.rc.
I looked around on the internet a bit, and I tried to solve it by changing it to 'windows.h', since that seemed to work for some people (on different projects though).

Now I get "error PRJ0019: A tool returned an error code from "Performing Post-Build Event..." instead. So yeah, I look at the post-build events,

@copy dep\bass\lib\*.dll $(TargetDir) > nul
@copy dep\sdl\lib\*.dll $(TargetDir) > nul
@copy dep\FreeImage\lib\*.dll $(TargetDir) > nul

Guess I'll just copy them manually and disable the post event. Seems to work.

So for me the solution would be to do this:

Quote
First off I get the error: "fatal error RC1015: cannot open include file 'afxres.h'." in wme.rc.
I looked around on the internet a bit, and I tried to solve it by changing it to 'windows.h',

Step 5 :
I open wme.rc on Notepad.
And I write 'windows.h' instead of 'afxres.h', on line 10 and on line 98.

I save.
I open the solution file (visualc\wmelite.sln) in Visual Studio.
I click on "Build the Solution"

I get a 32 warnings and new error message, the same Airwaffle spoke about (in the quote above):
"error PRJ0019: A tool returned an error code from "Performing Post-Build Event..."
So I look in BuildLog.htm and I see :

Code: C++
  1. @copy dep\bass\lib\*.dll d:\Atelier Sentô\the coral cave\wmelite\bin\Debug\ > nul
  2.  
  3. @copy dep\sdl\lib\*.dll d:\Atelier Sentô\the coral cave\wmelite\bin\Debug\ > nul
  4.  
  5. @copy dep\FreeImage\lib\*.dll d:\Atelier Sentô\the coral cave\wmelite\bin\Debug\ > nul
  6.  
  7. @copy dep\libtheoraplayer\lib\*.dll d:\Atelier Sentô\the coral cave\wmelite\bin\Debug\ > nul

Step 6 :
I go to 'dep\bass\lib\' and I copy 'bass.dll' to wmelite\bin\Debug
I go to 'dep\sdl\lib\' and I copy 'SDL2.dll' to wmelite\bin\Debug
I go to 'dep\FreeImage\lib\' and I copy 'FreeImage.dll' to 'wmelite\bin\Debug'
I go to 'dep\libtheoraplayer\lib\' and I copy 'libogg.dll', 'libtheora.dll', 'libtheoraplayer.dll' and 'libvorbis.dll' to 'wmelite\bin\Debug'

So, in my folder Debug, I have now all those files :



Step 7 :
I put the .dcp package file in the same directory, I double click on wmelite.exe... and it works, hooray!

Do you see any mistake or is WME Lite correctly compiled on my computer now?


I also have a few questions:

1- WME Lite seems to be compiled as "Debug" but I see on Visual Studio that I can choose "Release" instead.
Should I do that? Or maybe it doesn't matter?

2- I'm worried about the 32 warning I got when compiling WME Lite (in Step 5)
Here is my BuildLog.htm
Do I need to fix something? How? I understand nothing about this BuildLog!


Thank you for having read me.
I apologize for the long post: I've tried to be as complete and precise as possible.
Sorry too for the small bits of french in the pictures and the BuildLog. I hope they won't be a problem.

And if someone has answers to my questions, he would be very helpful. Thanks a lot in advance!
« Last Edit: September 13, 2013, 07:35:51 PM by Atelier Sentô »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Questions about compiling WME Lite
« Reply #1 on: September 13, 2013, 09:16:25 PM »

Thank you for the detailed report. I included the afxres.h change to the repository and changed the post-build event to handle paths containing spaces.

As for the warnings, they are harmless, but I also uploaded a new set of dependencies (dep_visualc2008_september2013.zip) which should get rid of the warnings.

The Debug build, as the name suggests, is intended for debugging; in reality it means the executable does some extra checks at runtime and it doesn't include some optimizations. As a result the Debug build can run significantly slower than the Release build.
For distribution always use the Release build. The Debug build won't even run on computers without Visual Studio installed.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Questions about compiling WME Lite
« Reply #2 on: September 14, 2013, 09:06:27 AM »

Thank you Mnemonic for both the explanations and the changes.
I'm going to test this tonight and I tell you if I have any problem.
Thanks a lot!
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Questions about compiling WME Lite
« Reply #3 on: September 14, 2013, 07:45:09 PM »

I've tried again, using the updated files, and I've met no problem at all.
I successfully compiled wme lite without any error or warning.
It's perfect!
Thank you, Mnemonic.

I have a little question:
When I compile, in the "Build" menu of Visual C++ Express 2008, I have the choice between "Build Solution" and "Build wme lite".
I've chosen the second one, am I right?

Thanks again for the help!
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Questions about compiling WME Lite
« Reply #4 on: September 16, 2013, 09:30:30 AM »

It doesn't really matter in this case. "Solution" in Visual Studio is a set of projects. Since wme lite solution only contains one project, both commands are equivalent (the first one compiles all projects in a solution, the other compiles only the specific project).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Questions about compiling WME Lite
« Reply #5 on: September 16, 2013, 11:02:17 AM »

Hi Mnemonic!

I will write here, not to create a new theme.
Is there any way to get rid of warnings when compiling for iOS in Xcode?
And also - is it possible to cache the sprites so then at the next load they are will read from the memory? Is the sprite's parameter "Keep in memory" intended for this purposes? Just for iOS difference with this parameter enabled and disabled when loading is not very noticeable, when have to load about of hundred of small sprites - have a long delay.
Logged

Atelier Sentô

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 52
    • View Profile
    • Atelier Sentô
Re: Questions about compiling WME Lite
« Reply #6 on: September 16, 2013, 01:21:00 PM »

It doesn't really matter in this case. "Solution" in Visual Studio is a set of projects. Since wme lite solution only contains one project, both commands are equivalent (the first one compiles all projects in a solution, the other compiles only the specific project).
OK!
Thank you for the answer. Everything is clear for me, now.
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: Questions about compiling WME Lite
« Reply #7 on: October 03, 2013, 10:33:06 AM »

Is there any way to get rid of warnings when compiling for iOS in Xcode?
There shouldn't be many warnings by now, just the warning about some deprecated functions.

And also - is it possible to cache the sprites so then at the next load they are will read from the memory? Is the sprite's parameter "Keep in memory" intended for this purposes? Just for iOS difference with this parameter enabled and disabled when loading is not very noticeable, when have to load about of hundred of small sprites - have a long delay.
You can create your own cache simply by creating an invisible entity and adding all the images you want to cache to its animation. "keep in memory" is only used for "straming" sprites, i.e. those that only load individual images just before they're to be displayed.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

2.0

  • Regular poster
  • ***
  • Karma: 4
  • Offline Offline
  • Posts: 217
    • View Profile
Re: Questions about compiling WME Lite
« Reply #8 on: October 03, 2013, 04:48:48 PM »

You can create your own cache simply by creating an invisible entity and adding all the images you want to cache to its animation. "keep in memory" is only used for "straming" sprites, i.e. those that only load individual images just before they're to be displayed.

Thank you! I've already found this method of caching, it works well :)
Logged
 

Page created in 0.206 seconds with 40 queries.