Author Topic: pak doesn't appear in the list  (Read 6685 times)

0 Members and 1 Guest are viewing this topic.

Offline Iluvalar

pak doesn't appear in the list
« on: October 24, 2012, 03:36:51 AM »
Hi everybody,


First I must say that the doc. for the pak making process seems scattered all around. Maybe the solution to my problem is already explained somewhere, but I can't find it.


I downloaded the pak64 source data folder and I'm trying to run makeobj on it. I'm on ubuntu 12.04.


The folder that is generated seems good, as far as I can tell, but the new pak is not listed at all in the game startup menu. Is there something simple I'm missing ?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2593
  • Total likes: 289
  • Helpful: 89
  • D'oh
    • by An_dz
  • Languages: PT, EN, (it, de)
Re: pak doesn't appear in the list
« Reply #1 on: October 24, 2012, 04:02:25 AM »
All pakset files (.pak files) must be inside one single folder inside Simutrans folder. Inside the pakset folder there must have a ground.Outside.pak file so it can show up in the startup, some .tab files inside a config folder are required too, probably only cityrules.tab is extremely necessary but it's better having them all.
Of course there are a lot of other required files for it to at least load.

I don't know why you want to compile pak64. It's better to get it compiled from sourceforge, and if you want with the latest changes you can download from nightly site.

Offline kierongreen

Re: pak doesn't appear in the list
« Reply #2 on: October 24, 2012, 05:38:27 AM »
Is the compiled pak directory in the simutrans game directory? If you are using the default debian version of simutrans then paks need to be in /usr/share/games/simutrans/<pakname>

Offline Iluvalar

Re: pak doesn't appear in the list
« Reply #3 on: October 24, 2012, 06:18:41 PM »
There is no "ground.Outside.pak" in my pak. Only a ".Outside.pak". When I rename it, the pak show in the start menu but crash right after I click it.


