Page 4 of 5 FirstFirst ... 2 3 4 5 LastLast
Results 61 to 80 of 98

  Click here to go to the first staff post in this thread.   Thread: Compiling a mod under GNU/Linux

  1. #61
    huh? What's doing that?

  2. #62
    Occasionally AFK
    Join Date
    Apr 2005
    Location
    't looks like a room
    Posts
    4,437
    Most Recent Awards:

    W:ET extracts the client libraries from mp_bin.pk3 when it sees inconsistencies. Make sure the correct version is package in mp_bin.pk3 (eventually backup your old version by renaming it to mp_bin.pk3.01) and delete all .so files.
    Packaging can be done trough a script, using the zip shell program.
    "Respect is everything" - GTA2
    "Notheeeeeng is final." - Bongoboy

  3. #63
    Tapir Stalker nUllSkillZ's Avatar
    Join Date
    Jan 2004
    Location
    http://www.kronberg.de/
    Posts
    3,579
    Most Recent Awards:

    I've found the mistake:
    After starting the compilation again simply with "scons" the mingw32 compiler is still used and the compiled files are ".dll"'s.
    Not sure why.
    I've tried compilation with a "fresh" installation and gcc is used (the files are ".so"'s)

    The Mingw32 has been started as described here:
    Compiling for Windows under Linux - cross-scons.sh
    Code:
    scons -c CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++
    scons CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++
    I guess that some configuration files have been written which are then used.

  4. #64
    Occasionally AFK
    Join Date
    Apr 2005
    Location
    't looks like a room
    Posts
    4,437
    Most Recent Awards:

    SCons saves the last supplied building parameters in site.conf. Now, when cross-scons.sh is executed, SCons saves those values.
    To revert to the default Linux compiles, delete site.conf or execute SCons with these parameters:
    Code:
    CC=gcc CXX=g++
    "Respect is everything" - GTA2
    "Notheeeeeng is final." - Bongoboy

  5. #65
    Tapir Stalker nUllSkillZ's Avatar
    Join Date
    Jan 2004
    Location
    http://www.kronberg.de/
    Posts
    3,579
    Most Recent Awards:

    Yep just have had a look.
    I've deleted "site.conf" and everything works.
    Thanks for the help.

  6. #66
    Lol, ran into this myslef, thought I broke linux compilations somehow for awhile.

    You don't need to delete that file. Would be a pain to do all the time. All you need to do is just set it like you did to get the windows builds with the args so they can be reset.

    Windows:
    Code:
    scons -c CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++
    scons CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g+ BUILD=release
    Linux:
    Code:
    scons -c CC=gcc CXX=g++
    scons CC=gcc CXX=g++ BUILD=release
    I use a script to compile both builds at once. I blanked out my paths, but just replace with wherever your files are. It simply compiles everything for both windows and linux, and moves it into a folder on my desktop for later when I turn it into a pak. I also have a script to make everything in my folder a pak, but just in case I am adding extra models and such I left that out from this script.
    Code:
    SOURCE_DIR="/usr/local/games/************/src"
    FINAL_DIR=$SOURCE_DIR/final
    PAK_DIR="/home/*****/Desktop/******"
    
    prepare()
    {
    	echo "Preparing to compile..."
    	cd $SOURCE_DIR
    	rm -rf $FINAL_DIR
    	mkdir $FINAL_DIR
    }
    
    windows_compile()
    {
    	cd $SOURCE_DIR
    
    	echo "Removing old windows builds..."
    	scons -c CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g++
    
    	echo "Compiling windows builds..."
    	scons CC=i586-mingw32msvc-gcc CXX=i586-mingw32msvc-g+ BUILD=release
    
    	echo "Finishing windows builds..."
    	mv cgame.mp.i386.so $FINAL_DIR/cgame.mp.i386.dll
    	mv ui.mp.i386.so $FINAL_DIR/ui.mp.i386.dll
    	mv qagame.mp.i386.so $FINAL_DIR/qagame.mp.i386.dll
    
    	cd $FINAL_DIR
    	strip *.dll
    }
    
    linux_compile()
    {
    	cd $SOURCE_DIR
    
    	echo "Removing old linux builds..."
    	scons -c CC=gcc CXX=g++
    
    	echo "Compiling linux builds..."
    	scons CC=gcc CXX=g++ BUILD=release
    
    	echo "Finishing linux builds..."
    	mv cgame.mp.i386.so $FINAL_DIR
    	mv ui.mp.i386.so $FINAL_DIR
    	mv qagame.mp.i386.so $FINAL_DIR
    
    	cd $FINAL_DIR
    	strip *.so
    }
    
    finish()
    {
    	cd $FINAL_DIR
    
    	echo "Finishing builds..."
    	mv * $PAK_DIR
    }
    
    prepare
    windows_compile
    linux_compile
    finish
    Here's the script to place everthing in my pak..
    Code:
    PAK_DIR="/home/*****/Desktop/******"
    PAK_FILE="******-1.0.0.pk3"
    SERVER_DIR="/usr/local/games/enemy-territory/27960/******"
    CLIENT_DIR="/home/*****/.etwolf/******"
    
    make_pak()
    {
    	echo "Creating pak..."
    	cd $PAK_DIR
    	zip -r ******-1.0.0.zip *
    	mv ******-1.0.0.zip $PAK_FILE
    
    	echo "Moving pak to server..."
    	cp $PAK_FILE $SERVER_DIR
    	cp qagame.mp.i386.so $SERVER_DIR
    
    	echo "Moving pak to client..."
    	cp $PAK_FILE $CLIENT_DIR
    
    	echo "Removing old files..."
    	rm *
    }
    
    make_pak
    If you know you aren't going to be needing any extra models, sounds, etc, this could just be placed in the script for compiling, and then you have everything done in one command. Just move everything from $FINAL_DIR straight to a zipfile in the final() block.

    So, all in all, after I run the compile script, I have both windows and linux builds done, then I just run my pak script and it places the pak/necessary files in the proper directory so I can test it on my test server,

  7. #67
    Tapir Stalker nUllSkillZ's Avatar
    Join Date
    Jan 2004
    Location
    http://www.kronberg.de/
    Posts
    3,579
    Most Recent Awards:

    Thnx for the info and the scripts.
    The uixxx.so file is still overwritten by the original one.
    The reason might be that I haven't changed code in the ui part.

  8. #68
    Using a script to seperate the output bins is kinda beating around the bush a little bit. Here's the fix for the scons script.

    In SConstruct, find the targets section, towards the bottom, and change it to look like this (notice the if and else block in each module)
    Code:
    if ( TARGET_GAME == '1' ):
    	Export( 'GLOBALS ' + GLOBALS )
    	BuildDir( g_build + '/game', '.', duplicate = 0 )
    	game = SConscript( g_build + '/game/SConscript.game' )
    	if ( win32_build == 1 ):
    		toplevel_targets.append( InstallAs( '#qagame_mp_x86.dll', game ) )
    	else:
    		toplevel_targets.append( InstallAs( '#qagame.mp.%s.so' % dll_cpu, game ) )
    
    if ( TARGET_CGAME == '1' ):
    	Export( 'GLOBALS ' + GLOBALS )
    	BuildDir( g_build + '/cgame', '.', duplicate = 0 )
    	cgame = SConscript( g_build + '/cgame/SConscript.cgame' )
    	if ( win32_build == 1 ):
    		toplevel_targets.append( InstallAs( '#cgame_mp_x86.dll', cgame ) )
    	else:
    		toplevel_targets.append( InstallAs( '#cgame.mp.%s.so' % dll_cpu, cgame ) )
    
    if ( TARGET_UI == '1' ):
    	Export( 'GLOBALS ' + GLOBALS )
    	BuildDir( g_build + '/ui', '.', duplicate = 0 )
    	ui = SConscript( g_build + '/ui/SConscript.ui' )
    	if ( win32_build == 1 ):
    		toplevel_targets.append( InstallAs( '#ui_mp_x86.dll', ui ) )
    	else:
    		toplevel_targets.append( InstallAs( '#ui.mp.%s.so' % dll_cpu, ui ) )

  9. #69
    The way my script works is this (and it shouldn't be overwriting anything, because the builds all get moved into a separate directory, and are renamed accordingly before any other builds could overwrite it, so I don't exactly know what's going on there.)

    - Compiles windows builds
    - moves windows builds to separate directory, renames them properly to dll's
    - cleans up all object files (just to make sure linux gets a clean build)
    - compiles linux builds
    - moves linux builds to separate directory

    In the end after running the script there should be 6 files in the $FINAL_DIR. 3 dll's and 3 so's.

    Never tried Jaybird's method yet. I just use mine becuase I only have to type 1 command to do both builds, eitherhow I don't have to worry about renaming them each time, the script does it anyhow. In the end both ways work, and they end up as dll's eitherway.

    ================================================== =
    One more note. Didn't notice this until just now, but if you use that pak script, it will place the qagame files inside as well.

    EDIT:
    Here is a fixed version:
    Code:
    PAK_DIR="/home/*****/Desktop/******"
    PAK_FILE="******-1.0.0.pk3"
    SERVER_DIR="/usr/local/games/enemy-territory/27960/******"
    CLIENT_DIR="/home/*****/.etwolf/******"
    
    make_pak()
    {
    	echo "Creating pak..."
    	cd $PAK_DIR
    	mv qagame.mp.i386.so $SERVER_DIR
    	rm qagame.mp.i386.dll
    	zip -r ******-1.0.0.zip *
    	mv ******-1.0.0.zip $PAK_FILE
    
    	echo "Moving pak to server..."
    	cp $PAK_FILE $SERVER_DIR
    
    	echo "Moving pak to client..."
    	cp $PAK_FILE $CLIENT_DIR
    
    	echo "Removing old files..."
    	rm *
    }
    
    make_pak
    I just delete the old files after I compile it and get it all ready to test on the server. If you prefer to keep these files in place just swap the rm command with cp.

  10. #70
    The difference between "methods" is that one is a workaround while one is a fix.

  11. #71
    Ok, I'm going to listen to Jaybird on this one a bit and move it a step further. Please don't use the scripts I posted...something is not right with them. I will post up a better script to use in a bit when I complete it with options that can be set instead of having 10 copies of sconstruct and site.conf lying around.

    I actually took a deeper look into the sconstruct file and found some interesting stuff that somehow I managed to pass by. Very important to look carefully in there...lesson learned.

    EDIT:
    Ok, got it created and is much, much better. I posted it here:
    http://www.splashdamage.com/index.ph...wtopic&t=15599

  12. #72

    Re: Compiling a mod under GNU/Linux

    !revive topic

    hello
    i have my own MOD compiled and running under Windows,
    now i was trying to compile it for Linux, but i have NO knowledge about this OS

    my MOD is built over ETpub 0.8.1 so following the readme files and this SD tutorial,
    i was able to have my .so files released

    now there is my problem, when i start the server i get this:
    Code:
    Sys_LoadDll(/usr/local/games/et/vietnam/qagame.mp.i386.so)...
    Sys_LoadDll(/usr/local/games/et/vietnam/qagame.mp.i386.so) failed:
    "/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9' not found
    (required by /usr/local/games/et/vietnam/qagame.mp.i386.so)"
    Sys_LoadDll(qagame) failed dlopen() completely!
    since i know nothing about Linux,
    i asked to the server host if this problem was related to some needed upgrade on server
    well he replied to me:
    This indicates an error relating to how you compiled it.
    You would need to compile it without the dependency on glibc.
    somebody can tell me how can i do that?
    I compile the MOD using Ubuntu 9.10, scons, and the SConstruct file included into ETpub 0.8.1

    thanks in advance
    - ETNam 0.1.1 -
    - Status : Released -
    - Info: etnam.org -


  13. #73

    Re: Compiling a mod under GNU/Linux

    you have to use an old linux ... for example debian 4
    ... there are old glibc's included ... thats all i know atm

  14. #74

    Re: Compiling a mod under GNU/Linux

    thank you
    this solved my problem
    - ETNam 0.1.1 -
    - Status : Released -
    - Info: etnam.org -


  15. #75

    Re: Compiling a mod under GNU/Linux

    v44

    btw ... how did you install debian? ... im trying to get it running since 2 month as a virtual machine ... it allways stops installing at the additional downloads ... (got stuck and thats it)

    ... thinking about to rape again my very very very old laptop for it xD

  16. #76

    Re: Compiling a mod under GNU/Linux

    i downloaded this .iso file
    (internet installation)
    http://cdimage.debian.org/cdimage/ar...86-netinst.iso
    but here you have different .iso images, you can try to use different files
    http://cdimage.debian.org/cdimage/ar...8/i386/iso-cd/

    i installed it into an empty external HD ...
    at the end of the installation it creates a boot file that allow you to select your OS when you start your PC

    the only problem i had was after mounting my primary NTFS hard disk
    ( where i have installed windows and also stored my source code ),
    after restarting my PC the boot file crash so i need to reinstall Debian...
    and this happens every time i mounted the hard disk ( lol i reinstalled Debian many times )

    i solved this copying my source code into an USB key...
    so when i run Debian i don't need to mount my NTFS hard disk to load my needed source files

    anyway it's the first time i run and use Linux so probably there are better ways and solutions
    - ETNam 0.1.1 -
    - Status : Released -
    - Info: etnam.org -


  17. #77

    Re: Compiling a mod under GNU/Linux

    ... damn neither these netinstalls nor a complete dvd is working with any virtual machine ... seems like my sin7 doesnt like em ... gonna try to install it on a additional hdd or maybe on a usb-stick

  18. #78

    Re: Compiling a mod under GNU/Linux

    Working on the rest of my windows tutorial I should have made a long time ago: compiling .so in virutal box @ windows... A lot easier =D

  19. #79

    Re: Compiling a mod under GNU/Linux

    ... just gimme a working image of a virtual debian etch xD and im happy

  20. #80

    Re: Compiling a mod under GNU/Linux

    http://mirrors.kernel.org/gentoo/exp...terix/current/
    why not install linux in windows?

    dunno how far its support goes, but I guess compiling should be possible.. lol

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •