project-navigation
Personal tools

Author Topic: How to correctly install game after compiling under linux?  (Read 3729 times)

vvb

  • Guest
How to correctly install game after compiling under linux?
« on: April 15, 2007, 11:20:06 am »
I've download SVN (7521) of ufoai 2.1 and compile it under Fedora Core 6.
 Main steps was:
 configure
 make
 make maps

 And what now?
 How to correctly install game?
 Is there some sort of spec file for ufoai?

Offline Zenerka

  • Sergeant
  • *****
  • Posts: 301
    • View Profile
How to correctly install game after compiling under linux?
« Reply #1 on: April 15, 2007, 11:31:14 am »
make lang to compile language files. And that would be all, I believe.

vvb

  • Guest
How to correctly install game after compiling under linux?
« Reply #2 on: April 15, 2007, 11:41:04 am »
Ok, I've done it.
Now I have ufoai trank directory (~/rpmbuild/SOURCES/ufoai/trank).
And size of it is 1.74 Gb.
I think I don't need source files no more.
Mine question was how to INSTALL compiled game, say, to /usr/local/ufoai directory or something... After installing it I can delete source directory...

 And README or readme.linux should be written to describe all these steps:
 configure
 make
 make maps
 make lang
 {and last one, which install game}
 For now it's hard to figure out what you have to do to compile game.

Offline Zenerka

  • Sergeant
  • *****
  • Posts: 301
    • View Profile
How to correctly install game after compiling under linux?
« Reply #3 on: April 15, 2007, 12:41:41 pm »
Quote from: "vvb"
Mine question was how to INSTALL compiled game, say, to /usr/local/ufoai directory or something...

I may be wrong (I don't use Linux), but I believe there is neither install target for make nor --prefix target for configure yet. Patches are welcome.
I would recommend to svn export to desired directory first, then compile in this desired directory next. Then you can easily remove your local repository copy.

vvb

  • Guest
How to correctly install game after compiling under linux?
« Reply #4 on: April 17, 2007, 05:37:07 pm »
I've wrote following and it works for my compiled from svn version of ufoai 2.2.
Frankly, I'm far from linux guru, so my "creation" is FAR from pefect. But still, it works.
 It copy all needed files to /usr/local/games/ufoai and create binary file /usr/local/bin/ufo to start game.
 I have some questions about files I've copy.
 Are all of them needed?
 I realize that ALL files in /base/music are needed. But what about /base/maps? Are there only .bsp files needed here? Are ALL of these files using in game process? And all bsp in subfolders (/base/maps/b/a/, /base/maps/icen/, etc)?
 What about /base/models, /base/pics, /base/shaders, /base/textures? Just copy all of them and nothing more?

 Anyway, my first experience in making of Makefile:
 

install:
        @echo Installing binary files
        @rm -fr /usr/local/games/ufoai
        @mkdir /usr/local/games/ufoai
        @cp -t /usr/local/games/ufoai ufo ufoded ufo2map ref_glx.so ref_sdl.so snd_alsa.so snd_arts.so snd_oss.so snd_sdl.so qdata ufomaster
        @echo Installing base files
        @mkdir /usr/local/games/ufoai/base
        @cp -t /usr/local/games/ufoai/base base/archives.sh base/default.cfg base/keys.cfg base/mapshots.cfg base/autoexec.cfg base/game.so base/mapcycle.txt base/dedicated.cfg
        @echo Installing i18n
        @for fn in `find base/i18n -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing maps
        @for fn in `find base/maps -name '*.bsp'`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing media files
        @for fn in `find base/media -name '*.ttf'`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing models
        @for fn in `find base/models -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing music files
        @for fn in `find base/music -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing pics
        @for fn in `find base/pics -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing shaders
        @for fn in `find base/shaders -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing sound files
        @for fn in `find base/sound -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing textures
        @for fn in `find base/textures -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing ufos
        @for fn in `find base/ufos -name '*.*' | grep -v .svn`; do \
            echo $$fn ; \
            cp --parents -t /usr/local/games/ufoai $$fn ; \
        done
        @echo Installing last binary file
        rm -f /usr/local/bin/ufo
        echo cd /usr/local/games/ufoai > /usr/local/bin/ufo
        echo ufo >> /usr/local/bin/ufo
        chmod a+x /usr/local/bin/ufo
        @echo Installing complete. Type \'ufo\' to play game.