i dont want to compile a genuine pak64 lol, I plan to edit it a make changes (I'll open a topic about my objectives). Can someone help me ?

Offline Combuijs

  • Web Team
  • Devotee
  • *
  • Posts: 1386
  • Total likes: 22
  • Helpful: 53
  • Maintainer of maps.simutrans.com
    • Combuijs
  • Languages: EN, NL
Re: pak doesn't appear in the list
« Reply #4 on: October 24, 2012, 07:10:02 PM »
I don't know if this helps you, but this was my batch file for windows to compile pak64. I don't use it anymore, because I've made my own pak64 with its own directory structure, but it used to work until a year ago. I know you are on a different operating system, but you will get the meaning, I think. It was called makeobj64.bat, but I can't attach *.bat files...

It expects the following directory structure:

install (with this batch file and makeobj.exe in it)
install\pak64.combuijs (empty directory)
pak64 (with the whole source of pak64)

After running the batch file, you move the pak64.combuijs directory to your simutrans directory (the one with simutrans.exe in it). It worked for me, I hope you can make it work for you!


Bob Marley: No woman, no cry

Programmer: No user, no bugs



Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8769
  • Total likes: 310
  • Helpful: 229
  • Languages: De,EN,JP
Re: pak doesn't appear in the list
« Reply #5 on: October 24, 2012, 08:01:59 PM »
There is a standard unix makefile. Go tho the pak source folder and type make. Then copy the folder pak to the right location.

Offline Iluvalar

Re: pak doesn't appear in the list
« Reply #6 on: October 24, 2012, 08:36:28 PM »
Thanks prissi.

I tried to use make on the directory.  I still have the same problem... there is an ".Outside.pak" but no "ground.Outside.pak". When I rename it, the pak appear in the options but it crash with this message :

Code: [Select]
Reading object data from pak/...
Segmentation fault

Is this the good spot to download the pak btw ? :
http://simutrans.svn.sourceforge.net/viewvc/simutrans/pak64/

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4235
  • Total likes: 170
  • Helpful: 149
  • Languages: EN, DE, AT
Re: pak doesn't appear in the list
« Reply #7 on: October 25, 2012, 06:40:21 AM »
Yes, these are the official sources. You can download compiled pakset from sourceforge download section.
Parsley, sage, rosemary, and maggikraut.

Offline Iluvalar

Re: pak doesn't appear in the list
« Reply #8 on: October 25, 2012, 08:49:31 PM »
Ok , here is a big update :

When I copy the newly generated pack folder in the simutrans folder and ask to overwrite the previous working folder, it then work fine and my change are taken into account in the game. The only conclusion I can make is that the make do not create all the necessary files.

I suggest you guys try at home with a fresh brand new folder to see if you can reproduce my problem.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8769
  • Total likes: 310
  • Helpful: 229
  • Languages: De,EN,JP
Re: pak doesn't appear in the list
« Reply #9 on: October 26, 2012, 07:21:36 PM »
The file uploaded as the official pak is generated by this makefile. Same for the nightly. These are strong indications that the error is on your side.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: pak doesn't appear in the list
« Reply #10 on: October 26, 2012, 10:04:13 PM »
Is this the good spot to download the pak btw ? :
http://simutrans.svn.sourceforge.net/viewvc/simutrans/pak64/
Did you download the files with some svn client, or by hand?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline Iluvalar

Re: pak doesn't appear in the list
« Reply #11 on: October 28, 2012, 02:23:07 PM »
by hand. Maybe I should use SVN  :D . But could that change the behavior ?

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4849
  • Total likes: 25
  • Helpful: 63
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: pak doesn't appear in the list
« Reply #12 on: October 28, 2012, 03:05:20 PM »
Wait, I think I got it. There is no DAT file for "outside"... because it is generated by makefile!

Code: [Select]
vladimir@vladimir-ThinkPad-Edge-E330:~/SVN/pak64$ grep -i -r --include=*.dat -n outside *
Makefile:12:OUTSIDE :=
Makefile:13:OUTSIDE += ground
Makefile:44:DIRS := $(OUTSIDE) $(DIRS64) $(DIRS128)
Makefile:87:$(OUTSIDE):
Makefile:88: @echo "===> OUTSIDE with REVISION and grounds"
Makefile:90: @echo -e -n "Obj=ground\nName=Outside\ncopyright=pak64 112.0 r" >$@/outside.dat
Makefile:91: @svnversion >>$@/outside.dat
Makefile:92: @echo -e "Image[0][0]=outside.0.0\n-" >>$@/outside.dat
Makefile:94: @rm $@/outside.dat
vladimir@vladimir-ThinkPad-Edge-E330:~/SVN/pak64$

You will want to experiment with this infernal machine yourself ;)

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Offline kierongreen

Re: pak doesn't appear in the list
« Reply #13 on: July 20, 2014, 07:40:13 AM »
Hi sorry to bump this but I ran into this problem myself when checking out latest svn. Fix was:
Code: [Select]
Index: Makefile
===================================================================
--- Makefile (revision 1467)
+++ Makefile (working copy)
@@ -89,9 +89,9 @@
  @echo "===> Grounds calculations"
  @echo "===> OUTSIDE with REVISION and grounds"
  @mkdir -p $(PAKDIR)
- @echo -e -n "Obj=ground\nName=Outside\ncopyright=pak64 120.0 r" >$@/outside.dat
+ @/bin/echo -e -n "Obj=ground\nName=Outside\ncopyright=pak64 120.0 r" >$@/outside.dat
  @svnversion >>$@/outside.dat
- @echo -e "Image[0][0]=outside.0.1\n-" >>$@/outside.dat
+ @/bin/echo -e "Image[0][0]=outside.0.1\n-" >>$@/outside.dat
  @$(MAKEOBJ) PAK64 $(PAKDIR)/ $@/ > /dev/null
  @rm $@/outside.dat

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4739
  • Total likes: 181
  • Helpful: 108
  • Languages: EN, NO
Re: pak doesn't appear in the list
« Reply #14 on: July 20, 2014, 08:13:30 AM »
Is echo guaranteed to be in /bin? It seems a very odd problem to have to specify it, and why only for those lines when echo is used many other places? Has echo become an internal command in some version of make?

