project-navigation
Personal tools

Author Topic: Trouble getting 2.3 development to compile -- What do I do with the maps?  (Read 5343 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
I'm trying to get 2.3 development to build on a mac.

The contrib/scripts/map-get doesn't work

Kleiman-ibook:trunk michael$  contrib/scripts/map-get
Usage: map-get [options] command

Commands:
 upgrade - make sure all maps are up to date
 generate DST - generate or update repository dir DST
                (probably not what you want)

Options:
  -h, --help     show this help message and exit
  -v, --verbose 
Kleiman-ibook:trunk michael$  contrib/scripts/map-get upgrade
getting list of available maps
WARNING ufo2map version mismatch                   
Continue? [Y|n]n

Alright, this is a flaw. The "How to compile" page says to use this script, but it doesn't work!
Manually fetching ...

curl http://voxel.dl.sourceforge.net/sourceforge/ufoai/ufoai-2.2-maps.zip > ufoai-2.2-maps.zip

*** BUT NOTHING TELLS ME WHERE TO PUT THIS ***

What do I do with this .zip file after I fetch it?
I am stuck. I may have a nice "simple" "script" for getting this all compiling on a virgin mac, but I have no clue what to do with the maps.

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Trying to figure out what the "make pk3" wants, hoping that will tell me what's up with the maps

Kleiman-ibook:trunk michael$ make -n pk3
make -f build/data.mk pk3
zipinfo:  cannot find or open base/0pics.pk3, base/0pics.pk3.zip or base/0pics.pk3.ZIP.
cd base; zip -u9  0pics.pk3 pics/airfight/forest1.jpg ...

zip -d base/0pics.pk3
zipinfo:  cannot find or open base/0models.pk3, base/0models.pk3.zip or base/0models.pk3.ZIP.
cd base; zip -u9  0models.pk3 models/aircraft/craft_arm_plate/plating.md2 ...

It's not doing nothing (the -n flag) -- it's still trying to assemble stuff.

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
May I suggest not storing this file in .zip form?

Kleiman-ibook:trunk michael$ ls -l *maps*
 72160 -rw-r--r--  1 michael  michael  73888236 Jan 11  2008 0maps.pk3
 71324 -rw-rw-r--  1 michael  michael  73032542 Mar 13 19:22 ufoai-2.2-maps.zip

A savings of 800K, on a 7 MB file, maybe that should just be stored as a .pk3 file?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Aha! After unzipping, the file goes into base/. Continuing ...

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Ok, this is a show stopper. I need help at this point.

curl http://voxel.dl.sourceforge.net/sourceforge/ufoai/ufoai-2.2-maps.zip > ufoai-2.2-maps.zip
unzip ufoai-2.2-maps.zip
mv 0maps.pk3 base
make pk3

Kleiman-ibook:trunk michael$ ls base/0maps.pk3
20 base/0maps.pk3

Only 20?

cd base; zip -u9  0maps.pk3 maps/africa.ump maps/alienbase.ump maps/bomber_city.ump maps/bridge.ump maps/cemetery.ump maps/city_disco.ump maps/community_centre.ump maps/construction.ump maps/country.ump maps/druglord.ump maps/eaglenest.ump maps/farm.ump maps/forest.ump maps/frozen.ump maps/gasstation.ump maps/ice.ump maps/industrial.ump maps/italy.ump maps/japan.ump maps/laboratory.ump maps/mart.ump maps/military_convoy.ump maps/oriental.ump maps/shelter.ump maps/spedition.ump maps/stadium.ump maps/transport.ump maps/tropic.ump maps/ufocrash.ump maps/village.ump
  adding: maps/africa.ump (deflated 79%)
  adding: maps/alienbase.ump (deflated 68%)
...

Ok, first comment: If I downloaded the maps, why does it need to add more?

zip -d base/0maps.pk3 maps/office06d.bsp maps/stadium06d.bsp ... (very long list of files)
deleting: maps/office06d.bsp
deleting: maps/stadium06d.bsp
deleting: maps/pdi08d.bsp
...

I can do nothing at this point. Help me please.

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
I have a workaround, but I do not know if it is correct:

curl http://voxel.dl.sourceforge.net/sourceforge/ufoai/ufoai-2.2-maps.zip > ufoai-2.2-maps.zip
unzip ufoai-2.2-maps.zip
cp 0maps.pk3 base
unzip -d base -u base/0maps.pk3
make pk3

That "-u" option on unzip -- it tells unzip that any map found on the disk should be left alone. I have no idea if that is correct or not -- supposedly, the mac cannot generate working maps, yet it does.

In any event, it's letting me move forward. No clue if the result will be correct or not. Developer help please?

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Foo.

Kleiman-ibook:installer michael$ cd src/ports/macosx/installer/
Kleiman-ibook:installer michael$ make TARGET_CPU=universal
cp -v ../../../../base/0pics.pk3 UFOAI.app/base/0pics.pk3
../../../../base/0pics.pk3 -> UFOAI.app/base/0pics.pk3
cp -v ../../../../base/0models.pk3 UFOAI.app/base/0models.pk3
../../../../base/0models.pk3 -> UFOAI.app/base/0models.pk3
cp -v ../../../../base/0snd.pk3 UFOAI.app/base/0snd.pk3
../../../../base/0snd.pk3 -> UFOAI.app/base/0snd.pk3
cp -v ../../../../base/0music.pk3 UFOAI.app/base/0music.pk3
../../../../base/0music.pk3 -> UFOAI.app/base/0music.pk3
cp -v ../../../../base/0maps.pk3 UFOAI.app/base/0maps.pk3
../../../../base/0maps.pk3 -> UFOAI.app/base/0maps.pk3
cp -v ../../../../base/0media.pk3 UFOAI.app/base/0media.pk3
../../../../base/0media.pk3 -> UFOAI.app/base/0media.pk3
cp -v ../../../../base/0ufos.pk3 UFOAI.app/base/0ufos.pk3
../../../../base/0ufos.pk3 -> UFOAI.app/base/0ufos.pk3
cp -v ../../../../base/0materials.pk3 UFOAI.app/base/0materials.pk3
../../../../base/0materials.pk3 -> UFOAI.app/base/0materials.pk3
cp -v ../../../../base/0base.pk3 UFOAI.app/base/0base.pk3
../../../../base/0base.pk3 -> UFOAI.app/base/0base.pk3
cp: ../../../../base/i18n/[^.]*: No such file or directory
make: *** [copydata] Error 1

I don't think I can solve that one. Did I "make lang"? Whoops.

But worse: After doing "make lang", it should have redone that language copy, right?

440 translated messages.
msgfmt -v -o radiant/i18n/ru/LC_MESSAGES/uforadiant.mo src/po/uforadiant-ru.po
74 translated messages, 13 fuzzy translations, 367 untranslated messages.
Kleiman-ibook:trunk michael$ cd src/ports/macosx/installer/
Kleiman-ibook:installer michael$ make TARGET_CPU=universal
Installing UFOAI.app/Contents/Libraries/libSDL-1.2.0.dylib...done
Installing UFOAI.app/Contents/Libraries/libpng12.0.dylib...done
Installing UFOAI.app/Contents/Libraries/libjpeg.62.dylib...done
...

Nope! So now I've got an incomplete .app package that I have to blow away and start over. Sheesh.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Please note that 2.2 maps are not compatible with 2.3.
You can use map-get. For "different ufo2map version" you can say continue in most cases.
The best is compiling them ofc. but that still takes much time.

-geever

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Thank you, adjusting compile script now ...

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Please note that 2.2 maps are not compatible with 2.3.
You can use map-get. For "different ufo2map version" you can say continue in most cases.
The best is compiling them ofc. but that still takes much time.

-geever
Be aware that the "Compile for Mac" page on the wiki pointed me at those 2.2 maps.
You might want to adjust that.

Also: I thought you said that the mac compiler did not generate compatible maps, and you had to use the precompiled maps.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Be aware that the "Compile for Mac" page on the wiki pointed me at those 2.2 maps.
You might want to adjust that.

I don't know that doc. Maybe it should be modified not to mention any version numbers as they will change by time..

Also: I thought you said that the mac compiler did not generate compatible maps, and you had to use the precompiled maps.

When playing multiplayer it's important to use the same maps. The game checks some checksums to be sure they're the same on all clients (maybe md5, not sure). Compilers on different platforms don't create binary-same maps due to differences in floating-point operations.
As the 2.3 isn't released yet there is no official map-pack for it. What you can use for a MP compatible build is map-get. However ufo2map (map compiler) may not the very latest on that service.

-geever

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
I don't know that doc. Maybe it should be modified not to mention any version numbers as they will change by time..

It is http://ufoai.ninex.info/wiki/index.php/Compile_for_Mac