The International Simutrans Forum

PakSets and Customization => General Resources and Tools => Topic started by: An_dz on December 27, 2016, 08:53:49 PM

Title: [Windows] Context menu entries to compile dat files
Post by: An_dz on December 27, 2016, 08:53:49 PM
Quote from: Leartin on December 26, 2016, 05:43:35 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.
Title: Re: [Windows] Context menu entries to compile dat files
Post by: Leartin on December 28, 2016, 06:35:34 AM
Could not test it yet, but it seems very, very useful. Many thanks!
Title: Re: [Windows] Context menu entries to compile dat files
Post by: Leartin 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?
Title: Re: [Windows] Context menu entries to compile dat files
Post by: An_dz 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.
Title: Re: [Windows] Context menu entries to compile dat files
Post by: prissi 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
Title: Re: [Windows] Context menu entries to compile dat files
Post by: Ters 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.
Title: Re: [Windows] Context menu entries to compile dat files
Post by: Matthew 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:

@="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.

Title: Re: [Windows] Context menu entries to compile dat files
Post by: An_dz on September 27, 2019, 03:01:04 AM
Change NUMBER as well otherwise makeobj will ignore pakNUMBER.