ToME: the Tales of Maj'Eyal
http://forums.te4.org/

ToME 2 maintenance
http://forums.te4.org/viewtopic.php?f=1&t=21344
Page 10 of 22

Author:  AnonymousHero [ Sun May 01, 2011 9:24 am ]
Post subject:  Re: ToME 2 maintenance

jtwadsworth wrote:
@AnonymousHero - well I'd think the place to start would be the Makefile.osx from Angband 3.2.0 and see how it builds the .app? I don't think anything in particular is needed other than the instructions to make on how to build the .app from the complied executable.

I'm not confused as to the process -- it's the practicality that's the problem. I don't have any OS X system to build on... and given the complexity of the old makefile.osx it's practically impossible to get anywhere near a working build under such circumstances.

If you feel like having a go at it, I'd be happy to help any way I can.

jtwadsworth wrote:
Been hanging out in Angband IRC. As I look through the ToME source, it seems all the pieces are there for an OS X specific build, including the handling of the UI (main-crb.c), icons, etc; which makes sense since DG posted long ago an OS X .app build (which I still play) but I never had the source for it. I can possibly take the Makefile.osx from Angband and adapt it to ToME.

I have no idea whether main-crb.c actually works any more, but assuming it did at some point, I don't think I've changed very much of the "core" functionality on which it depends.

jtwadsworth wrote:
But we are using Cmake now instead of make which confuses me a bit since there are no makefiles.

CMake generates makefiles automatically from the high-level description in CMakeLists.txt -- it shouldn't be necessary to muck about in the generated makefiles. I think CMake may have some "native" bundle-building support -- you could try searching around a bit in the CMake documentation.

Author:  jtwadsworth [ Sat May 07, 2011 3:26 am ]
Post subject:  Re: ToME 2 maintenance

AnonymousHero wrote:
I'm not confused as to the process -- it's the practicality that's the problem. I don't have any OS X system to build on... and given the complexity of the old makefile.osx it's practically impossible to get anywhere near a working build under such circumstances.

If you feel like having a go at it, I'd be happy to help any way I can.

I have no idea whether main-crb.c actually works any more, but assuming it did at some point, I don't think I've changed very much of the "core" functionality on which it depends.


Well, I'm hoping it could be something as simple as adding to the top CMakeLists.txt something like:
Code:
if(MACOSX)
  ADD_DEFINITIONS(-DMACOSX)
  SET(EXECUTABLE_OPTIONS MACOSX_BUNDLE)
  SET(LIBS ${LIBS} macosx)
endif(MACOSX)


Now I know I have the syntax wrong, but CMake docs do mentions this functionality...I just need to learn or get from other what LIBS settings to use. Elsewhere I'd have to set what icon to use, and other such settings as:
Code:
MACOSX_BUNDLE_INFO_STRING
MACOSX_BUNDLE_ICON_FILE
MACOSX_BUNDLE_GUI_IDENTIFIER
MACOSX_BUNDLE_LONG_VERSION_STRING
MACOSX_BUNDLE_BUNDLE_NAME
MACOSX_BUNDLE_SHORT_VERSION_STRING
MACOSX_BUNDLE_BUNDLE_VERSION
MACOSX_BUNDLE_COPYRIGHT

Author:  AnonymousHero [ Sat May 07, 2011 5:52 am ]
Post subject:  Re: ToME 2 maintenance

The first block looks quite reasonable. What happens when you add this to the CMakeLists.txt and recompile?

Some of the other variables are probably "arbitrary" in some sense, but I'm guessing MACOSX_BUNDLE_ICON_FILE should probably point to "Angband.icns" (not sure if it should be the path inside the final bundle or just the path while building).

Note: You may have to remove CMakeCache.txt before running "cmake .", otherwise it may not pick up the changes!

Author:  jtwadsworth [ Sat May 07, 2011 6:05 pm ]
Post subject:  Re: ToME 2 maintenance

AnonymousHero wrote:
The first block looks quite reasonable. What happens when you add this to the CMakeLists.txt and recompile?

Some of the other variables are probably "arbitrary" in some sense, but I'm guessing MACOSX_BUNDLE_ICON_FILE should probably point to "Angband.icns" (not sure if it should be the path inside the final bundle or just the path while building).

