Linux STK Networking Build Scripts

Linux STK Networking Build Scripts

Postby cddepppp256 » 20 Oct 2018, 06:37

Builds script

Add the following into a new .sh file (call it 'first_time.sh'):
{l Code}: {l Select All Code}
#Install dependncies
sudo apt-get install build-essential cmake libbluetooth-dev libcurl4-openssl-dev libenet-dev libfreetype6-dev libfribidi-dev libgl1-mesa-dev libglew-dev libjpeg-dev libogg-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libxrandr-dev libx11-dev pkg-config zlib1g-dev
#Clones the git repo, for code
git clone "https://github.com/supertuxkart/stk-code" stk-code
#Clones the svn repo, for tracks, karts, etc.
svn checkout "https://svn.code.sf.net/p/supertuxkart/code/stk-assets" stk-assets
cd stk-code
git checkout network
#below: makes the build dir and enters it.
mkdir cmake_build
cd cmake_build
#Below starts cmake to make the build files.
cmake ..
#Make sure that when you use this srcipt, 4 is replaced with the number of cores in your computer`s cpu. No spaces need or wanted.
make -j4


Add the following into a new .sh file (call it 'update.sh'):
{l Code}: {l Select All Code}
echo "== Update SVN: MEDIA REPO =="
cd stk-assets
svn update
cd ..
echo "== Update GIT: STK CODE =="
cd stk-code
git pull
echo "== Delete FLD: CMAKE BUILD =="
rm -rf cmake_build
echo "== Create FLD: CMAKE BUILD =="
mkdir cmake_build
cd cmake_build
echo "== Start  BLD: SUPER TUX KART =="
cmake ..
make -j4


Running

For linux update script:

Go to the folder you have two scripts in. Make sure they are executable (either by typing "chmod +x *.sh" or just going to right click > proprieties > premissions etc... in file program) Open a terminal in that folder and type "./first_time.sh". It will install dependencies (except for libopenglscreenrecorder, but you don't need it.) If you ever want to update, you have to go into the same directory and run "./update.sh". When you want to run supertuxkart (not update it) open <where you put scripts>/stk-code/cmake_build/bin and a terminal in that location and type "./supertuxkart". Hopefully this is clear, as I know some do not like to open the terminal.

Please report any issues you find!

Ok, I swear this is the last ever edit.
Just one more? :/
Last one. Please don't kill me :(
Hopefully no one noticed this last one.
Last edited by cddepppp256 on 13 Nov 2018, 02:18, edited 34 times in total.
cddepppp256
 
Posts: 20
Joined: 08 Oct 2018, 20:10

Re: [Updated] SuperTuxKart Unofficial Build (Network Beta)

Postby acme_pjz » 21 Oct 2018, 05:31

Hi,

Thanks for providing the nightly build! :)

