Compiling TPT with SCons

  • QuanTech
    11th Mar 2017 Member 0 Permalink

    Hello. I'm trying to fllow the guide in the wiki on how to compile TPT with SCons on Windows. I've successfully installed MinGW,Git Bash,Python27,and SCons. Now I've come to the part where I need to edit the %Path% environment variable. I set it to "C:\MinGW\bin;C:\Python27;C:\Python27\Scripts" just as it said in the guide, and no I do not need a semicolon at the beginning because the %Path% was empty to begin with. So I set %Path% to that, but when I type 'cc' in the Git Bash shell, it says 'cc: Command not found'. Please help me.

  • jacob1
    11th Mar 2017 Developer 0 Permalink
    Did you restart git bash? It doesn't take effect until then. You might even have to restart your computer and / or logout, but i'm not sure if that is actually necessary
  • QuanTech
    11th Mar 2017 Member 0 Permalink

    @jacob1 (View Post)

     I restarted my computer. It still doesn't work. :( And I've also checked that everything is installed in the right directories, and they are.

    Edited once by QuanTech. Last: 11th Mar 2017
  • jacob1
    11th Mar 2017 Developer 0 Permalink
    Maybe try putting it in the other PATH, there's one local to your user and one more global one
  • QuanTech
    11th Mar 2017 Member 0 Permalink

    @jacob1 (View Post)

     Did that, restarted, and still doesn't work

    EDIT: hmm wait. When I checked the variable in cmd, it shows the C:/MinGW and stuff twice, but doesn't show in the control panel place...

    EDIT2: Okay now I checked again with cmd, and it shows that Path has all the stuff I need, but I restarted my computer and Git Bash still doesn't work!

    EDIT3: Python seems to work, but not cc

    Edited 3 times by QuanTech. Last: 11th Mar 2017
  • jacob1
    11th Mar 2017 Developer 0 Permalink
    Try continuing on with the guide and see if you get any errors. If you do, then the "C:\MinGW\bin" part is wrong. It's possible nothing is wrong though
  • QuanTech
    11th Mar 2017 Member 0 Permalink

    Now when I compile the source with scons.py, it terminates because 'build/Powder.exe: No such file'

  • jacob1
    11th Mar 2017 Developer 0 Permalink
    I need more logs, can you paste the full output on pastebin? And perhaps config.log too
  • QuanTech
    11th Mar 2017 Member 0 Permalink
    Edited once by QuanTech. Last: 11th Mar 2017
  • jacob1
    11th Mar 2017 Developer 0 Permalink
    Well the error is "windres: can't popen `gcc -E -xc -DRC_INVOKED -DSDL_INC -DWIN -D_WIN32_WINNT=0x0501 -D_USING_V110_SDK71_ -DX86 -DX86_SSE -DX86_SSE2 -DGRAVFFT -DLUACONSOLE -DUSE_SDL -Ibuild\src -Isrc -Ibuild\data -Idata -Ibuild\generated -Igenerated -Iresources resources\powder-res.rc': No error"

    I have literally no idea what that means, I've never seen it before. Looks like TPT probably compiled fine, but it is erroring with the icon for some reason. Maybe later I can look into it more ... for now I just have no idea.