News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

[Windows] Context menu entries to compile dat files

Started by An_dz, December 27, 2016, 08:53:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

An_dz

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.

Leartin

Could not test it yet, but it seems very, very useful. Many thanks!

Leartin

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?

An_dz

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.

prissi

Very useful; could be part of an NSIS installer script (if I ever feel bored ... ) Anyway, in SVN in r8825

Ters

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.

Matthew

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.

(Signature being tested) If you enjoy playing Simutrans, then you might also enjoy watching Japan Railway Journal
Available in English and simplified Chinese
如果您喜欢玩Simutrans的话,那么说不定就想看《日本铁路之旅》(英语也有简体中文字幕)。

An_dz

Change NUMBER as well otherwise makeobj will ignore pakNUMBER.