project-navigation
Personal tools

Author Topic: How do I get to the oldest version of 2.3?  (Read 4262 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
How do I get to the oldest version of 2.3?
« on: June 23, 2009, 08:56:21 pm »
Since I'm having nothing but problems with the current Mac (ppc) compilation, I thought I'd go back to the first version -- which I figured would be a copy of the 2.2.1 tree.

Kleiman-ibook:trunk michael$ svn up -r 1
svn: REPORT request failed on '/svnroot/ufoai/!svn/vcc/default'
svn: Target path does not exist
Kleiman-ibook:trunk michael$

So how do you go back to the beginning?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #1 on: June 23, 2009, 09:29:25 pm »
The earliest revision I can revert to with svn is -r 166.

It has a CVSROOT directory, and does not compile at all.
Code: [Select]
Kleiman-ibook:trunk michael$ find . -name Makefile -print
./Makefile
./src/linux/Makefile
./src/tools/Makefile
Kleiman-ibook:trunk michael$ pushd src/linux
~/development/ufoai/trunk/src/linux ~/development/ufoai/trunk ~/.ufoai/2.3-dev/base
Kleiman-ibook:linux michael$ make
make targets lang BUILDDIR=debugPower Macintosh CFLAGS="-Wall -pipe -Dstricmp=strcasecmp -DC_ONLY -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DUSE_SDL -DUSE_ALSA -g -DLINUX_VERSION='\"3.21+r0.16 Debug\"'"
gcc -Wall -pipe -Dstricmp=strcasecmp -DC_ONLY -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -DUSE_SDL -DUSE_ALSA -g -DLINUX_VERSION='"3.21+r0.16 Debug"' -o debugPower/client/cl_actor.o -c ../client/cl_actor.c
In file included from ../client/cl_actor.c:3:
../client/client.h:44:21: error: libintl.h: No such file or directory
../client/cl_actor.c: In function ‘CL_CharacterCvars’:
../client/cl_actor.c:53: warning: implicit declaration of function ‘gettext’
../client/cl_actor.c:53: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_ActorUpdateCVars’:
../client/cl_actor.c:271: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:276: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:288: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:297: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:309: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:314: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_BuildForbiddenList’:
../client/cl_actor.c:591: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_CheckAction’:
../client/cl_actor.c:604: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:617: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_ActorReload’:
../client/cl_actor.c:752: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c:781: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_ActorDoMove’:
../client/cl_actor.c:799: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_ActorDoTurn’:
../client/cl_actor.c:858: warning: incompatible implicit declaration of built-in function ‘gettext’
../client/cl_actor.c: In function ‘CL_DoEndRound’:
../client/cl_actor.c:1151: warning: incompatible implicit declaration of built-in function ‘gettext’
{standard input}:unknown:FATAL:can't create output file: debugPower/client/cl_actor.o
make[1]: *** [debugPower/client/cl_actor.o] Error 1
make: *** [build_debug] Error 2
Kleiman-ibook:linux michael$

My thinking is simple: At some point, UFO ran on G4's just fine. At some point, 2.3 started with a copy of a 2.2 or 2.2.1 dev tree that compiled on the Mac. At some point it stopped. If I can find where it stopped, I can find out what changed.

But I can't find the oldest working version to start from.

Offline RudolfoWood

  • Rookie
  • ***
  • Posts: 85
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #2 on: June 23, 2009, 09:32:51 pm »
thank git for full history browsing :-)
http://ufoai.svn.sourceforge.net/viewvc/ufoai?view=rev&revision=12320
this should be the revision which started 2.3 development

by the way: trunk does not exist until revision 165 if you really want to go that far back  ;D - but you found that already...

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #3 on: June 23, 2009, 10:58:17 pm »
On revision 12320, configure tells me

Kleiman-ibook:trunk michael$ ./configure --disable-uforadiant  --enable-universal --includedir=/opt/local/include/

...
checking jpeglib.h usability... no
checking jpeglib.h presence... no
checking for jpeglib.h... no
configure: error: You must have the JPEG development headers

But I do:
Kleiman-ibook:trunk michael$ head /opt/local/include/jpeglib.h
/*
 * jpeglib.h
 *
 * Copyright (C) 1991-1998, Thomas G. Lane.
...

Granted, this is an old version; what do I need to do to get this to work?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #4 on: June 24, 2009, 09:12:40 pm »
Alright, the old versions of configure have a bug. And, there's a minor change needed to OS X's main (re-ordering of include files). Here's a patch in case anyone else needs this:

Code: [Select]
Kleiman-ibook:trunk michael$ svn diff
Index: configure
===================================================================
--- configure (revision 12320)
+++ configure (working copy)
@@ -2151,6 +2151,13 @@
 { echo "$as_me:$LINENO: result: $TARGET_OS" >&5
 echo "${ECHO_T}$TARGET_OS" >&6; }
 
+# bug work-around
+CFLAGS="$CFLAGS -I$includedir -L$libdir"
+LDFLAGS="$LDFLAGS -L$libdir"
+echo Adjusted CFLAGS to $CFLAGS
+echo Adjusted LDFLAGS to $LDFLAGS
+
+
 #---------------------------------------------------------------------------------------------
 # CHECK TARGET_CPU
 #---------------------------------------------------------------------------------------------
Index: src/ports/macosx/osx_main.m
===================================================================
--- src/ports/macosx/osx_main.m (revision 12320)
+++ src/ports/macosx/osx_main.m (working copy)
@@ -23,6 +23,8 @@
 
 */
 
