The International Simutrans Forum

PakSets and Customization => Pak128 => Pak128 Bug Reports => Topic started by: HDomos on December 01, 2012, 10:26:11 PM

Title: Compiling pak128
Post by: HDomos on December 01, 2012, 10:26:11 PM
Today i tried to compile pak128 first time with the pakmak.py file (on windows) and it came with this messenge:
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>>
_pakmak.tab found in "C:\Users\The Eye\Documents\GitHub\simutrans-pak128", processing...
Executing command: delete C:\Users\The Eye\Documents\GitHub\simutrans-pak128\simutrans\pak128
Executing command: copy pak128.prototype C:\Users\The Eye\Documents\GitHub\simutrans-pak128\simutrans\pak128
My folders:  factories | cityhouses | special_buildings | vehicles | citycars | landscape | base
Entering folder factories
Compiling...
Traceback (most recent call last):
  File "C:\Users\The Eye\Documents\GitHub\simutrans-pak128\pakmak.py", line 301, in <module>
    e.do()
  File "C:\Users\The Eye\Documents\GitHub\simutrans-pak128\pakmak.py", line 239, in do
    e.do()
  File "C:\Users\The Eye\Documents\GitHub\simutrans-pak128\pakmak.py", line 213, in do
    retval = run(command)
  File "C:\Users\The Eye\Documents\GitHub\simutrans-pak128\pakmak.py", line 129, in run
    return subprocess.call(parsePaths(command), close_fds=True)
  File "C:\Python33\lib\subprocess.py", line 521, in call
    with Popen(*popenargs, **kwargs) as p:
  File "C:\Python33\lib\subprocess.py", line 818, in __init__
    restore_signals, start_new_session)
  File "C:\Python33\lib\subprocess.py", line 1096, in _execute_child
    raise WindowsError(*e.args)
FileNotFoundError: [WinError 2] A rendszer nem találja a megadott fájlt
>>>

(the last is "the system doesn't find the file")
What should i do (i'm new to python) to make it work?

Edited: it doesn't generate anything...
Title: Re: Compiling pak128
Post by: VS on December 02, 2012, 11:34:41 AM
Do you have makeobj somewhere on the path? It's obvious it fails when it wants to execute it first time...
Title: Re: Compiling pak128
Post by: HDomos on December 02, 2012, 09:11:00 PM
I have makeobj in the same folder with the pakmak.py
Title: Re: Compiling pak128
Post by: VS on December 03, 2012, 08:57:35 AM
Can you call it in command line as "makeobj" ? If no, then it does not work...
Title: Re: Compiling pak128
Post by: Ters on December 03, 2012, 04:03:07 PM
If the python script is run by double-clicking on it, the current working directoy may not be the directory the python script is in, and therefore it won't look for makeobj there. Though without having seen the script, I don't know how else it would have been able to _pakmak.tab found in "C:\Users\The Eye\Documents\GitHub\simutrans-pak128", processing....
Title: Re: Compiling pak128
Post by: VS on December 03, 2012, 07:09:18 PM
The script does chdir a lot. Makeobj is called simply as "makeobj"... The expectation (imho not unreasonable) is that like "make" would expect "g++", "ld" etc to be callable without specific paths, "makeobj" should be, too.

edit: If makeobj simply MUST not be in path for some obscure reason, you can edit the top-level _pakmak.tab and change

cmd makeobj QUIET

to

cmd C:\somehere\makeobj.exe QUIET
Title: Re: Compiling pak128
Post by: HDomos on December 03, 2012, 09:24:53 PM
Quote from: VS on December 03, 2012, 07:09:18 PM
edit: If makeobj simply MUST not be in path for some obscure reason, you can edit the top-level _pakmak.tab and change

cmd makeobj QUIET

to

cmd C:\somehere\makeobj.exe QUIET

Oh thanks
Title: Re: Compiling pak128
Post by: VS on December 04, 2012, 10:02:07 AM
Did it work? I am really interested in experience of other people...
Title: Re: Compiling pak128
Post by: Fabio on December 04, 2012, 11:47:23 AM
Well, I must report that for me it doesn't copy anything from Pak128.Prototype while the rest compile fine.
Title: Re: Compiling pak128
Post by: VS on December 04, 2012, 12:03:38 PM
Try creating folder "simutrans" manually? That might be it... I remember some weirdness related to copying the files, but that used to be ages ago.

edit:

Try r1068? Also, a possible fix might be to "mkdir ${target}" before copying in the config... (But don't commit that - it will crash other systems than yours!)
Title: Re: Compiling pak128
Post by: Fabio on December 04, 2012, 03:33:36 PM
Quote from: VS on December 04, 2012, 12:03:38 PM
Try r1068?
Still not copying :-[

Quote from: VS on December 04, 2012, 12:03:38 PM
Also, a possible fix might be to "mkdir ${target}" before copying in the config... (But don't commit that - it will crash other systems than yours!)
I might try it in future (while working on winpakmak.vbs). Now I get around it just copying those subfolders/files manually.
Title: Re: Compiling pak128
Post by: HDomos on December 04, 2012, 06:16:02 PM
Quote from: VS on December 04, 2012, 10:02:07 AM
Did it work? I am really interested in experience of other people...

Yes it worked :D
Title: Re: Compiling pak128
Post by: VS on December 06, 2012, 02:46:39 PM
Fabio, could you try with this one?

BTW, it's probably easiest to delete all but citycar FOLDERS for testing...
Title: Re: Compiling pak128
Post by: Fabio on December 06, 2012, 02:55:55 PM
I will, thank you!

By the way, for testing I keep the root pakmak.tab unsynchronized, commenting out the unwanted folders, much faster! ;)