However, 1.2GB is a huge download :( Maybe it's enough if you only pack the bin and the data folder (without the .svn subfolder)?

Also, the Windows nightly build just crashes at startup :( here is the stdout.log:

{l Code}: {l Select All Code}
[info   ] [FileManager]: Data files will be fetched from: '../data/'
[info   ] [FileManager]: User directory is 'C:\Users\user\AppData\Roaming/supertuxkart/0.10-git/'.
[info   ] [FileManager]: Addons files will be stored in 'C:\Users\user\AppData\Roaming/supertuxkart/0.10-git/../addons/'.
[info   ] [FileManager]: Screenshots will be stored in 'C:\Users\user\AppData\Roaming/supertuxkart/0.10-git/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in 'C:\Users\user\AppData\Roaming/supertuxkart/0.10-git/grandprix/'.
[info   ] [FileManager]: Asset 0 will be loaded from '../data/challenges/'.
[info   ] [FileManager]: Asset 1 will be loaded from '../data/gfx/'.
[info   ] [FileManager]: Asset 2 will be loaded from '../data/grandprix/'.
[info   ] [FileManager]: Asset 3 will be loaded from '../data/gui/icons/'.
[info   ] [FileManager]: Asset 4 will be loaded from '../data/gui/screens/'.
[info   ] [FileManager]: Asset 5 will be loaded from '../data/gui/dialogs/'.
[info   ] [FileManager]: Asset 6 will be loaded from '../data/library/'.
[info   ] [FileManager]: Asset 7 will be loaded from '../data/models/'.
[info   ] [FileManager]: Asset 8 will be loaded from '../data/music/'.
[info   ] [FileManager]: Asset 9 will be loaded from '../data/replay/'.
[info   ] [FileManager]: Asset 10 will be loaded from '../data/tracks/'.
[info   ] [FileManager]: Asset 11 will be loaded from '../data/sfx/'.
[info   ] [FileManager]: Asset 12 will be loaded from '../data/shaders/'.
[info   ] [FileManager]: Asset 13 will be loaded from '../data/skins/'.
[info   ] [FileManager]: Asset 14 will be loaded from '../data/textures/'.
[info   ] [FileManager]: Asset 15 will be loaded from '../data/ttf/'.
[info   ] [FileManager]: Asset 16 will be loaded from '../data/po/'.


That's all.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 585
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: [Updated] SuperTuxKart Unofficial Build (Network Beta)

Postby cddepppp256 » 21 Oct 2018, 14:09

acme_pjz {l Wrote}:However, 1.2GB is a huge download :( Maybe it's enough if you only pack the bin and the data folder (without the .svn subfolder)?


It will be harder (add a few 10 sec steps) to update, but I will do this! I actually was aware this was there but never knew it took ~600 MB! (I don't use SVN much)

The windows binary crashing is something I'll look into... I don't have a well working and easy way to test them. :(
cddepppp256
 
Posts: 20
Joined: 08 Oct 2018, 20:10

Re: [Updated] SuperTuxKart Unofficial Build (Network Beta)

Postby cddepppp256 » 21 Oct 2018, 15:44

acme_pjz {l Wrote}:Also, the Windows nightly build just crashes at startup :(


Works fine with the old 8 year old Win 7 x64 Laptop in my house.

What win version are you on / CPU type / how many bits? How do / what model is your GPU?

Edit: It works for me and Benau.
Last edited by cddepppp256 on 02 Nov 2018, 00:50, edited 1 time in total.
cddepppp256
 
Posts: 20
Joined: 08 Oct 2018, 20:10

Re: [Updated] SuperTuxKart Unofficial Build (Network Beta)

Postby acme_pjz » 21 Oct 2018, 17:32

cddepppp256 {l Wrote}:
acme_pjz {l Wrote}:Also, the Windows nightly build just crashes at startup :(


Works fine with the old 8 year old Win 7 x64 Laptop that I have not gotten to "throwing away". :lol:

What win version are you on / CPU type / how many bits? How do / what model is your GPU?

Edit: It works for me and Benau.


It doesn't work on 2 Win10 x64 laptop machines. One is Intel integrated GPU, another one is Nvidia. Of course, 0.9.3 works on both machines. Maybe I'll find a Win7 machine to test.

I'm sorry that Win10 doesn't give me any crash dumps, but only this vague AppCrash log:

{l Code}: {l Select All Code}
错误应用程序名称: supertuxkart.exe,版本: 0.0.0.0,时间戳: 0x5bcb8583
错误模块名称: ntdll.dll,版本: 10.0.17134.254,时间戳: 0xa5a334d4
异常代码: 0xc0000005
错误偏移量: 0x00000000000182cd
错误进程 ID: 0x2eb4
错误应用程序启动时间: 0x01d46954f5bae8bb
错误应用程序路径: D:\downloads\supertuxkart-git10202018-mingw-amd64\bin\supertuxkart.exe
错误模块路径: C:\WINDOWS\SYSTEM32\ntdll.dll
报告 ID: 34acd5a7-e523-4215-b824-f63468516c6b
错误程序包全名:
错误程序包相对应用程序 ID:


Also, the stdout.log for 0.9.3 reads:

{l Code}: {l Select All Code}
[info   ] [FileManager]: Data files will be fetched from: '../data/'
[info   ] [FileManager]: User directory is 'C:\Users\user\AppData\Roaming/supertuxkart/0.8.2/'.
[info   ] [FileManager]: Addons files will be stored in 'C:\Users\user\AppData\Roaming/supertuxkart/0.8.2/../addons/'.
[info   ] [FileManager]: Screenshots will be stored in 'C:\Users\user\AppData\Roaming/supertuxkart/0.8.2/screenshots/'.
[info   ] [FileManager]: User-defined grand prix will be stored in 'C:\Users\user\AppData\Roaming/supertuxkart/0.8.2/grandprix/'.
[info   ] [FileManager]: Asset 0 will be loaded from '../data/challenges/'.
[info   ] [FileManager]: Asset 1 will be loaded from '../data/gfx/'.
[info   ] [FileManager]: Asset 2 will be loaded from '../data/grandprix/'.
[info   ] [FileManager]: Asset 3 will be loaded from '../data/gui/'.
[info   ] [FileManager]: Asset 4 will be loaded from '../data/library/'.
[info   ] [FileManager]: Asset 5 will be loaded from '../data/models/'.
[info   ] [FileManager]: Asset 6 will be loaded from '../data/music/'.
[info   ] [FileManager]: Asset 7 will be loaded from '../data/replay/'.
[info   ] [FileManager]: Asset 8 will be loaded from '../data/tracks/'.
[info   ] [FileManager]: Asset 9 will be loaded from '../data/sfx/'.
[info   ] [FileManager]: Asset 10 will be loaded from '../data/shaders/'.
[info   ] [FileManager]: Asset 11 will be loaded from '../data/skins/'.
[info   ] [FileManager]: Asset 12 will be loaded from '../data/textures/'.
[info   ] [FileManager]: Asset 13 will be loaded from '../data/ttf/'.
[info   ] [FileManager]: Asset 14 will be loaded from '../data/po/'.
[verbose  ] translation: GetLocaleInfo langname returns 'zh'.
[verbose  ] translation: GetLocaleInfo tryname returns 'CN'.
[verbose  ] translation: Env var LANGUAGE = 'zh_CN'.
[verbose  ] translation: Language 'Chinese (simplified)'.
......


This means that the nightly build crashes before initializing translation. I don't know it it is related to mingw, since IIRC the 0.9.3 release is build using MSVC.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 585
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: [10-20-2018] SuperTuxKart Unofficial Build (Network Beta

Postby acme_pjz » 21 Oct 2018, 18:52

OK, I think I have found where the bug is. (The nightly build doesn't have debug symbols, so I have to use x64dbg to debug the assembly code :( )

In lib/irrlicht/source/Irrlicht/CFileSystem.cpp, starting from line 832:

{l Code}: {l Select All Code}
      // TODO: Should be unified once mingw adapts the proper types
#if defined(__GNUC__)
      long hFile; //mingw return type declaration
#else
      intptr_t hFile;
#endif

      io::path searchPath = Path;
      searchPath.append('*');
      struct _tfinddata_t c_file;
      if( (hFile = _tfindfirst( _T(searchPath.c_str()), &c_file )) != -1L )
      {
         do
         {
            r->addItem(Path + c_file.name, 0, c_file.size, (_A_SUBDIR & c_file.attrib) != 0, 0);
         }
         while( _tfindnext( hFile, &c_file ) == 0 );

         _findclose( hFile );
      }


I think the "#if defined(__GNUC__) long hFile;" code is wrong, it should be always using intptr_t, since somehow the "long" in 64bit mingw is 32-bit, but intptr_t (as well as the return type of findfirst) is 64-bit. I confirmed in the debugger that the return value of findfirst is 64-bit but the call to findnext passes a truncated 32-bit integer which crashes the program.

[EDIT] I successfully patched the supertuxkart.exe (with unpatched sha1 c5570d2d9745903bbba254833d39f44e684d7863, patched sha1 5e47f6d9ea09c284f3a78acc63336fdd2dae1c01) to make it run, here is the patch file: (save as stk.1337 then apply patch using x64bdg)
{l Code}: {l Select All Code}
>supertuxkart.exe
00000000004A3596:83->90
00000000004A3597:FD->90
00000000004A3598:FF->90
00000000004A3599:89->48
00000000004A359A:6C->89
00000000004A359B:24->6C
00000000004A359C:50->24
00000000004A359D:0F->50
00000000004A359E:84->90
00000000004A359F:B8->90
00000000004A35A0:01->90
00000000004A35A1:00->90
00000000004A35A2:00->90
00000000004A36C9:63->8B
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 585
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: [10-20-2018] SuperTuxKart Unofficial Build (Network Beta

Postby deve » 21 Oct 2018, 20:59

Indeed the "long hFile;" is wrong, good catch. Maybe it was a hack for very old mingw version... Actually in irrlicht they still use "long" too. And now we always use intptr_t:
https://github.com/supertuxkart/stk-cod ... d0c3845883
deve
 
Posts: 239
Joined: 23 Jan 2014, 13:45

Re: [No longer opr] SuperTuxKart Unofficial Build (Network B

Postby adevairhpj » 10 Nov 2018, 03:08

Error in build

---------------------------
SuperTuxKart - Fatal error
---------------------------
[fatal ] AIProperties: Incorrect nitro-usage '0' in AI 'easy'.
---------------------------
OK
---------------------------

on windows 7 sp1 32 bit
adevairhpj
 
Posts: 6
Joined: 25 Oct 2018, 22:23
Location: Brazil

Re: Linux STK Networking Build Scripts

Postby acme_pjz » 01 Dec 2018, 14:47

Hi,

This is my attempt to build STK nightly builds: https://github.com/acmepjz/my-stk-windows-nightly-build and the resulting binary files are at https://ci.appveyor.com/project/acmepjz ... /artifacts . It works :)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 585
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Linux STK Networking Build Scripts

Postby hirsebrei3 » 03 Dec 2018, 07:10

@acme_pjz: It works, indeed! Thank you very much from a Normallylinuxuser... ;-)
hirsebrei3
 
Posts: 2
Joined: 02 Dec 2018, 19:37

Re: Linux STK Networking Build Scripts

Postby tux_peng » 04 Dec 2018, 00:12

Mageia dependencies are installed with
{l Code}: {l Select All Code}
urpmi cmake openssl-devel libcurl-devel freetype-devel fribidi-devel libjpeg-turbo-devel libogg-devel openal-soft-devel libpng-devel libvorbis-devel nettle-devel zlib-devel git subversion mesa-comon-devel libxrandr-devel libbluez-devel libfreetype6-devel


Fedora instructions are in GIT
User avatar
tux_peng
 
Posts: 83
Joined: 13 Jun 2014, 19:59

Re: Linux STK Networking Build Scripts

Postby benau » 07 Dec 2018, 08:10

Hey acme_pjz can u update again with latest network branch?

Also some people say that they cannot run the binary due to path issue, so can u adjust the folder arrangement, so than inside the zip:
{l Code}: {l Select All Code}
zip-> stk-code->build->bin->RelWithDebInfo->supertuxkart.exe (and rest files..)
                       ->data->(po, gui...)
    -> stk-assets->(karts, tracks, textures...)
Image
benau
 
Posts: 65
Joined: 08 Dec 2015, 17:32

Re: Linux STK Networking Build Scripts

Postby acme_pjz » 07 Dec 2018, 18:36

benau {l Wrote}:Hey acme_pjz can u update again with latest network branch?

Also some people say that they cannot run the binary due to path issue, so can u adjust the folder arrangement, so than inside the zip:
{l Code}: {l Select All Code}
zip-> stk-code->build->bin->RelWithDebInfo->supertuxkart.exe (and rest files..)
                       ->data->(po, gui...)
    -> stk-assets->(karts, tracks, textures...)


OK I'll try to do that.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 585
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Linux STK Networking Build Scripts

Postby acme_pjz » 08 Dec 2018, 05:40

The windows nightly build on https://github.com/acmepjz/my-stk-windows-nightly-build has been updated. Don't worry on the "build failing", it's caused by the fail on uploading binaries to bintray.
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 585
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: Linux STK Networking Build Scripts

Postby cddepppp256 » 08 Dec 2018, 17:40

acme_pjz {l Wrote}:Hi,

This is my attempt to build STK nightly builds: https://github.com/acmepjz/my-stk-windows-nightly-build and the resulting binary files are at https://ci.appveyor.com/project/acmepjz ... /artifacts . It works :)


Thanks... I'm not the kind of person to do that right now. :)
cddepppp256
 
Posts: 20
Joined: 08 Oct 2018, 20:10

Who is online

Users browsing this forum: No registered users and 1 guest

cron