Note: You may have to remove CMakeCache.txt before running "cmake .", otherwise it may not pick up the changes!


Not ready to start compiling yet; I know there is much more to do as you alluded to above, as far as telling CMake where to look for other files; the Carbon directory under src has all the old files used by make/Makefile in prior builds...thank you for not removing those. And indeed, main-crb.c is still there and working (at least in Angband it does well). Here is where I am now in the toplevel CMakeLists.txt so far:
Code:
#
# MAC OS X
#
IF(APPLE)
   #SET(GUI_TYPE MACOSX_BUNDLE)
   INCLUDE_DIRECTORIES ( /Developer/Headers/FlatCarbon )
   FIND_LIBRARY(CARBON_LIBRARY Carbon)
   FIND_LIBRARY(QUICKTIME_LIBRARY QuickTime )
   FIND_LIBRARY(APP_SERVICES_LIBRARY ApplicationServices )
   MARK_AS_ADVANCED (CARBON_LIBRARY
                     QUICKTIME_LIBRARY
                     APP_SERVICES_LIBRARY)
   SET(EXTRA_LIBS ${CARBON_LIBRARY} ${QUICKTIME_LIBRARY} ${APP_SERVICES_LIBRARY})
ENDIF (APPLE)


I am hoping that no more framework files are needed. I think those are the same 3 that are in the Angband Makefile.osx so it makes sense to translate that to our CMakeLists.txt

jtw

Author:  Chryana [ Tue May 17, 2011 1:24 am ]
Post subject:  Re: ToME 2 maintenance

Hi. First off, I would like to thank you for pursuing the maintenance of tome 2. It is still a fun game. I am contacting you because I've had troubles running the current head version (b35abe4978f83bee7eebdcce7df4228503086ed4). I run Debian testing, and I have installed all the packages required to get the SDL, X11 and ncurses support recommended in the README.txt (build-essential, libx11-dev, libsdl-image1.2-dev, libsdl-ttf2.0-dev, libncurses5-dev), yet when I try to run the executable, no matter the switch (-mx11, -xgcu or -msdl), I get the error message
Code:
./src/tome: Unable to prepare any 'display module'!
. Your help to fix this issue would be greatly appreciated. Thank you, and have a nice day.

Author:  Chryana [ Tue May 17, 2011 1:40 am ]
Post subject:  Re: ToME 2 maintenance

