Skip to content

desktop: Add GUI for opening a directory#22621

Merged
kjarosh merged 10 commits intoruffle-rs:masterfrom
kjarosh:open-directory
Jan 10, 2026
Merged

desktop: Add GUI for opening a directory#22621
kjarosh merged 10 commits intoruffle-rs:masterfrom
kjarosh:open-directory

Conversation

@kjarosh
Copy link
Copy Markdown
Member

@kjarosh kjarosh commented Dec 28, 2025

There's two main reasons why we want to add an option to open a directory.

  1. Not archived Ruffle bundles can be opened easily.
  2. We can open multi-asset content on platforms where access to the filesystem is restricted (Linux, MacOS).

This PR makes it so that, when opening a directory, it tries to detect the content type. First, it checks for a Ruffle bundle, then it checks if there's only one SWF, if that's not the case, a second dialog will be shown to pick the root SWF from the directory.

When merged, this takes us one step closer to enabling filesystem isolation in Flatpak so that Ruffle (and SWFs) won't need to have access to the whole filesystem.

Before After
image image
image image

When opening a directory with multiple SWF files, the following dialog will be shown.

image

@kjarosh kjarosh added A-desktop Area: Desktop Application T-feature Type: New Feature (that Flash doesn't have) labels Dec 28, 2025
@kjarosh kjarosh changed the title desktop: Add GUI to open a directory desktop: Add GUI for opening a directory Dec 28, 2025
@Tiagoquix
Copy link
Copy Markdown

This is very interesting. Impressive work!

FYI, there's this too: flathub/org.torproject.torbrowser-launcher@c40186b
(Tor Browser Flatpak version removed filesystem perm to use portal)

Not sure if it would work with Ruffle, I have not tested it yet.

@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Dec 28, 2025
@kjarosh
Copy link
Copy Markdown
Member Author

kjarosh commented Jan 10, 2026

FYI, there's this too: flathub/org.torproject.torbrowser-launcher@c40186b (Tor Browser Flatpak version removed filesystem perm to use portal)

Not sure if it would work with Ruffle, I have not tested it yet.

That's what Ruffle is using. It's not an issue of not using portals, but loading arbitrary files, that weren't chosen by the user.

After this PR, the user will have a way of choosing a directory with all required files.

This makes PathOrUrlField's hint localizable and uses it to display the
"File or URL" text that was displayed next to the field before.

This makes more space and allows adding an additional open button.
Before this refactor, the URL was always inferred from its string
representation.  After this refactor, both have to be inferred together
for each change, which means we have better control over the value.
It means that we can encode information in the URL that is not present
in the representation that comes e.g. from the picker.
This dialog is able to select paths from within Ruffle without using
portals.

This makes it possible to select the root SWF when opening a directory.
This patch extends the FilePicker do that it can pick directories.
Specifically, it can pick a directory and then the root SWF if there are
many.
This allows opening directories with multi-asset content in Ruffle.
This makes it easier to pick the root SWF, assuming it's more probable
it will be near the root directory.
@kjarosh kjarosh merged commit c4e8837 into ruffle-rs:master Jan 10, 2026
26 checks passed
@kjarosh kjarosh deleted the open-directory branch January 10, 2026 21:17
Hancock33 added a commit to Hancock33/batocera.piboy that referenced this pull request Jan 11, 2026
------------------------------------------------------------------------------------------
rocknix-abl.mk 64fb3fca6af9bc097f024464747dd51aaca201b5 # Version: Commits on Jan 11, 2026
------------------------------------------------------------------------------------------
Update ABL, fix system stats calculations,

-------------------------------------------------------------------------------------
azahar.mk 7d2735b118470a9e6e381a363d7cd009a34cadac # Version: Commits on Jan 10, 2026
-------------------------------------------------------------------------------------
Updated translations via Transifex,

-----------------------------------------------------------------------------------
eden.mk 1cb8bcf531f6ad1b0afcc3b2179a136535760984 # Version: Commits on Jan 11, 2026
-----------------------------------------------------------------------------------
[dynarmic] disable extra verbose debugging on release builds (#3293)

-------------------------------------------------------------------------------------
hatari.mk 8484905c9f29bf0f21e9d69533576ff46e9a7c09 # Version: Commits on Jan 11, 2026
-------------------------------------------------------------------------------------
Move the swapping of the frame buffer pointers from screen.c to conv_st.c

This code should belong to the conv code, not to the SDL-related screen

code.,

---------------------------------------------------
pcsx2.mk v2.7.19 # Version: Commits on Jan 11, 2026
---------------------------------------------------
- [GS/HW: Floor depth writes to improve Z testing](PCSX2/pcsx2#13795)

,

------------------------------------------------------------------------------------
rpcs3.mk cd6dfc82a27844860d3596f5e031214ef354d849 # Version: Commits on Jan 10, 2026
------------------------------------------------------------------------------------
cellVdec: also use ctx->framerate to calculate the timestamps

ffmpeg 7 doesn't seem to guess the time_base parameter anymore,

-------------------------------------------------------------------------------------
snes9x.mk 4b51d103b909e0c1ac566b6865b9f6229a7b59e4 # Version: Commits on Jan 10, 2026
-------------------------------------------------------------------------------------
GTK: configuration option for on-screen messages (#1009)

* GTK: config file option for on-screen messages

For the GTK port, a configuration file entry to set the timeout length for the on-screen messages (such as when a state file is loaded) has been added.,

-------------------------------------------------------------------------------------
vita3k.mk 74276ce7ae21838deba378fd9d424b8d526aa6fe # Version: Commits on Jan 11, 2026
-------------------------------------------------------------------------------------
ci: Add macOS ARM64 build

- Optimize Linux build & update.

- Rename artifacts for store repo.,

-------------------------------------------------------------------------------------------
xenia-canary.mk 81656a97299c6fd01ea44e45e11af309c9f99b95 # Version: Commits on Jan 08, 2026
-------------------------------------------------------------------------------------------
[XAM] Fixed issue with error code being returned for local session,

-------------------------------------------------------------------------------------------
xenia-native.mk 81656a97299c6fd01ea44e45e11af309c9f99b95 # Version: Commits on Jan 08, 2026
-------------------------------------------------------------------------------------------
[XAM] Fixed issue with error code being returned for local session,

-----------------------------------------------------------------------------------
ymir.mk 12ca5ef56d731f67bd5bdacd9f3e63ad14e76d27 # Version: Commits on Jan 10, 2026
-----------------------------------------------------------------------------------
build: Try vcpkg tag 2025.10.17 to fix windows-a64 CI build,

-------------------------------------------------------------------------------------
ikemen.mk 92fa10f449d1105cc06fd1fecb60a90e31445662 # Version: Commits on Jan 10, 2026
-------------------------------------------------------------------------------------
style: fix code style issues with gofmt,

-------------------------------------------------------------------------------------------
moonlight-qt.mk 2549efc8b3623f1e2c6b43abad301a1adf4df898 # Version: Commits on Jan 11, 2026
-------------------------------------------------------------------------------------------
Fix pthread_attr leak,

---------------------------------------------------------------
ruffle.mk nightly-2026-01-11 # Version: Commits on Jan 11, 2026
---------------------------------------------------------------
## What's Changed

* tests: Add test for breaking words by @kjarosh in ruffle-rs/ruffle#22701

* desktop: Add GUI for opening a directory by @kjarosh in ruffle-rs/ruffle#22621

* chore: Update translations from Crowdin by @kjarosh in ruffle-rs/ruffle#22733

**Full Changelog**: ruffle-rs/ruffle@nightly-2026-01-09...nightly-2026-01-11,

--------------------------------------------------------------------------------------
scummvm.mk 29574ed22fc181d60ceff1de3d9f37213986f6e5 # Version: Commits on Jan 10, 2026
--------------------------------------------------------------------------------------
M4: RIDDLE: Fix Ripley giving marks to wolf forever the second time he pays for an information,

---------------------------------------------------------------------------------------
thextech.mk 078a20f5f4dc7e11b4d6504145a9fb673a3d62f8 # Version: Commits on Jan 10, 2026
---------------------------------------------------------------------------------------
Wii: dereference profile on deletion (#1082),

------------------------------------------------------------------------------------
box64.mk 3717266c3a26e97b96febfb7043c84a6271fb87f # Version: Commits on Jan 10, 2026
------------------------------------------------------------------------------------
[LA64_DYNAREC] Removed LASX from hard dependencies (#3350),

-----------------------------------------------------------------------------------------
catacombgl.mk c21a1c6ae7973eae24266c8414857bef0ec872e4 # Version: Commits on Jan 11, 2026
-----------------------------------------------------------------------------------------
Introduce Uint16Utility and Uint32Utility,

------------------------------------------------------------------------------------
cdogs.mk cb176456c33a1387b04140309cd4ec9ad57c36ae # Version: Commits on Jan 11, 2026
------------------------------------------------------------------------------------
basic kanga run #712,

----------------------------------------------------------------------------------------
supertux2.mk fdf00aa91f3ddcc7fa840158a8fc85b5b1aa831c # Version: Commits on Jan 06, 2026
----------------------------------------------------------------------------------------
Fix crash when activating 'Show collision rects' in debug menu

When activating 'Show collision rects' from the debug menu while Editor

is not active, the game crashed with a nullptr access. This is fixed by

separating the check for Editor active and the show collision rects flag

from the debug menu.,

----------------------------------------------------------------------------------------------------
sdl2-gamecontrollerdb.mk c42c9093fb9976b6acade29e396de33e757ac39b # Version: Commits on Jan 10, 2026
----------------------------------------------------------------------------------------------------
Add ShanWan Q36

thanks @LastLifeLeft,

----------------------------------------------------------------------------------------
retroarch.mk 63931092dd306b9b4e8c66fa55464bb287456cbb # Version: Commits on Jan 10, 2026
----------------------------------------------------------------------------------------
apple: small cleanups to the metal video driver. don't use it.

fixes #8655 #8983 #15747 #17860 #18442 #18408,

----------------------------------------------------------------------------------------
doomretro.mk c2edac1cfd0a1c6c9810589bfbe080a82ac4d5c8 # Version: Commits on Jan 11, 2026
----------------------------------------------------------------------------------------
More minor tweaks,

--------------------------------------------------------------------------------------
vkquake.mk bd15df1ecd4e6442702ef1097f4dbb70a5e83cf3 # Version: Commits on Jan 10, 2026
--------------------------------------------------------------------------------------
Removed con_warnings of not-loop LIST WAV chunks,

-----------------------------------------------------------------------------------------
sonic3-air.mk e072af26128cbcecc1ca1733ddc4de271e79f248 # Version: Commits on Jan 11, 2026
-----------------------------------------------------------------------------------------
Fix web build,

----------------------------------------------------------------------------------
trx.mk e85cdfe58a710b59ad53af8b7aaad05bbf0fbc4f # Version: Commits on Jan 10, 2026
----------------------------------------------------------------------------------
camera/los_camera: combine Lara state checks

This combines the state checks for Lara for both look and regular

movement.,

----------------------------------------------------------------------------------------------
libretro-fake08.mk a9bb61f483ac8aac921a97b96254144abc995774 # Version: Commits on Jan 10, 2026
----------------------------------------------------------------------------------------------
Update z8lua with support for ~ as bxor operator,

--------------------------------------------------------------------------------------------------------------
libretro-genesisplusgx-expanded.mk 83c2daff0f26620fec51a29820b85f8409bd5840 # Version: Commits on Jan 11, 2026
--------------------------------------------------------------------------------------------------------------
Additional System that adds 2.5GB SWAP,

------------------------------------------------------------------------------------------------
libretro-nestopia.mk 473d3072be67fa2542ca833c274ef6682cf0f0bc # Version: Commits on Jan 10, 2026
------------------------------------------------------------------------------------------------
libretro: Fix up VS. System palette,

-----------------------------------------------------------------------------------------------
libretro-scummvm.mk 29574ed22fc181d60ceff1de3d9f37213986f6e5 # Version: Commits on Jan 10, 2026
-----------------------------------------------------------------------------------------------
M4: RIDDLE: Fix Ripley giving marks to wolf forever the second time he pays for an information,

---------------------------------------------------------------------------------------------
libretro-vba-m.mk 4ca32c23fff58ddaa33b7b81f31eb811f217d6ca # Version: Commits on Jan 10, 2026
---------------------------------------------------------------------------------------------
translations: transifex pull

Signed-off-by: Rafael Kitover <rkitover@gmail.com>,
@kjarosh kjarosh removed the waiting-on-review Waiting on review from a Ruffle team member label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-desktop Area: Desktop Application T-feature Type: New Feature (that Flash doesn't have)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants