Log In  

PICO-8 doesn't have the .p8 file type registered to it on macOS. This means I can't double click a .p8 file to launch it and other conveniences associated with a registered filetype.

P#108526 2022-03-13 02:17 ( Edited 2022-03-13 02:21)

:: merwok

does pico8 on mac come as a file format with a concept of installation, or is it just a program that you run?

if there is no install step, then there’s no hook to register the file association, but I suppose you could do it yourself (I run debian and raspbian and have created desktop files to get pico8 in my main menu (with and without splore option) + to run P8 files and optionally P8 PNG carts).

P#108546 2022-03-13 16:35

That's because this is supposed to be a simulation of a DOS type system, pre-windows, pre-clicking on things. You go to the command line in Pico-8 and run files from there, just like we used to do back in the 80s. I feel like it's a feature, not a bug.

P#108547 2022-03-13 17:28 ( Edited 2022-03-13 17:28)

@UnitVector I seem to recall apple-II's from the same era being able run disks directly without needing the command line. I'm not sure about other similar systems that blur the line between pc and console (like the commodore systems), but even on DOS it was pretty common to minimize the number of commands needed to run a game to just a batch file available through the PATH variable. On windows I can open p8 files through file association and only need to ctrl-r to run them. I can also run them through a shortcut with the -run parameter to have them just startup and play and will probably be able to use the -x similarly once it's more stable. To me that seems both more console-like and era-appropriate.

If the way to set that up on a Mac isn't obvious, I think it'd be good to have that posted somewhere.

P#108550 2022-03-13 18:52 ( Edited 2022-03-13 18:52)

On mac ctrl-r also works to run a cart that's loaded. You don't need to go to command line and type "run".

In any case, I don't think this qualifies as a bug. It's just a desired feature that's not really necessary or intended to work in the first place.

But maybe that's just my opinion. I mean if this is a bug to be complained about, is the next bug complaint that you should also be able to save p8.png's and export a cart's music from Windows/Finder as well? These features are intended to be done from the Pico-8 command line. We don't need to be giving Zep extra unnecessary work instead of letting him work on new, more useful features.

P#108571 2022-03-14 01:12

The Mac version does support dragging and dropping a .p8 file into the window to LOAD it, and you can press Cmd-R to run it (or type RUN).

You can also start pico8 from the command line with a .p8 filename as an argument. With just pico8 filename.p8, it opens PICO-8, LOADs the cart, and switches to the code editor. You can also say pico8 -run filename.p8 and it'll do all that and run it automatically.

Notably, the Mac version does not appear to support setting a custom Open With... application for .p8 files. PICO-8.app will open but hang before the opening chime. I would expect this to behave similarly to executing either pico8 file.p8 or pico8 -run file.p8 on the command line. (I can see an argument for either, but I suspect many would prefer the latter.) While I generally agree that PICO-8 likes to pretend it has its own cart filesystem and you're "supposed" to load and run carts within the fantasy machine, it also clearly has OS integrations for more traditional file-based applications. Open With... on a Mac doesn't work, and it'd be nice if it did.

Whether it should automatically register itself as an opener for the file type I'm not sure. Note that PICO-8 supports multiple file formats, one of them is .p8.png, and I don't want PICO-8 to be my default PNG application.

I also wonder if the root path semantics would get confusing. With just -run, PICO-8 maintains its original root path, and the command line doesn't necessarily see the file that was loaded. You have to provide an explicit -root_path ... argument to change this for the session. If you're just double-clicking .p8 files to run them then maybe it doesn't matter, but if that's your editing workflow, it could get confusing if it doesn't also set -root_path.

P#108574 2022-03-14 03:22 ( Edited 2022-03-14 03:29)

Registering filetypes is handled in the PICO-8.app/Contents/Info.plist file on macOS, not by an installer or the app.

What I believe is supposed to be done there is to both add .png as a file type PICO-8 can open as well as establish .p8 as an extension of .png that is owned by PICO-8.

This should be a basic setup for registering p8 as an extensions of png:

    <string>PICO-8 Cartridge</string>
P#108575 2022-03-14 03:38 ( Edited 2022-03-14 10:28)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2022-09-30 19:39:30 | 0.024s | Q:20