+#include <Carbon/Carbon.h>
+#include <Cocoa/Cocoa.h>
 #include <stdlib.h>
 #include <fcntl.h>
 #include <stdarg.h>
@@ -33,8 +35,6 @@
 #include <dlfcn.h>
 
 #include "../../common/common.h"
-#include <Carbon/Carbon.h>
-#include <Cocoa/Cocoa.h>
 
 uid_t saved_euid; /* extern in vid_so */
 
Kleiman-ibook:trunk michael$

Now that I have this compiling, time to see when/where PPC compatibility broke.

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #5 on: June 26, 2009, 08:30:35 am »
... and this version has byteswap issues, and other issues.

My test plan:

1. Does the screen color reset if I switch to display preferences
2. Can I enter text / take input focus.
3. Can I start a skirmish, and see the map.
4. Can I move someone
5. If I end turn repeatedly, does one side win
6. Can I start a campaign game
7. Do I see the world map
Wait for a UFO
Attack it with ships and troops
8. Can I see the battle map
9. Can I move someone.
10. If I end turn repeatedly, does one side win?

===
Results:
12320: Requires minor changes to compile (header order in osx_main.m, bug work-around in configure.)
1. Yes.
2. No. (makes testing anything else hard)
3-5 no skirmish
6. Yes
7. No. Cannot select a first base -- world is messed up
8-10. The map displays, and then aborts to the world map. No battle

The tail of the log:
execing autoexec.cfg
"version" is "UFO: Alien Invasion 2.3-dev Unknown Jun 24 2009 MacOSX DEBUG"
Switch grab input off
S_Music_Start: Playing music: 'music/PsymongN3.ogg'
AIR_UpdateHangarCapForOne()... base does not have any hangar - error!
AIR_NewAircraft()... ERROR, new aircraft but no free space in hangars!
Unknown command "aircraft_list"
B_BaseInit_f: mn_base_id value is invalid: -1
Changing to Multiplayer
Changing to Multiplayer
Global data loaded - size 5216716 bytes
...techs: 166
...buildings: 21
...ranks: 16
...nations: 8

Activate stage intro
Sanity check for script data
...... no mappart for building 'building_aliencontainment2' given
...... no mappart for building 'building_hangar2' given
...... no mappart for building 'building_large_ufo_hangar2' given
...... no mappart for building 'building_workshop2' given
...buildings failed
...tech ok
...aircraft ok
...menu ok
Changing to Singleplayer
S_Music_Start: Playing music: 'music/van_geoscape.ogg'
Save 'slotquick'
...subsystem 'size' - saved 93 bytes
...subsystem 'base' - saved 13005 bytes
MSG_WriteByte: range error 16777216 ('src/client/cl_campaign.c', line 2433)
...subsystem 'campaign' - saved 330 bytes
...subsystem 'hospital' - saved 0 bytes
...subsystem 'market' - saved 2929 bytes
...subsystem 'research' - saved 7932 bytes
...subsystem 'employee' - saved 13033 bytes
...subsystem 'aliencont' - saved 0 bytes
...subsystem 'production' - saved 8 bytes
...subsystem 'aircraft' - saved 354 bytes
...subsystem 'messagesystem' - saved 726 bytes
...subsystem 'stats' - saved 28 bytes
...subsystem 'nations' - saved 864 bytes
...subsystem 'transfer' - saved 86384 bytes
Campaign 'QuickSave' saved.
------- Loading game.dylib -------
LoadLibrary (./base/game.dylib)
==== InitGame ====
checksum for the map '+orientaln': 3668013428
ufo script checksum 571501502
Created AI player (team 0)
Created AI player (team 7)
-------------------------------------
Connecting to localhost...
Map: +orientaln
S_Music_Start: Playing music: 'music/van_mission.ogg'
Starting the game...
(player 0) It's team 1's round
Grid_CheckForbidden: unknown forbidden-size: 0
********************
ERROR: Grid_CheckForbidden: unknown forbidden-size: 0
********************
==== ShutdownGame ====
S_Music_Start: Playing music: 'music/van_geoscape.ogg'

Note that there are byteswap errors, and other errors, even back here.

Next step: Find the 2.2.1 release revision, and see if that can compile/run.


Offline BTAxis

  • Administrator
  • PHALANX Commander
  • *******
  • Posts: 2607
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #6 on: June 26, 2009, 12:11:18 pm »
Just check out the 2.2 branch?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: How do I get to the oldest version of 2.3?
« Reply #7 on: June 26, 2009, 10:39:49 pm »
Sorry, I missed this. As I mentioned in the other thead, I thought I was (now) checking out the 2.2 branch. Am I misunderstanding something?