Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect previous instance: open file / sprite as a new tab in existing Aseprite session / window #477

Open
Ashedragon opened this issue Sep 1, 2014 · 18 comments
Labels
feature Feature request, or something should be improved linux native time-5 windows
Milestone

Comments

@Ashedragon
Copy link

A setting that could be toggleable that would allow aseprite to use the instance already open to open the file rather than creating a new instance every time. I'll elucidate:
Say I have .ase files set to open with aseprite. I double-click one of them and it opens aseprite. If I then double-click another file to open it, it would (instead of creating an entirely new instance of aseprite) simply open the file in the aseprite that currently exists.

image

@dacap dacap added this to the v1.0 milestone Sep 1, 2014
@dacap
Copy link
Member

dacap commented Sep 1, 2014

The Mac OS X port is already working in this way and is something I'd really love to see working in the Windows side.

@dacap dacap self-assigned this Sep 1, 2014
@dacap dacap modified the milestones: v1.0, v1.1 Oct 25, 2014
@dacap dacap modified the milestones: v1.2, v1.1 Nov 17, 2015
@dacap dacap added the native label Nov 17, 2015
@dacap dacap modified the milestones: v1.1, v1.2 Dec 4, 2015
@dacap
Copy link
Member

dacap commented Feb 2, 2016

This feature is needed for the Steam release:

  • when we double-click a .ase file, a new Aseprite.exe is launched
  • if there is a Aseprite.exe running, we've to send a command to this instance to open the file, then we are done (we can close the second instance)
  • if we are the first Aseprite.exe instance running, we check if we are installed on Steam, in that case we've to launch the appid and close this instance (so the app is initialized from Steam).
  • the first running instance has to start in a "server" mode, so other instances can send commands to this instance (e.g. like open a file)

This IPC could be used to solve #533 too.

@dacap
Copy link
Member

dacap commented Feb 3, 2016

This can be solved on Windows using DDE. This is an old technology, but it looks like Microsoft Office is still using it, so we can go for it.

Note: The Allegro port cannot handle DDE messages correctly, it looks like only the Skia port will be able to fix this issue. Anyway in the future, when we implement a full COM server, we can remove the DDE processing.

@dacap dacap closed this as completed in 210ffc0 Feb 4, 2016
@dacap
Copy link
Member

dacap commented Feb 4, 2016

This fix will be available for first time in the beta branch of the Steam release. (It means, using the Skia branch + special registry keys to use DDE.)

@dacap dacap changed the title Detect Previous Instance Detect previous instance: open file / sprite as a new tab in existing Aseprite session / window Aug 2, 2016
@dacap dacap reopened this Aug 2, 2016
@dacap dacap added the linux label Aug 2, 2016
@dacap
Copy link
Member

dacap commented Aug 2, 2016

I'm reopening this issue to add Linux support.

@dacap dacap modified the milestones: v1.1, v1.1-bugs Jan 8, 2017
@dacap dacap modified the milestones: v1.1-bugs, v1.2-bugs Sep 12, 2017
@dacap
Copy link
Member

dacap commented Oct 23, 2018

@daisyowl you can check the details of the #1070 issue to see how to associate other files as the .aseprite type

@daisyowl
Copy link

hmm, i followed the instructions here as best as i could understand and it still doesn't work (opening a .png from the windows explorer or in unity)

regedit

@daisyowl
Copy link

ok so, update: after a bunch of fiddling, it will open from unity/file exlorer with my current setup, which is:

  • having the registry entry for .png point to AsepriteFile as above
  • ALSO setting the file explorer "open with" dialogue to aseprite

@daisyowl
Copy link

without the second step (file explorer dialog) it would keep opening them in new instances of aseprite

@mischiefaaron
Copy link

I am having this bug after a recent Aseprite update (currently v1.2.11-x64) in Linux Mint 19.1 XFCE (64-bit) and it's really messing with my workflow lately. I like to keep my file browser (Thunar 1.6.15) open in another window as I'm working with a lot of different sprites.

@MightyPrinny
Copy link

We need a hero for linux users for either this or drag and drop support.

@dacap
Copy link
Member

dacap commented Jan 10, 2020

Yeah, if someone want to contribute that would be great (the clipboard part was already a lot of work just for the Linux port compared to Windows and macOS 😢)

@mischiefaaron
Copy link

mischiefaaron commented Jan 10, 2020

You're so nice to us Linux users, dacap. I am not used to it.
In fact I thought you were already a regular user of Linux 😅.
I had no clue you made a whole library for making a cross-platform clipboard in C++. Bravo!!
It's a wonder why it hasn't already been done before.

@henriquecolini
Copy link

Hey, sorry, but has there been any progress on this? As a game developer, opening image assets constantly is a very common thing, and recently Unity added full support for Linux. I've been using it for a while now and it's great, but this minor aseprite issue hurts my workflow.

I really wish I could contribute, but I have no clue on how any of this code works. First thing that came to my mind was making a bash script that checks for an existing aseprite process, and somehow sending the message to open an image to that process, but I also don't know if that's possible.

@dacap
Copy link
Member

dacap commented May 23, 2024

@henriquecolini a solution for all platforms would be to use named pipes, it's something I'd like to add in a near future, but if you want to give a try you can go for it (we'll need a way to handle named pipes from the laf library first).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request, or something should be improved linux native time-5 windows
Projects
None yet
Development

No branches or pull requests

6 participants