The International Simutrans Forum

 

Author Topic: [Windows] Context menu entries to compile dat files  (Read 3599 times)

0 Members and 1 Guest are viewing this topic.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2915
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
[Windows] Context menu entries to compile dat files
« on: December 27, 2016, 08:53:49 PM »
What if Simutrans could read dat+png directly from a zipped file? This would work around the pak-file-format problem, at least for open paksets. Plus testing new objects would be a lot easier too - though loading time is probably longer.
Even though I disagree with the proposed solution, I agree that it can be a hassle to compile one or two files to test right away.

So I got some time and created this registry file that includes two context menu (right-click menu) entries to compile a dat to a pak immediately. One entry will compile in your preferred size and the second will ask you for the size.

You need to rename the txt to reg and edit the paths in the file. What you need to edit to make it work is explained in the file itself. After all that, just double-click the file to "install" it.

You can first try using the first attachment, if it fails try the second that ends with System.txt, this second files adds entries in HKCR\SystemFileAssociation\.dat and has worked for Leartin.
« Last Edit: January 07, 2017, 07:37:41 PM by An_dz »

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1448
  • PAK-DEV P192C
  • Languages: DE, EN
Re: [Windows] Context menu entries to compile dat files
« Reply #1 on: December 28, 2016, 06:35:34 AM »
Could not test it yet, but it seems very, very useful. Many thanks!

Offline Leartin

  • Heir-Benevolent-Dictator-Apparent
  • Devotee
  • *
  • Posts: 1448
  • PAK-DEV P192C
  • Languages: DE, EN
Re: [Windows] Context menu entries to compile dat files
« Reply #2 on: January 06, 2017, 03:58:16 PM »
I tried to use it today, sadly, it did not work for me at all. I replaced the paths, saved as a reg-file and double-clicked it, then restartet my PC, but there is no new context menu entry to be seen. Which is strange - even if my paths were wrong, it should still show, right?

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2915
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Windows] Context menu entries to compile dat files
« Reply #3 on: January 07, 2017, 07:36:30 PM »
I spoke with Leartin and we could fix it, the problem was that he needed to have the entries in HKCR\SystemFileAssociation\.dat

So I also uploaded a version that creates the entries on that point. It's the second file that ends with System.txt. You can use it if you don't see the entries on your side.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9993
  • Languages: De,EN,JP
Re: [Windows] Context menu entries to compile dat files
« Reply #4 on: September 22, 2019, 02:11:49 PM »
Very useful; could be part of an NSIS installer script (if I ever feel bored ... ) Anyway, in SVN in r8825

Offline Ters

  • Coder/patcher
  • Devotee
  • *
  • Posts: 5642
  • Languages: EN, NO
Re: [Windows] Context menu entries to compile dat files
« Reply #5 on: September 24, 2019, 04:18:40 PM »
This does not appear to be how one is currently supposed to create file associations in Windows. There is some information in https://docs.microsoft.com/en-us/windows/win32/shell/fa-file-types. I'm not sure for how old Windows this new method works, though.

Offline Matthew

  • *
  • Posts: 335
    • Japan Railway Journal
  • Languages: EN, some ZH, DE & SQ
Re: [Windows] Context menu entries to compile dat files
« Reply #6 on: September 26, 2019, 11:13:44 AM »
I don't know why this thread has suddenly risen from the dead, but I'm glad it has, as I've never seen it before and it looks useful. Thank you for making this An_dz.  :thumbsup: Maybe it should be stickied?

I would like to use this with makeobj-extended. I can see that I need to change the name of the executable in the PATH entries, like this:

Code: [Select]
@="cmd /v:on /c set file=%1&set file=!file:%W\\=!&C:\\Users\\Me\\Documents\\makeobj-extended.exe pakNUMBER ./ \"!file!\""
Is there anything else I need to change? I don't think I will ever run Standard makeobj, so there is no need to differentiate between the two.


Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2915
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: [Windows] Context menu entries to compile dat files
« Reply #7 on: September 27, 2019, 03:01:04 AM »
Change NUMBER as well otherwise makeobj will ignore pakNUMBER.