Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

File Associations for Windows?

A topic by Heartshine created Jun 09, 2023 Views: 478 Replies: 11
Viewing posts 1 to 5

Hello,

I'm  hoping to be able to publish using butler, but what I'm uploading is an app with filetypes of its own the user will expect to be able to double-click and open the app (this is more like a situation of word processor files than savegames, so it's especially important).

On MacOS this will be fine, the associations are in the app's plist and the OS finds them on download.

On Linux, there's no hope of my one-girl shop getting .desktop file installation working right across distributions, so I'm just shipping an AppImage, which butler nonconfigurably(? that I can tell) crams into a .zip, which is the exact kind of trivial jank to which Linux users are entirely numb (I use Arch BTW). That's fine too.

On Windows, the way to set file associations seems to be with an executable installer, which is yucky to find inside a zipfile the way butler forces it, and also it sounds like itch then treats the unzipped .exe file as the game itself, based on this. That's just killer. Is there any way around this? I want to be a good itch citizen and use butler.

Bonus round: there's not a windows machine within three blocks of me that I know of, so testing any of this is really hard. I'm cross-compiling most releases on my Mac. I don't suppose anyone has a clever way to easily try things on a Windows box?

Thanks!

(2 edits)

Hi.

I'm not sure I fully understand your problem.

In linux as in windows, the association between the extension of a file and the program is made at the registry level in the OS. (On Linux it's a bit more complex, but the concept is similar.)

If your problem comes from the side that instead of distributing the final binary, you are distributing an installer (setup), the problem is that in the absence of a manifest, the itch app understands that the only .exe you have will be the game itself.

If I understood your problem correctly, you can fix it by adding a manifest file that explicitly told the itch app what to do with the files.

I don't know MAC, but I imagine there are programs that allow you to create virtual machines with windows. For example windows 11 tiny inside virtual box

Thank you, Tiny11 looks like exactly the thing!

I didn't know about the manifest thing but that looks like almost what I need. It'd allow me to at least tell the user what itch downloaded is an installer, but it still seems janky to stick an installer in their start menu (as I understand itch does with downloaded exes, matter what the manifest says? I think? It's not clear from the docs).

Is there truly no way to make itch understand that an .exe file I've published is an installer, and not the game itself? Alternatively, is there truly no way to tell itch what file associations to make for my app?

You can't make file associations on windows without admin privileges. Imagine you "install" something hooking on .doc, that is recipe for desaster. Also, if you make installation, you need to make de-installation also.

But you might not need to. Make the user do it. First time they open your file named file.custom windows will ask how to open the .custom extension. Tell users to select your app.

I have two questions here.

Why use this method anyways.   Having associated file extensions only have reason when you navigate to files with os browser. If you open files by opening app first, it does not matter. File extension is only shortcut for making os open the app to open the file. 

And considering installation,  itch app is supposed to install the games, but installation for most stuff is just unzipping it. Not even itch app itself requires admin privileges  to install.

I for one would not want some recreational game or tool install system stuff on my system, like file extension. Not the least for the simple reason you stated. You are one-girl shop. You lack ressources to test your stuff.

(2 edits)

> Why use this method anyways.

My reasoning is what I'm building will either be used a ton (resulting in zillions of files), or not at all. I really can't see having any casual users. Given that, not having working file management seems a huge usability hit. It'd be crippling for me, anyway, to have a broken file manager, and not be able to use a CLI as most people can't.

Do people just...not work that way, anymore? I see so many apps that just hide all my files in their config directory and give me a half-implemented riff on Norton Commmander to manage them with like that's a normal thing to do. I thought it was because they were low-quailty ports of phone apps. Is that an accepted practice in 2023?

I still do not get it.

Do you expect people to have files created by your app reside in a user folder and users to navigate there with the os and open the files?

Or do you expect people to open the app and then use the app to open different files.

Because file extensions on system level only matter for scenario 1. Or is this fundamentally different on mac? When I open , for example, a picture viewer and select open file, it prefilters the folder I am looking at, with pictures. But for a picture viewer, it is handy to use the os file browser and just randomly open a file, without opening the app first. 

(1 edit)

I still don't quite understand what you need, but you have a mistake in the concept.

Itch app is a game manager, not a download manager. By using Ïtch app, the user expects to find a binary for the final game and not just a setup.

The "correct" way would be to include 2 executables, one with your final binary and another that is the setup that will install the dependencies or create the association between an extension and your application in the registry. The setup is only executed the first time. I don't know if you can solve this with the manifest, in theory it should be possible, because your setup will be a dependency of your final application, but if not, you can do it in your application code.


About hiding files, it is usually a common practice on mobile devices, but it is not something that should be done on a normal computer.

Mobile devices are often restricted and designed to work in a completely different way than a desktop workflow. If you expect your app to work the same as it does on a mobile device, you will surely receive a lot of negative reviews from people who use your app on a PC.


EDIT:

We talk about the use of the itch app. If we talk about downloading the game from the website, then having a single setup file would be a solution.

Would that not be handled by some kind of launcher? The launcher checks if stuff needs to be installed and acts accordingly.

The launcher can be the game itself.  But this is stuff that I would not expect from a game I got from itch. Also bad for building for different targets from one source.

If we talk about a real creation tool, maybe. But even then, you can have the user    associate the file extenstion if desired. The app does not need this to operate.

This is still a recreational app we are talking about, is it not? Also known as a game.

Hi, I don't quite understand your point, I think you are answering me by mistake.

If you want to discuss with the person asking the question the concept of their application and why they need to associate an extension type with their executable, it's best to speak to that person directly.

In this thread, I see a question and the idea is to try to answer that question.

By the way, Itch not only allows games to be uploaded, you can upload other types of applications without any problem.

I replied to your solution with the two executeables. And I did look at the op creators page. There is a game that is in the tool category. At least the description reads like a game. It definityl does not read like a description for a tool. At least not what I would call a tool. There is possibilty that it is meant as a helper app for some esoteric rl stuff. It has local multiplayer tagged ;-)

The role of launcher is done by the itch app, if you add another launcher you complicate the experience for the end user a bit and break the concept of launching the game through the itch app.

The idea of having 2 executables is to minimize that problem.

You run the setup only the first time, and subsequent times will launch the game, which is what the end customer expects when using the itch app.

Of course this is just one possible solution, there are many others and as you mention, another approach would be to have a single executable that acts as launcher and application.

Uhm. That is how steam works. It launches the launchers.

Anyways, I wonder how this turns out. I do not see the necessity for file association in this case. Maybe it is different on Mac.