I try to use pykmap.py but .....
python pakmak.py
I don´t get a direktory with the PAK-Files ... can somebody help?
In the output is no error-text ...
This is what it should write first. Does any of these texts appear?
ps: Copying files takes long...
It begin with:
Image size is set to 128x128
writing invidual files to ./
reading file ./old_powerplant.dat
writing file ./factory.old_powerplant_kraftwerk.pak
packing factory.old_powerplant_kraftwerk
reading file ./autoshop.dat
writing file ./factory.autoshop3.pak
packing factory.autoshop3
reading file ./factories-wood-128.dat
writing file ./factory.Nutzwald.pak
packing factory.Nutzwald
writing file ./factory.Saegewerk.pak
packing factory.Saegewerk
writing file ./factory.Papierfabrik.pak
packing factory.Papierfabrik
writing file ./factory.Druckerei.pak
packing factory.Druckerei
writing file ./factory.Moebelfabrik.pak
packing factory.Moebelfabrik
writing file ./factory.Moebelhaus.pak
packing factory.Moebelhaus
reading file ./shaft-coalmine.dat
writing file ./factory.shaft_coal_mine.pak
packing factory.shaft_coal_mine
reading file ./publisher.dat
writing file ./factory.publisher.pak
packing factory.publisher
reading file ./factories-material-128.dat
writing file ./factory.Stonequarry.pak
packing factory.Stonequarry
writing file ./factory.Sandquarry.pak
packing factory.Sandquarry
writing file ./factory.Cementmill.pak
packing factory.Cementmill
writing file ./factory.Concretefactory.pak
packing factory.Concretefactory
writing file ./factory.Materialswholesale.pak
packing factory.Materialswholesale
reading file ./factories-ethanol-128.dat
writing file ./factory.cornfield.pak
packing factory.cornfield
writing file ./factory.ethanol_plant.pak
packing factory.ethanol_plant
writing file ./factory.modern_fuel_station.pak
packing factory.modern_fuel_station
reading file ./wind_tubine.dat
writing file ./factory.wind_kraftwerk.pak
packing factory.wind_kraftwerk
reading file ./factories-food-128.dat
writing file ./factory.grain_farm.pak
Bevor you ask, the pakmak.tab
simutrans@birgit ~/PAK/PAK128 $ cat pakmak.tab
FOLDERS
!factories
!houses commercial
!houses industrial
!houses residental
!special buildings
!vehicles
!citycars
!trees
!base
OPTIONS
size 128
clean yes
# target is always written with /
target simutrans/pak128
# don't write version and Volker Meyer and all that ;-)
cmd /home/simutrans/bin/makeobj QUIET
COMMANDS-BEFORE
delete ${target}
copy pak128.prototype ${target}
COMMANDS-MIDDLE
COMMANDS-AFTER
So you don't see anything written from Python? Like, a file with this...
print "hello world"
does nothing?
simutrans@birgit ~ $ python test.py
hello world
simutrans@birgit ~ $ cat test.py
print "hello world"
simutrans@birgit ~ $
I hope it help ...
But it doesn't write "pakmak.tab found...."?
When I delete the pakmak.tab, then he write it ....
Hm. In pakmak.tab, change "clean yes" to "clean no" - after it runs, are there pak files in source folders? Does folder simutrans/pak128 somewhere?
After running it ...
simutrans@birgit ~/PAK/PAK128 $ find simutrans/pak128/ -name "*.pak"
simutrans/pak128/compatibility/1.0.0/vehicle.AvG_Post_Truck.pak
simutrans/pak128/compatibility/1.0.0/vehicle.Post_Trailer_0.pak
simutrans/pak128/compatibility/1.0.0/vehicle.Post_Trailer_1.pak
simutrans/pak128/compatibility/1.0.0/vehicle.RVg_Type_S_Grain.pak
simutrans/pak128/compatibility/1.0.0/vehicle.moha2100.pak
simutrans/pak128/compatibility/1.0.0/vehicle.Goods_Trailer_4.pak
simutrans/pak128/compatibility/1.0.0/vehicle.PMNV_0-10-0.pak
simutrans/pak128/compatibility/1.0.0/vehicle.PMNV_0-10-1.pak
simutrans/pak128/compatibility/1.0.0/vehicle.CB_476.pak
simutrans/pak128/compatibility/1.0.0/vehicle.LV115_Ford_Mail_Van.pak
simutrans/pak128/compatibility/1.0.0/vehicle.AvG_Goods_Trailer_0.pak
simutrans/pak128/compatibility/1.0.0/vehicle.AvG_Goods_Truck.pak
simutrans/pak128/compatibility/1.0.0/vehicle.Goods_Truck_6.pak
simutrans/pak128/compatibility/1.0.0/vehicle.jiha6010.pak
simutrans/pak128/compatibility/1.0.0/vehicle.Standard_tender.pak
simutrans/pak128/compatibility/1.0.0/vehicle.3Diesellokomotive.pak
simutrans/pak128/compatibility/1.0.0/vehicle.LV116_Ford_Mail_Van.pak
simutrans/pak128/compatibility/1.0.0/vehicle.Road_Horses_0.pak
simutrans/pak128/compatibility/1.2.3/vehicle.PMNV_Plastic_Trailer_0.pak
simutrans/pak128/compatibility/1.2.3/vehicle.Plastic_car_0.pak
simutrans/pak128/compatibility/1.2.3/vehicle.Freighter_Plastic.pak
simutrans/pak128/compatibility/1.2.3/vehicle.Plastic_Truck_0.pak
simutrans/pak128/compatibility/1.2.3/vehicle.Staubkesselwagen.pak
simutrans/pak128/compatibility/1.2.3/vehicle.RVg-LK_Plastic_Truck.pak
simutrans/pak128/compatibility/1.2.3/vehicle.PMNV_Mack_Plastic_Trailer_L.pak
simutrans/pak128/compatibility/1.2.3/vehicle.PMNV_Mack_Plastic_Trailer_S.pak
simutrans/pak128/compatibility/1.2.9/building.BigTerminal1950_AirportBlg_E.pak
simutrans/pak128/compatibility/1.2.9/building.BigTerminal1950_AirportBlg_S.pak
simutrans/pak128/compatibility/1.2.9/building.Terminal1950_AirportBlg_E.pak
simutrans/pak128/compatibility/1.2.9/building.Terminal1950_AirportBlg_S.pak
simutrans/pak128/compatibility/1.2.9/building.BigTerminal1930_AirportBlg_E.pak
simutrans/pak128/compatibility/1.2.9/building.BigTerminal1930_AirportBlg_S.pak
simutrans/pak128/compatibility/1.2.9/building.Terminal1930_AirportBlg_E.pak
simutrans/pak128/compatibility/1.2.9/building.Terminal1930_AirportBlg_S.pak
simutrans/pak128/compatibility/1.2.9/building.LuftPost1950_AirportBlg_NS.pak
simutrans/pak128/compatibility/1.2.9/building.LuftPost1950_AirportBlg_OW.pak
simutrans/pak128/compatibility/1.4.3/factory.Stahlwerk.pak
simutrans/pak128/compatibility/1.4.3/factory.Kohlegrube.pak
simutrans@birgit ~/PAK/PAK128 $ find . -name "*.pak" | less
./home/simutrans/PAK/PAK128/simutrans/pak128/factories.all.pak
./!base/good.canned_food.pak
./!base/home/simutrans/PAK/PAK128/!trees/dat/home/simutrans/PAK/PAK128/simutrans/pak128/building.hq.all.pak
./!base/good.cotton.pak
./!base/schwebebahn_all/dat/building.MonorailDepot.pak
./!base/schwebebahn_all/dat/home/simutrans/PAK/PAK128/!trees/dat/home/simutrans/PAK/PAK128/simutrans/pak128/symbol.BigLogo.pak
./!base/schwebebahn_all/dat/home/simutrans/PAK/PAK128/!trees/dat/home/simutrans/PAK/PAK128/simutrans/pak128/GUI.128.pak
./!base/schwebebahn_all/dat/way.Schwebebahn_p_ground.pak
./!base/schwebebahn_all/dat/building.Suspended_Monorail_Bahnhof_Modern.pak
./!base/schwebebahn_all/dat/roadsign.choose_signal_monorail.pak
./!base/schwebebahn_all/dat/building.MonorailGround.pak
./!base/schwebebahn_all/dat/building.MonorailFoundation.pak
./!base/schwebebahn_all/dat/roadsign.preSignal_Monorail.pak
./!base/schwebebahn_all/dat/bridge.Schwebebahn_p_bridge.pak
./!base/schwebebahn_all/dat/way.Suspended_Monorail_Track.pak
./!base/schwebebahn_all/dat/schwebebahn.all.pak
./!base/schwebebahn_all/dat/building.MonorailStation.pak
./!base/schwebebahn_all/dat/roadsign.Signal_Monorail.pak
./!base/good.Bucher.pak
./!base/road_signs/dat/home/simutrans/PAK/PAK128/!trees/dat/home/simutrans/PAK/Plines 1-20
.......
So the pakmak have a problem with the copy
Sorry for the pushing but ....
can you help?
Test: in archive are 2 scripts and test folder "a" with files. Test1 copies it to "aa" - test2 again removes "aa". Please try if it is copied and then removed complete.
Structure of "a":
a - 1
- 2
- b - 3
- 4
- c - 5
- 6
No Problem .. it work well ...
Hmmmm... then it must be something about relative paths?
The python work .. becouse the gentoo-emerge-tool is written in python ...
relative paths ... I htink that is the Problem. But .... where do you use it?
P.S: can you make a variable in pakmak.tab for the destination?
Variable, as in, take variable from parameter, or?
because there is line
"target simutrans/pak128"
and later you can use ${target}, like
delete ${target}
copy pak128.prototype ${target}
I used the same syntax as in the shell script...
Do you use it on a windows Maschine?
I make a new test with a fix Direktroy ..
like "/home/simutrans/test"
Edit:
Don´t look good:
target /home/simutrans/simutrans/pak128
simutrans@birgit ~/PAK/PAK128 $ python pakmak.py
pakmak.tab found in "/home/simutrans/PAK/PAK128", processing...
delete /home/simutrans/PAK/PAK128/home/simutrans/simutrans/pak128
Yes, I have only windows...
The target folder is deleted first because it's easier to rid of old data that way.
Can you please redirect output from python and attach that file?
No Problem ....
But ... when I set the folger to "/home/....." with a begin "/", it is an absolut paths and not a relative, but why he look at /home/simutrans/PAK/PAK128/home/simutrans/simutrans/pak128
Edit:
No Problem in 15 Minute .... ;o)
Ah, now that's better for diagnosis!
PS: you can remove some folders from pakmak.tab and make it faster :) Does it really take 15 minutes?
I must start it on the Server, then download it to my workstation and uploaded it ..... ;o)
http://www.wernieman.de/pak.zip (http://www.wernieman.de/pak.zip)
Edit:
The Programm create a /home/simutrans/simutrans/pak128/
It is creasy ... I think I must learn python...
I see... yes, crazy.
I think the problem may be in Python library, in functions that make absolute path and check if it is absolute... please try the attached script.
EDIT: or I use them wrong :(
---
Shell is asynchronous in unix or what? Makeobj writes first, then python? And there are some letters missing... reminds me of telnet
simutrans@birgit ~/test $ python test3.py
current folder: /home/simutrans/test
test path: test/test
abspath for test path: /home/simutrans/test/test/test
test path: /home/test/test
abspath for test path: /home/test/test
So the error is on my side.
O.K. ... I test it tomorow....
when it will be O.K. then I use it to make the PAK (and delete the "arbeite.sh" script)
Yes :) I am sorry... I will write here when it can be tested again.
There is a problem in your script with the direktroy change on unix ...
I found some:
!base/misc_GUI/dat/home/simutrans/PAK/PAK128/!trees/dat/home/simutrans/PAK/PAK128/simutrans/pak128/GUI.64.pak
I don´t think, that this is the right path ...
With the compat pak files it work well ....
The log files (and the destination direktory):
http://www.wernieman.de/pak.zip (http://www.wernieman.de/pak.zip)
I will install some virtual machine and linux...
---
Hello world from my first Linux! Well, not really first, I had some single floppy distro a few years back ;D
I am running pakmak.py on Ubuntu 8 with Python 2.5.2 and makeobj 49... and IT WORKS with the fix committed in r137.
Your turn! :)
I must look ... but I don't know if I have time at weekend ... ;o)
Monday then... No need to hurry.
It look good....
But I use it productive on Monday .. then I kill the "arbeite.sh" in the svn ...