ToME 2 maintenance

Everything about ToME 2.x.x. No spoilers, please

Moderator: Moderator

Message
Author
AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#136 Post by AnonymousHero »

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.

jtwadsworth
Wayist
Posts: 15
Joined: Wed Jan 06, 2010 1:51 am

Re: ToME 2 maintenance

#137 Post by jtwadsworth »

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: Select all

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: Select all

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

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#138 Post by AnonymousHero »

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!

jtwadsworth
Wayist
Posts: 15
Joined: Wed Jan 06, 2010 1:51 am

Re: ToME 2 maintenance

#139 Post by jtwadsworth »

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: Select all

#
# 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

Chryana
Wayist
Posts: 15
Joined: Mon Nov 13, 2006 6:08 am

Re: ToME 2 maintenance

#140 Post by Chryana »

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: Select all

./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.

Chryana
Wayist
Posts: 15
Joined: Mon Nov 13, 2006 6:08 am

Re: ToME 2 maintenance

#141 Post by Chryana »

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.

darwin
Higher
Posts: 64
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#142 Post by darwin »

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.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#143 Post by Lord Estraven »

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

darwin
Higher
Posts: 64
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#144 Post by darwin »

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.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#145 Post by Lord Estraven »

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

Shadus
Cornac
Posts: 35
Joined: Tue Feb 10, 2004 1:28 pm
Location: Canton, OH
Contact:

Re: ToME 2 maintenance

#146 Post by Shadus »

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.
Shadus

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#147 Post by Lord Estraven »

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.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#148 Post by Lord Estraven »

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.)

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#149 Post by AnonymousHero »

Re: Downloading.

The source for any particular tag can be retireved thus:

Code: Select all

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: Select all

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,

darwin
Higher
Posts: 64
Joined: Mon Nov 10, 2008 2:11 pm
Location: USA
Contact:

Re: ToME 2 maintenance

#150 Post by darwin »

AnonymousHero wrote:The source for any particular tag can be retireved thus:

Code: Select all

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: Select all

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....

Post Reply