RenPy Launcher and it's use of Atom (integrated and as default system editor)

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Posts: 18
Joined: Sat Feb 09, 2019 9:48 am

RenPy Launcher and it's use of Atom (integrated and as default system editor)

#1 Post by Woetoo » Thu Nov 07, 2019 7:19 am

I use Atom as my editor for RenPy.
I recently reformatted my computer (Windows 7 64bit) and as a result paused to think about RenPy and Atom.

I installed the latest version of Atom first and then told RenPy I wanted to use the default system editor for RenPy files.
Except... it behaved slightly differently. Specifically the project library on the left side doesn't appear by default and even when it's shown manually - doesn't list all the relevant files in the same directory. I think some of the Git integration is also switched off by default (which suits me, since I don't use it).

When I instead ask the RenPy launcher to use Atom as an explicit choice - it installed a separate copy of Atom within my RenPy installation folder. However, despite the project folder now working as I might hope... it is an older version of Atom that tells me it can't be upgraded.

I realize I could just use the slightly older version installed by RenPy. It does practically everything I want and "if it ain't broke... don't fix it" comes to mind.

However there is part of me that just want to run the latest version. I couldn't even tell you a bugfix, extra feature or security fix that I would need. But then who the hell ever reads the patch notes for 99% of the software they regularly update?

I assume that RenPy's installed version of Atom has some settings and configuration files pre-tweaked and is the portable version, since it looks like it's being put into place using zSync.
So I have a couple of questions/possible solutions based on those assumptions...
  • Is there any way to get the "Atom" option of the launcher setup to recognize that Atom is already installed and apply it's tweaks there instead?
  • ... Or could someone explain those tweaks in a way that I could manually make it work with Atom as the default system editor installed elsewhere?
  • Could I just install the latest portable version of RenPy over the top of the RenPy one?
  • What else am I missing?
Clearly at this stage I'm guessing. Getting Atom to be part of the RenPy launcher in this way must have required more knowledge about Atom than I clearly have. So I'm not even sure I'm asking the right questions.
In the meanwhile, if I can find it, I'm going to try installing the same release of the portable version and compare it to the version that RenPy installs. Perhaps I can solve my own question by thinking, rather than having others think for me. :twisted:

Any help gratefully received.

Posts: 18
Joined: Sat Feb 09, 2019 9:48 am

Re: RenPy Launcher and it's use of Atom (integrated and as default system editor)

#2 Post by Woetoo » Thu Nov 07, 2019 9:54 am

Okay. So I have an answer... but I don't like it.

Firstly, some stuff I found out while looking into this. (apologies to those who already know this).
This info is Windows oriented. Mac and Linux will have different folders.
  • When you select "Atom" from the launcher preferences it downloads Atom Portable 1.34.0_ia32 (32bit Windows version).
  • RenPy installs RenPy portable into a {renpyinstalldir}\atom\atom-windows\ folder.
  • Atom's configuration files are stored in an .atom folder.
    • When installed "normally", the .atom folder is stored in the user's profile folder. ( Usually C:\Users\{username}\ )
    • When installed in portable form, the .atom folder is stored in the parent folder of where Atom is stored. (So something like F:\editors\Atom and F:\editors\.atom)
  • RenPy then creates a .atom configuration files folder and then copies it's defaults from a folder called "default-dot-atom"
  • Effectively you end up with a {renpyinstalldir}\atom\.atom\ folder with the language-renpy package pre-installed and configs that say to ignore files called .rpyc, etc.
  • None of those default values control whether the Tree View (what I previously called the project folder) is shown or not.
So if you installed RenPy in C:\Program Files (x86)\LemmaSoft\renpy-7.3.5-sdk\ ... Atom Portable 1.34.0 would be installed to C:\Program Files (x86)\LemmaSoft\renpy-7.3.5-sdk\atom\.

So now I know that, I downloaded Atom Portable version 1.34.0_x64 and used it to replace the 32bit version in .\atom\atom-windows\ -- Everything was fine.

Next I tried the current latest version 1.41.0 -- The Tree View wasn't shown by default and wasn't populated when activated manually.

