The International Simutrans Forum

 

Author Topic: Compiling pak128  (Read 4908 times)

0 Members and 1 Guest are viewing this topic.

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
Compiling pak128
« 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:
Code: [Select]
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...
« Last Edit: December 01, 2012, 10:38:13 PM by HDomos »

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4852
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Compiling pak128
« Reply #1 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...

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
Re: Compiling pak128
« Reply #2 on: December 02, 2012, 09:11:00 PM »
I have makeobj in the same folder with the pakmak.py

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4852
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Compiling pak128
« Reply #3 on: December 03, 2012, 08:57:35 AM »
Can you call it in command line as "makeobj" ? If no, then it does not work...

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5342
  • Languages: EN, NO
Re: Compiling pak128
« Reply #4 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....

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4852
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Compiling pak128
« Reply #5 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

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
Re: Compiling pak128
« Reply #6 on: December 03, 2012, 09:24:53 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

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4852
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Compiling pak128
« Reply #7 on: December 04, 2012, 10:02:07 AM »
Did it work? I am really interested in experience of other people...

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Compiling pak128
« Reply #8 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.

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4852
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Compiling pak128
« Reply #9 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!)
« Last Edit: December 04, 2012, 01:05:02 PM by VS »

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Compiling pak128
« Reply #10 on: December 04, 2012, 03:33:36 PM »
Try r1068?
Still not copying :-[

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.

Offline HDomos

  • *
  • Posts: 153
  • Languages: EN, DE, FR, HU
Re: Compiling pak128
« Reply #11 on: December 04, 2012, 06:16:02 PM »
Did it work? I am really interested in experience of other people...

Yes it worked :D

Offline VS

  • Senior Plumber (Devotee)
  • Moderator
  • *
  • Posts: 4852
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Compiling pak128
« Reply #12 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...

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Compiling pak128
« Reply #13 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! ;)