Right after posting my comment I realized I ran cmake . from within the src directory instead of the root directory tome2. :( After correcting this, I can get it to compile, as long as SDL support is disabled. My apologies.

Author:  darwin [ Sun Jul 17, 2011 2:52 am ]
Post subject:  Re: ToME 2 maintenance

Will there be a place to download a tar.gz? Some people make builds for various distros, and if a user's computer cannot get source by ftp or something, builds do not work.

Author:  Lord Estraven [ Sun Jul 17, 2011 7:45 pm ]
Post subject:  Re: ToME 2 maintenance

Gitorious can auto-generate a tarball. There should be a button for that in the tree view.

Author:  darwin [ Sun Jul 17, 2011 9:33 pm ]
Post subject:  Re: ToME 2 maintenance

Ok, but ftp cannot access some 'button.' Without stable releases being accessible at a certain URL, builds for various distros are dead: Tome 2 will not have as many players.

Author:  Lord Estraven [ Sun Jul 24, 2011 6:54 pm ]
Post subject:  Re: ToME 2 maintenance

D'oh, sorry, I hadn't thought of that. You'll have to ask AnonymousHero, he's the maintainer...

Author:  Shadus [ Wed Apr 18, 2012 3:30 pm ]
Post subject:  Re: ToME 2 maintenance

Does anyone have a current download for the current maintenance release of tome2 for the various platforms? If someone wants to compile them up I can provide hosting for them in a more permanent location so they're easily accessible on some kind of consistent basis.

Author:  Lord Estraven [ Wed Apr 18, 2012 9:58 pm ]
Post subject:  Re: ToME 2 maintenance

Thanks for reminding me about this, I'll ask AH.

For prospective compilers: be warned that it's difficult to build on Windows at the moment, and on OSX I believe only the Curses interface is working.

Author:  Lord Estraven [ Wed Apr 18, 2012 10:19 pm ]
Post subject:  Re: ToME 2 maintenance

Umm, just a thought... You could probably clone the repository, and then set up a script that
- cds into the cloned repo
- switches to the master branch
- pulls from git://gitorious.org/tome2/tome2.git
- switches to the most recent tag
and then make the script a cron job. This would basically get you the most recent stable tagged version, without having to mess around with tarball downloads that Gitorious may or may not provide.

(Mind, I wouldn't be surprised if git has a better way to do that built in.)

Author:  AnonymousHero [ Thu Apr 19, 2012 4:59 am ]
Post subject:  Re: ToME 2 maintenance

Re: Downloading.

The source for any particular tag can be retireved thus:
Code:
wget https://gitorious.org/tome2/tome2/archive-tarball/v2.3.9-ah


but beware that you may at first end up with a file containing the text
Code:
The archive is currently being generated, try again later

(it seems this will return HTTP status 202 in this case rather than 200, so you would probably want to detect that, rather than checking on the file contents)

but after a while (a few seconds when I tested), you'll get the proper archive.

I don't know if anyone has archived the actual binary builds anywhere -- there were some links earlier in this thread, maybe some of them still work?

HTH,

Author:  darwin [ Fri Jun 01, 2012 9:00 am ]
Post subject:  Re: ToME 2 maintenance

AnonymousHero wrote:
The source for any particular tag can be retireved thus:
Code:
wget https://gitorious.org/tome2/tome2/archive-tarball/v2.3.9-ah


That is confusing. What type of file is wget getting there? I put the file through 'tar xvf' and it worked, so I suppose it is a tar.gz. I will be able to update my SlackBuild. However, without a normal explanatory webpage for Tome 2 with a chronological list of links to recognizable archive files of source version releases, the audience may shrink.

Ok, so I downloaded 2.3.9-ah. I had the following problem though.

Code:
d@cosmos:~/tome2-tome2$ cmake -DSYSTEM_INSTALL:BOOL=true .
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/32/gcc
-- Check for working C compiler: /usr/bin/32/gcc -- broken
CMake Error at /usr/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/usr/bin/32/gcc" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /home/d/tome2-tome2/CMakeFiles/CMakeTmp

 

  Run Build Command:/usr/bin/gmake "cmTryCompileExec/fast"

  /usr/bin/gmake -f CMakeFiles/cmTryCompileExec.dir/build.make
  CMakeFiles/cmTryCompileExec.dir/build

  gmake[1]: Entering directory `/home/d/tome2-tome2/CMakeFiles/CMakeTmp'

  /usr/bin/cmake -E cmake_progress_report
  /home/d/tome2-tome2/CMakeFiles/CMakeTmp/CMakeFiles 1

  Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o

  /usr/bin/32/gcc -o CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -c
  /home/d/tome2-tome2/CMakeFiles/CMakeTmp/testCCompiler.c

  Linking C executable cmTryCompileExec

  /usr/bin/cmake -E cmake_link_script
  CMakeFiles/cmTryCompileExec.dir/link.txt --verbose=1

  /usr/bin/32/gcc CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.o -o
  cmTryCompileExec -rdynamic

 
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld:
  skipping incompatible
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../libc.so when searching
  for -lc

 
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld:
  skipping incompatible
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../libc.a when searching
  for -lc

 
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld:
  skipping incompatible /usr/lib64/libc.so when searching for -lc

 
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld:
  skipping incompatible /usr/lib64/libc.a when searching for -lc

 
  /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/../../../../x86_64-slackware-linux/bin/ld:
  cannot find -lc

  collect2: ld returned 1 exit status

  gmake[1]: *** [cmTryCompileExec] Error 1

  gmake[1]: Leaving directory `/home/d/tome2-tome2/CMakeFiles/CMakeTmp'

  gmake: *** [cmTryCompileExec/fast] Error 2

 

 

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:2 (PROJECT)


-- Configuring incomplete, errors occurred!


I have a multilib system, but maybe there is something I need to do first....

Page 10 of 22 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/