Wintermute Engine Forum
Wintermute Engine => WME Lite => Topic started by: Dan Peach on April 13, 2012, 11:58:03 PM
-
Ok, so I have my Mac and I have my xcode.....I don't understand what to do now. I'm starting right at the bottom with this iOS development, having not used a Mac ever before today. :(
I'm supposed to download the "sources", but where exactly can I find those? And once I have downloaded them, what do I do with them? And what are the "dependencies"...?
A little nudge in the right direction to get me on my way would be most helpful. :)
-
Sources - the software - can be downloaded from http://code.google.com/p/wmelite/downloads/list
Like most software nowadays, WME uses libraries provided by the operating system and third parties that are responsible for low-level functionality that would be very tedious for the software writer to do them himself. Sometimes, these are called "dependencies". In the link above, you will also find all the dependencies you will need.
cheers.
-
Thanks. :)
Which is the "source" download in that list? In the WME Lite documentation it says I should get the sources from the SVN repository, but I don't know how to do that.
And then, once I have these sources, what do I do with them?
I'm porting my current game from Windows to iOS just as a test, so I've changed all my WME scripts to take into account the iOS touchscreen, removed the video files, removed the rotating sprites etc., so I'm all ready to compile, but I don't know where to start with that as I've never used a Mac or Xcode before in my life. :)
-
Hi there... just a question ;D
Where should I put the data.dcp? In the wme lite documentation It says that I should put it inside "xcode-ios/wmelite" ... and there it is... (the compiled data.dcp from the wme touch demo)... When you open the project it appears inside the Resources folder.
The dcp runs on windows and mac, so I suposse I'm doing something wrong.
PS. Xcode debugger stops at class directory_iterator of operations.hpp, line "{ detail::directory_iterator_construct(*this, p, 0); }" with a EXC_BAD_ACCESS... with i suposse its "i dont find the file" sort of thing hehe :P
Thankss!!
-
A few more info... it stops when scanning packages... there are 4 paths, but it stops a the first one on "for (directory_iterator dit(absPath); dit != endIter; ++dit)"
Paths:
/private/var/mobile/Applications/68DABE61-187F-4CEF-9CF4-85FE1875291F/wmelite.app/./
/var/mobile/Applications/68DABE61-187F-4CEF-9CF4-85FE1875291F/wmelite.app/../
/var/mobile/Applications/68DABE61-187F-4CEF-9CF4-85FE1875291F/wmelite.app/Contents/Resources/
/private/var/mobile/Applications/68DABE61-187F-4CEF-9CF4-85FE1875291F/wmelite.app/data\
EDIT: More on that... when running on emulator it seems to pass the package checking... LOG:
12:17:32: Scanning: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./
12:24:11: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./data.dcp
12:24:18: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Default.png
12:24:20: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Icon-72.png
12:24:23: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Icon-Small-50.png
12:24:33: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Icon-Small.png
12:24:35: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Icon-Small@2x.png
12:24:37: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Icon.png
12:24:38: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Icon@2x.png
12:24:40: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./Info.plist
12:24:41: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./PkgInfo
12:24:42: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/./wmelite
12:25:44: Scanning: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/../
12:25:46: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/../.DS_Store
12:25:55: Scanning: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/Contents/Resources/
12:25:56: Scanning: /Users/MaaS/Library/Application Support/iPhone Simulator/5.0/Applications/58979FF0-943E-4C6B-806C-645B4694BAEA/wmelite.app/data\
12:26:01: Registered 1063 files in 1 package(s)
But when running on the device it breaks... if debugging you got "path absPath = system_complete(m_PackagePaths);" with the path "/private/var/mobile/Applications/68DABE61-187F-4CEF-9CF4-85FE1875291F/wmelite.app/./" inside but when you do "!exists(auxpath)" the path inside turns nil... :?:?:?
Is there any settings that could be preventing the app to access the directory?
-
Ok... I couldnt fix it hehe... not so used to xcode... so I just changed all the RegisterPackages() method looking for dcp files... to directly register the files.
:P
-
@MaaS:
I am having the same problem here... ???
[EDIT] I can probably do this, but, but, but, ... http://forum.dead-code.org/index.php?topic=5182.0
But I was unable to apply your solution. I mean...
1. operations.hpp [check]
2. directory_iterator class [check]
3. Apply RegisterPackages() [wrong]
Maybe you can share a .diff file trought pastebin or something for people like me to figure it out?
I really apreciate it.
-
Oh my, sorry...
I have to put that project on pause so I didnt come here for a while :/
What I did was to comment the part where the engine looks for any dcp file and register the package myself. It's just a patch...
The file is BFileManager.cpp, I changed the method HRESULT CBFileManager::RegisterPackages() for this thing :
//////////////////////////////////////////////////////////////////////////
HRESULT CBFileManager::RegisterPackages()
{
RestoreCurrentDir();
Game->LOG(0, "Scanning packages...");
/*AnsiString extension = AnsiString(".") + AnsiString(PACKAGE_EXTENSION);
Game->LOG(0, "Total Paths: %i", m_PackagePaths.GetSize());
for(int i=0; i<m_PackagePaths.GetSize(); i++)
{
path absPath = system_complete(m_PackagePaths[i]);
Game->LOG(0, "Paths: %s", absPath.string().c_str());
}
for(int i=0; i<m_PackagePaths.GetSize(); i++)
{
path absPath = system_complete(m_PackagePaths[i]);
//path auxpath = system_complete(m_PackagePaths[i]);
Game->LOG(0, "Scanning: %s", absPath.string().c_str());
//printf("Scanning: %s\n", absPath.string().c_str());
if (!exists(absPath)) continue;
// scan files
directory_iterator endIter;
//directory_iterator aux(absPath);
for (directory_iterator dit(absPath); dit != endIter; ++dit)
{
if (!is_directory((*dit).status()))
{
AnsiString fileName = (*dit).path().string();
Game->LOG(0, fileName.c_str());
if (!IsValidPackage(fileName)) continue;
//printf("%s\n", fileName.c_str());
if (!StringUtil::CompareNoCase(extension, PathUtil::GetExtension(fileName))) continue;
Game->LOG(0, "REGISTRANDO: %s -> %s",absPath.string().c_str(),dit->path().filename().string().c_str());
RegisterPackage(absPath.string().c_str(), dit->path().filename().string().c_str());
}
}
}*/
path absPath = system_complete(m_PackagePaths[0]);
RegisterPackage(absPath.string().c_str(), "data.dcp");
Game->LOG(0, " Registered %d files in %d package(s)", m_Files.size(), m_Packages.GetSize());
return S_OK;
}
As you see, everything is commented and I just did a
path absPath = system_complete(m_PackagePaths[0]);
RegisterPackage(absPath.string().c_str(), "data.dcp");
... And the file data.dcp is inside the resource folder of the project. I hope this helps and it's not too late :)
-
@MaaS:
I have more info on that matter. I know where is our problem, now. :)
It's in the boost library. WME uses many differents external dependencies, in particular
libboost_filesystem.a
libboost_system.a
Both of them must be compiled for the specific arquitecture/compiler/technology. I cannot be of more help, yet.
I'll create a new post on the forum regarding this specific issue.
Anyways, answering the former question, packages can be added wherever you want to, the important thing is that they reside inside the build.
See this screenshot of our build, for example, http://snag.gy/34ct9.jpg
ps: If you care about point-and-click adventures, you can vote for Reversion Chapter 2 on Greenlight - https://bitly.com/Swgnys