-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TEMPORARY] Steps to build Wesnoth #1
Comments
Hi! I made some notes and wrote some shell scripts to simplify the compilation. Maybe they are of some help for others, or the future development of this port, so I put them here: So, the questions I have: (2.) I could not get it working with the separate workspace and clone-into directories you mention in the manual. (3.) I had problems for pixman and pango with libtool versions. (4.) I do not really understand how to create the assets part in the bar-descriptor.xml correctly. Finally, please have a look at the note on the Wesnoth build_for_playbook.sh - is this just a typo? If so, maybe you should correct it in your repo!? |
Ah, I forgot: workspace/wesnoth/src/lua/lcode.c:243: error: 'v' may be used uninitialized in this function ... which does not make the slightest sense to me, as:
So - some more questions: |
Yes, it's a typo. Good catch! -----Original Message----- Hi! I made some notes and wrote some shell scripts to simplify the compilation. Maybe they are of some help for others, or the future development of this port, so I put them here: So, the questions I have:
Finally, please have a look at the note on the Wesnoth build_for_playbook.sh - is this just a typo? If so, maybe you should correct it in your repo!? Reply to this email directly or view it on GitHub: This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. |
Excellent questions. All of this was a work-in-progress so I haven't really tried out release mode. The function is probably being inlined and in one of the places that it's called, it may be uninitialized (according to the compiler). Are there any more messages around the particular error to indicate how it is called? -----Original Message----- Ah, I forgot: workspace/wesnoth/src/lua/lcode.c:243: error: 'v' may be used uninitialized in this function ... which does not make the slightest sense to me, as:
So - some more questions: Reply to this email directly or view it on GitHub: This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. |
(1.) Atleast I think having a /etc dir for the pango.modules file next to the /lib dir is a little cleaner (as it mirrors the linux path layout) than the pango dir in the root of the sandbox. Actually I was not allowed to create that anyway ... (2.) I think now I understand what the intended way to do this is: (4.) I saw the assets interface, but did not really get how to use it. I will have a further look into it. I think I would prefer some command line tool to add assets to the xml file... Maybe one could whip something together using Python's minidom ... Anyway, it would probably be better to just have the modules' dir as an asset, and not each file itself, right? Regarding the release build: But: v.value.b = 0; I guess the variable 'v' is initialized by a function called 'setnilvalue'. The compiler does not see this as an assignment and thus complains. 'v' is a 'TValue', which is a struct containing a 'Value', which is a union containing several other variables, one of them being 'b'. If one does an assignment to any of those variables the compiler stops to complain, I choose the 'b' as it is just an int, while the others are yet more complex things. I guess this does not hurt, as 'setnilvalue' is called afterwards anyway, but on the other hand this has the potential to mess things up. I'm really not sure, as this is a rather complex layered type, and I don't understand much ... |
----- Original Message -----
Anyway, it would probably be better to just have the modules' dir as an asset, and not each file itself, right? Regarding the release build: But: v.value.b = 0; I guess the variable 'v' is initialized by a function called 'setnilvalue'. The compiler does not see this as an assignment and thus complains. 'v' is a 'TValue', which is a struct containing a 'Value', which is a union containing several other variables, one of them being 'b'. If one does an assignment to any of those variables the compiler stops to complain, I choose the 'b' as it is just an int, while the others are yet more complex things. I guess this does not hurt, as 'setnilvalue' is called afterwards anyway, but on the other hand this has the potential to mess things up. I'm really not sure, as this is a rather complex layered type, and I don't understand much ... Reply to this email directly or view it on GitHub: This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful. |
(1.) Yes, exactly - that's what I did. See: (2.) Maybe one could clarify this step, like so: (4.) Okay, I'll have another look at this. One last question about it: Is it possible to replace the absolute path with something generic? If we use separated directories as in 2. I guess we can't use ${workspace_loc:... There is no variable holding the building directory, is there? |
NightJens, if you want to add a directory (like lib/modules), you can just add the directory name as an asset. No need to add the 16 or so libraries individually. |
Yes, thanks for noting that ... Actually that was what I meant when I wrote earlier:
... I just didn't bother trying. |
WARNING: The steps below are in constant flux, include numerous hacks and are likely incomplete in certain places!
All required repositories, with the exception of SDL and TouchControlOverlay, are located in my github. Because this is a work in progress, there are quite a few hacks, but we are working to remove them.
First get SDL and TouchControlOverlay from blackberry github. Import them into your workspace, and change TouchControlOverlay to use the GNU runtime instead of the default one. This can be done under the project Properties -> C/C++ Build -> Settings -> Target -> Runtime.
The list of repositories you will need, in rough build order:
Clone all projects above into the same directory, and then make a separate workspace directory to import projects into the NDK.
In each of the projects that weren’t imported into the NDK, there should be a build_for_playbook.sh script that basically sets up the environment variables and runs configure and make. They all expect to install themselves in a directory called install at the same level as all the projects. However, there are a few additional problems.
You can build all the NDK projects, except boost_headers – it’s a header only project which is not meant to be built. Make sure TouchControlOverlay builds with the same build configurations as all other projects (either Device-Debug or Device-Release) and uses the GNU runtime. Don’t build wesnoth yet.
Hacks
You will need to get libintl.h from here and copy it to your NDK include directory - bbndk-2.0.0/target/qnx6/usr/include. The library is present on the device, but its header is missing from the current version of the NDK (should be in future versions though).
There are three pkgconfig files that you need to add manually to install/lib/pkgconfig before you can build cairo and wesnoth. You can create your own or get them here. Everything’s already in the NDK folders, there’s just no pkgconfig file to point to them. Cairo needs the libpng.pc and wesnoth needs freetype2.pc and fontconfig.pc.
Glib is also messy, since it has a few issues with cross compilation. In particular, you will need a HOST version of glib-compile-resources and glib-genmarshal. These don’t necessarily come with the devel packages so you may need to compile glib the normal way and install it to somewhere in your path so glib will work. If you feel like it, you may be able to get away with disabling the compilation of glib tests instead.
You may also encounter problems with older versions of libtool and autoconf – these repositories are the latest releases of everything, with as few changes for PlayBook as possible, so I’ve had difficulties with older versions in some cases.
Wesnoth is a special case. It builds with cmake, but I’ve wrapped the cmake build with a NDK project. I may not have wrapped it in a completely portable way, so basically look in the common.mk file to see how I call the cmake build (through build_for_playbook.sh, but with lots of options).
In terms of running, pango may give you problems, since it needs to be able to run pango-querymodules and generate the pango.modules file.
The text was updated successfully, but these errors were encountered: