1 (edited by Ikaron 2012-03-21 21:24:20)

Topic: [Solved] [Error] Unable to compile TW

So I tried to compile Teeworlds... Steps I did:
1: Download MSVS 10.0 (C & C++)
2: Download Python 3.2.2 and 2.7.2 (Tried both)
3: Extracted bam to Desktop/bam
4. Extracted TW source to Desktop/tw-src
5. Ran %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"" x86
6. Ran Desktop/bam/make_win32_msvc.bat
-No error until here!-
7. Went into Desktop/tw-src and ran ../bam/bam release
First try: Compiled, Threw over 100 errors and exited.
Second try: Didn't find compiler.

FIX: go to bam.lua, line 16: replace "return" with "name ="
line 19: replace with

 return "C:\\Python32\\python.exe" .. name 

(Replace with path to python)

System Specs:
Windows 7 Professional x64 (Same problem on Win7 Ultimate x32)
Intel i7-2600 (3.4GHz)
8GB RAM

Can anyone help me? I really want to mod (Even though I'm usually more java than C/C++).
Thanks for any answer, Ikaron.

PS: Teamviewer is fine with me, too. Add me on Skype: xXIkaron

Edit: Tried moving the bam folder, same problem.
Additionally, when giving my 100% original source to others after I compiled once, it wont work for them either. If I get a source that works for others, it fails, too.

Screenshots of the errors:
http://picload.org/image/rldpidg/screenshot.png
http://picload.org/image/rldpirp/screenshot2.png
http://picload.org/image/rldpidd/screenshot3.png

2

Re: [Solved] [Error] Unable to compile TW

extract bam to desktop\tw-src and run bam\bam release from desktop\tw-src

If you encounter errors again, pls post the log (or screenshot)

3

Re: [Solved] [Error] Unable to compile TW

100 errors. Give me some of them please.
And can you exactly write what you mean with "Didn't find compiler"?


[ note, that you should compile bam everytime, as i do and everytime do this %comspec% thing ]


And when i compile, i have my source usually in C:\teeworlds\source and bam in C:\teeworlds\bam .
So, i normally do cd C:\teeworlds\source
this %comspec% thing, compile bam, and do C:\teeworlds\bam\bam release
(i've written a little program for me cuz im lazy to type that in big_smile )

4

Re: [Solved] [Error] Unable to compile TW

Thank you, but no change hmm

5 (edited by KillaBilla 2012-03-19 23:11:36)

Re: [Solved] [Error] Unable to compile TW

Looks like the Python scripts have not been executed. Do you have Python correctly installed?
You need Python version 2.x for Teeworlds 0.5.2 and earlier (3.x will not work). For newer teeworlds version you can use version 3.x, too. Take at look at CompilingEverything.

6

Re: [Solved] [Error] Unable to compile TW

Yes, python works. As I said, tried both. I'm using TW 6.1

7

Re: [Solved] [Error] Unable to compile TW

How does your /datasrc/network.py look like?
Did any changes with the code?

8

Re: [Solved] [Error] Unable to compile TW

After trying to compile check if the files in src/game/generated/ are empty. If they are Python isn't doing its job.

If that's the case try changing bam.lua line 19 from

return str_replace(name, "/", "\\")

to

name = str_replace(name, "/", "\\")

9

Re: [Solved] [Error] Unable to compile TW

Thank you, m!nus.. Still, now it says "command python not found". The command python in the command line doesn't work either.. I have it correctly installed, though. Any other help would be gretly appreciated smile

10

Re: [Solved] [Error] Unable to compile TW

Are the files empty? If not, you don't even need to bother with this.
Otherwise add the python directory to your PATH or change the bam.lua to contain the absolute path to python:

return "C:\\Python27\\python.exe " .. str_replace(name, "/", "\\")

(same line as before, edit the path to fit your python installation)

11

Re: [Solved] [Error] Unable to compile TW

Yes, yes, yes!!! It works now! Thanks so much!!

12

Re: [Solved] [Error] Unable to compile TW

@Ikaron: You're welcome.

It's the same issue I had then.
The file association for .py is '...\python.exe "%1"' instead of %*. Thus it only picks up the first argument and the script exits without any notice leaving the files in generated/ empty.
Seems to happen when you reassign the file association. (I tried messing with it but didn't get it back to work)