Offline kierongreen

Re: pak doesn't appear in the list
« Reply #15 on: July 20, 2014, 03:20:47 PM »
The problem may be specific to Ubuntu/Debian, however the issue is not with echo in general but when used with parameters -e or -n. Instead of interpreting these they are instead echo'd to the file. Hence outside.dat contains something like:
Code: [Select]
-e -n "Obj=ground
Name=Outside
copyright=pak64 120.0 r"
1467
-e "Image[0][0]=outside.0.1
-"
instead of
Code: [Select]
Obj=ground
Name=Outside
copyright=pak64 120.0 r1467
Image[0][0]=outside.0.1
-

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4739
  • Total likes: 181
  • Helpful: 108
  • Languages: EN, NO
Re: pak doesn't appear in the list
« Reply #16 on: July 20, 2014, 03:52:41 PM »
What does which echo print on such a system? Seems like there must be a non-standard echo on the path. Maybe the echo command should be configurable like MAKEOBJ is, and CC & co is in the makefiles for Simutrans itself. On the other hand, I'd expect that such a non-standard echo implementation would cause problems for several other scripts as well, not just Simutrans' build scripts.

Offline kierongreen

Re: pak doesn't appear in the list
« Reply #17 on: July 20, 2014, 03:59:22 PM »
This seems to be a fairly common problem for make scripts running on certain systems and /bin/echo seems to be the solution other people have used also (google for echo make linux and the top result gives this solution for example).

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4739
  • Total likes: 181
  • Helpful: 108
  • Languages: EN, NO
Re: pak doesn't appear in the list
« Reply #18 on: July 20, 2014, 05:24:04 PM »
(google for echo make linux and the top result gives this solution for example).

According to that discussion (http://stackoverflow.com/questions/11675070/makefile-echo-n-not-working), it seems you don't have a Linux box, but a Mac. Or a Linux box that wants to be a Mac.

Seriously: From what I can gather from that somewhat confused discussion, make sends commands it don't understand to the users shell. I guess the problem is that you have a shell that is (unusually?) strict in it's built-in implementation of echo, while the scripts use what I guess is GNU echo extensions. I wonder if we can reliably expect that /bin/echo will support -n and -e. http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html says that XSI-compliant echo implementations should not support any options at all, but always interpret backslash character sequences, which is almost the exact opposite of what GNU echo does. The man page for echo from GNU coreutils writes that one should rather use printf for portability.


Online Vladki

Re: pak128 doesn't appear in the list
« Reply #19 on: July 21, 2014, 09:45:31 PM »
Hi I have a similar problem with pak128 - downloaded with svn tool, on debian Linux.

There is a base.pak file instead of ground.outside.pak. There seems to be a commented section in the makefile for special treatment, but it points to old location of the relevant dat file.

Update - attahced is a fixed makefile for pak128. Also fixed generation of crossings.
« Last Edit: July 21, 2014, 11:20:33 PM by Vladki »

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 4739
  • Total likes: 181
  • Helpful: 108
  • Languages: EN, NO
Re: pak doesn't appear in the list
« Reply #20 on: July 22, 2014, 08:22:30 AM »
Hi I have a similar problem with pak128 - downloaded with svn tool, on debian Linux.

There is a base.pak file instead of ground.outside.pak. There seems to be a commented section in the makefile for special treatment, but it points to old location of the relevant dat file.

Update - attahced is a fixed makefile for pak128. Also fixed generation of crossings.

I think this is a pak128 specific issue, and should be brought up there. It's makefile looks broken. Maybe it's not even built with make. Maybe this echo thing is pak64 specific, but it is a trick other pak sets might run into. Even core Simutrans itself may bump into it.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 8769
  • Total likes: 310
  • Helpful: 229
  • Languages: De,EN,JP
Re: pak doesn't appear in the list
« Reply #21 on: February 01, 2015, 09:55:18 PM »
Anyway, changed pak64 and pak64.japan to printf