Log In  
Follow
mailsprower1

The player character on a great adventure. Let's be impossible.

[ :: Read More :: ]

Heyo, BBS!

I was setting up PICO-8 to be portable on my flash drive. It's easily doable, but one extra requirement I had is to make the same PICO directory available offline from Windows and Mac without hassle, since I had to move between platforms often. I also wanted to avoid using symlinks, Automator actions and other unnecessary dependencies. It's no harder, but I wanted to share a bit on how I did it for future reference. There is a handy similar thread that I was referring to, but I haven't found all the info there, so I decided to gather some tricks in one place.

First of all, if you need to prepare your existing PICO-8 data for transfer, locate your current home folder and copy it entirely into wherever you're going to store the program on the portable drive (consult the wiki for default locations).

Second, put PICO-8 executables for necessary platforms into the same location along with the home folder.

The main trick is that now we need to set up shortcuts to launch PICO for each OS, with parameters that define the new portable folder locations, overriding the default configurations (which would otherwise be automatically loaded from the config.txt file). We need two folders, "home" for all the main stuff and "desktop" for saved screenshots. I put both right alongside the executables.
Here's the way I did the shortcuts:

Windows

Make a shortcut for pico8.exe. Let's edit its properties. If you're going to move the shortcut elsewhere, make sure you put the directory where pico8.exe lies into "Start in". In "Target", append a couple parameters to the .exe path, specifying the new "home" and "desktop" directories. Mine looked like this:

M:\Applications\PICO-8\pico8.exe -home ./home/ -desktop ./desktop/

"./" is the root directory, so this way our carts should now be loaded not from %appdata%, but from wherever PICO-8 is. Screenshots will be saved into "desktop", alongside "home".

Mac

Make a text file, change its extension to .sh and put it where the PICO-8.app executable is. We can use the --args parameter of Mac's open command to do the same thing as we did on Windows. Let's put this into pico-8.sh:

#!/bin/bash
cd "$(dirname "$0")"
open ./PICO-8.app --args -home $(dirname "$0")/home/ -desktop $(dirname "$0")/desktop/

The $(dirname "$0") part changes the script execution directory to wherever this script file lies, so we get the same effect as on Windows.
Now go to the script file's properties and choose the Terminal as the default application to open this (or all other) .sh files. Double-clicking pico-8.sh should now launch PICO-8 the same way it does in Windows, and all of your cart data and settings will be shared across the systems!
You may want to get rid of the rudimentary Terminal window hanging out after PICO is launched. For this, you can go to Terminal's preferences -> Profiles -> [your current default profile] -> Shell, and under "When the shell exits" pick "Close if the shell exited cleanly".

That's it!

I have no Linux system to test this setup. Maybe somebody can provide us with a similar trick to make it ready for three systems!

Please point out if you think I missed something. I'm no profound tech junkie, but I'll be glad if somebody needs this like I did!

P#97615 2021-09-21 19:03

Follow Lexaloffle:          
Generated 2024-03-28 22:42:41 | 0.093s | Q:5