Next I tried 1.41.0 32bit version (maybe it's a 32bit/64bit problem?) -- Nope, Tree View still missing.

Next I tried 1.38.2 (Nope), 1.36.1 (Nope), 1.35.1 (WORKING!!!) and finally 1.36.0 (not working).

So it's an Atom thing, not a RenPy thing.
First thing in the Atom 1.36.0 patch notes is When only a file is specified, don't open and index the parent directory.

There are some notes about why it was done and some other bugfixes that may or may not also be solved. But the end result is that when opening a single file (like script.rpy)... the treeview/project window is not shown and not populated. /sigh.

On the upside. If you let RenPy install it's version of the Atom editor... you can either update it manually to 1.35.1 portable or you can install the installer version of 1.35.1 and copy the contents of the .atom folder from the RenPy folder to the .atom stored in the Windows users folder (C:Users\{username}\"). What you can't do is use any version from 1.36.0 forwards if you want the projects window to list the other files in the same folder.

It could be that some stuff was introduced in 1.35.0 that I haven't noticed... and that is the reason why 1.34.0 is currently shipped with RenPy.

I have in the past had multiple versions of RenPy installed. So using Atom as the default editor makes sense for me. That way, I only have 1 copy of Atom installed rather than half a dozen.

I guess my next step is to try to reach out to Atom people.

Posts: 18
Joined: Sat Feb 09, 2019 9:48 am

Re: RenPy Launcher and it's use of Atom (integrated and as default system editor)

#3 Post by Woetoo » Thu Nov 07, 2019 12:41 pm

Another minor update.

It seems it's working as intended.
Apparently there were people who reported performance issues on Atom startup. The workaround was to disable the treeview when Atom loads a single file by name.

It is possible to invoke Atom in a specific way that will load the selected file and the populate the treeview.

Code: Select all

atom {folder} {folder}\{filename}
So if your windows project was stored in "D:\dev\renpy\the question\", you could get things working with:

Code: Select all

atom "D:\dev\renpy\the question\" "D:\dev\renpy\the question\script.rpy"
where the quotation marks are needed because the folder name contains a space character.

However, that would only work for perhaps the launcher and still ends up not quite working how you might expect.
It is however completely useless if you double-click on a source renpy file using Windows Explorer.

I've raised the issue on their ticketing system. ... -551146877

Though it looks like it would be an uphill battle considering they deliberately changed it to work this way back with version 1.36.0.

Right now, I think I'd rather live with 1.34.0 and forget that I ever wanted to use the latest version of Atom.

Posts: 156
Joined: Sun May 29, 2016 4:38 pm

Re: RenPy Launcher and it's use of Atom (integrated and as default system editor)

#4 Post by rames44 » Thu Nov 07, 2019 1:07 pm

Thank you for taking the tome and effort to sleuth all this out. You might want to PM PyTom and point him at this thread, just in case he isn’t aware of the changes. Might save him some pain if/when he decides to update the bundled version of Atom.

Posts: 18
Joined: Sat Feb 09, 2019 9:48 am

Re: RenPy Launcher and it's use of Atom (integrated and as default system editor)

#5 Post by Woetoo » Sat Nov 09, 2019 6:55 am

Final update for a while...

For now, I figure I've just got accept this is working as intended. I've posted notes to the TreeView issues section of GitHub. Either they will listen to my request... or they won't.

In the meanwhile... Someone much much more competent than I figured out a workaround for releases 1.36.0 of Atom and later.

From the main Atom screen... Use "File" --> "Init script...". This will edit Atom's "" file.

Then add the following code:

Code: Select all

atom.packages.onDidActivateInitialPackages ->
  return unless (atom.project.getPaths().length < 1)
  return unless path = atom.workspace.getActiveTextEditor().getPath()

Credit goes to user Snoop, who provided this answer here: ... e/69757/15

The TreeView now is populated and displayed when either double-clicking on a file within Windows Explorer or using the RenPy launcher to edit specific files.

All I can say is that this initialization script change seems to work for me using Windows 7 64bit. Other operating systems... other versions of Windows... other combinations of Atom preferences/packages... Your mileage may vary.

Post Reply

Who is online

Users browsing this forum: deltadidirac, Google [Bot]