Portable Atom and portable PlatformIO install help needed


#1

Normally I hate when people preface their posts like this, but I am worried the replies will overestimate my knowledge regarding this type of stuff so keep the replies in simpleton terms please.

Anyways, I am following along in the “Installing Atom: Portable Mode” section of the flight manual. I want to have Atom on my flash drive and be able to edit my files on any computer I plug the flash drive into.

So I unzip the file:
E:\flashdrive\passives\atom\atom-1.27.2

Looking through, I can’t find the atom.exe file. Where is it located? The next step requires its location is known. Without knowing it I
a. don’t know which dir to place the .atom dir alongside
b. can’t boot up the software

Also, as a side note, the bottom of the flight manual section says, “Portable mode installations will not automatically update.” Does this mean I will have to click update to update them instead of them doing the updates on their own, or does this mean I will have to manually uninstall the old version of the install and reinstall the new one?

So I tried this post:

The first, “here” link ended up being the same as the non-beta, official one, so I ditched that. Then, I clicked the second .zip.

This is going to take a long time:
downloading 44,000 items.

Anyways, that must be wrong, it can’t be that much bigger than the other portable downloads I’ve tried

Of course, if the official one on the flight manual works I’d prefer to use that, but I may not be able to get picky.
(In other words, I care mostly about the first question regarding the location of the atom.exe file in the zip from the flight manual. I’d rather use that official one than this giant beta one I found).

Thanks for any help any of you can provide


#2

What file did you unzip? What is in that folder?

Also, as a side note, the bottom of the flight manual section says, “Portable mode installations will not automatically update.” Does this mean I will have to click update to update them instead of them doing the updates on their own, or does this mean I will have to manually uninstall the old version of the install and reinstall the new one?

There is no “manually uninstall” with portable mode. You just delete the old folder and replace it with the new folder. Yes, you will have to download each new version manually.

The first, “here” link ended up being the same as the non-beta, official one, so I ditched that.

Whenever you’re dealing with software like Atom, the official download is most likely to be the correct one.

Then, I clicked the second .zip.

This is going to take a long time:
downloading 44,000 items.

Anyways, that must be wrong, it can’t be that much bigger than the other portable downloads I’ve tried

It is much bigger than most portable-friendly programs (about 180 megabytes), but the point of a zip file is to download everything as one file. It shouldn’t be possible for your browser to tell the GitHub servers to expand the file before you download it. Is this a common experience for you?


#3

When I tried the atom beta download I uninstalled the old zip. When I click the link in the flight manual I get to this link:
https://github.com/atom/atom/releases/tag/v1.27.2

Which file(s) am I supposed to download and unzip?

Also, will the portable version of atom itself automatically update or will I need to uninstall everything but my src files and packages and reinstall atom to update it?


#4

Either atom-windows.zip or atom-x64-windows.zip, depending on your OS architecture. The contents of the file should look exactly like this:

Also, will the portable version of atom itself automatically update or will I need to uninstall everything but my src files and packages and reinstall atom to update it?

You will delete the old folder containing the Atom executable and replace it with a new one. You will not touch .atom/ unless you need to (usually because your configuration gets messed up). Your project files should be in a completely separate place, with other documents that aren’t as replaceable as software files.


#5

Thank you! The portable Atom is working great! My next problem is PlatformIO. I thought all packages would be portable as they would just stay contained in the packages dir of the atom dir. I downloaded PlatformIO through the install section of Atom (not through the PlatformIO website method). It turns out, I was wrong, PlatformIO stores some info about the boards it uses and other things in the C:\users\myname.platformio dir it creates. I tried moving this next to the .atom dir I created but no dice, upon booting up Atom and PlatformIO it reinstalled the .platformio folder to the myname dir and used that. As I said earlier I want to be able to use Atom and all of its packages on any computer without leaving a trace. Should I download PlatformIO throught the website instead of through Atom? Is there a way to simply disable PlatformIO from reinstalling its “Core” in the myuser dir and force it to use the one on my flash drive? I feel like this is kinda what I’m trying to do:
https://community.platformio.org/t/platformio-cli-and-ide-bundle-for-offline-installation/308

They say the “Core” is built in and doesn’t need to be downloaded separately. That doesn’t seem to be true though.


#6

Also, I forgot to mention something that may have to do with the problem although I don’t think it does. Maybe it will create future problems. Anyways, the atom zip file for atom portable that I unzipped has contents different to yours. There are at least 20 .dll files in the folder that are named:

api-ms–win-core-console-I1-1-0.dll
api-ms-win-core-datetime-I1-1-0.dll
etc.

and

api-ms-win-crt-conio-I1-1-0.dll
api-ms-win-crt-convert-I1-1-0.dll
etc…


#7

The first reply in that thread is a technical explanation of why PlatformIO doesn’t download everything at once and can’t be made portable as-is. It would be possible to change the PlatformIO code to save everything it downloads in the same folder you’re keeping Atom in, but you would have to set it up so that Atom doesn’t automatically update. If you want to do this, I will tell you how. If you do, how much space do you have on the flash drive and how much JavaScript experience do you have?

It seems a bunch of DLLs were added in a recent update (more current than the one I had in my Downloads folder).


#8
  1. Again, by disabling automatic updating, how would I update Atom?

  2. When you say we’d have to disable auto-updates it kind of makes it sound like we’re going offline. After doing this would the all the boards and libraries still be automatically supported? I want it to be portable, but still be able to reference all the info (boards, libraries, compilers) automatically.

  3. I don’t really know how to quantify my knowledge with JavaScript. It was the first language I learned, but I may be rusty as I haven’t used it in about 18 months. I made this website but at the time of this post it is down.

  4. As long as after all this updating Atom isn’t very hard, updating PlatformIO isn’t very hard and all the boards, libraries, compilers, etc. are still supported, I’d love if you helped me make it portable

Also, in basic terms, why does the auto-update functionality have to be removed to make PlatformIO portable?

Thank you


#9

You remove the old Atom program folder and unzip a new one in its place. But we’ve already gone over that. What you’re preventing from updating here is the package. On rereading my post, I could perhaps have added more pronouns or signposts to make that clearer.

When you say we’d have to disable auto-updates it kind of makes it sound like we’re going offline.

Not at all. You would be adding a package in a way that Atom knows to not update it. In no way would you be turning off your Internet or any package functions that rely on the Internet.

It was the first language I learned, but I may be rusty as I haven’t used it in about 18 months.

You’ll be fine. You wouldn’t have to write any code, just know how to not delete important things on accident.

Also, in basic terms, why does the auto-update functionality have to be removed to make PlatformIO portable?

Because if you don’t, your changes to the package code will get overwritten when you go to Settings -> Updates and click on Update All.


#10

Hello @Beugolt.

The portable install does work. Just as good for the stable as with the beta version. I would encourage you to have a look again at the write-up I did, which you linked to.

Or use this alternative (also note discussions that follows):

You can get the ZIP files from:


Just search for stable or beta version, as required.

Staying closer to the default names ->
sorry for using Beta version, but it is what I have right now

The unzipped folder (Atom Beta x64) is placed into another folder (myFolder). You need to create a new folder .atom - this one is tricky. Create a new folder and name it .atom. - yes front and back a dot. And magically the back dot goes away and the front dot remains: .atom

The first time you open you execute atom.exe the .atom folder is populated:

Now use Atom in a normal way and install packages and themes. All will be put into ..\myAtom\.atom\packages\ (for my example). myAtom folder can be transported to anywhere.

The main Atom core is not update automatically. BUT the packages are checked each time Atom boots up. A force update is also possible, as mentioned by @DamnedScholar.

I missed the detail of the .atom folder on my first try. It took me several re-reads of the Flight Manual section on this subject to properly understand what was said.


Failed on Installtion Windows 8.1
#11

Alright, thank you both. To reiterate, I have Atom Portable but I want PlatformIO Portable.

I assume the way to manually update this package is by uninstalling it and reinstalling the new one just like what made you repeat about Atom twice now.

May you please show me how to do this or provide a link to some instructions on it?


#12

Negative. When you set up the package to be portable, what you’re going to do is open a command line window and navigate to whatever folder on your flash drive you use for your code. You will then use git clone to clone the repo, enter it, and run npm install, apm link*, and atom .* to open the folder in Atom, make your changes to the package, and reload Atom (ctrl-shift-f5) to see the changes in the editor. It’s not that simple, in this case (see below).

* When Atom is portable, certain commands like atom and apm will be harder to access. The OS doesn’t know to look in your flash drive for executable binaries. What you can do is use Cmder, which is a whole terminal emulator package with a variety of features. Most importantly for you, it’s natively portable and out of the box it gives the user the ability to add folders to the PATH variable when the session loads. The file in the screenshot below is a batch script that Cmder runs whenever it opens a new tab, and you can set it up so that it’s always adding the flash drive’s program folders to the PATH. Once you do that, not just Atom, but everything on your flash drive can be configured for easy access via Cmder, and it seems like you are the sort of person who wants the level of personalization that Cmder provides.

May you please show me how to do this or provide a link to some instructions on it?

There are no instructions, because this is an untested modification that you would be making. The function in question is this one, in the Python package platformio-core that platformio-atom-ide installs for you. In order to accomplish this change, a few things will need to happen.

  1. You need to install Python to the flash drive, because it probably won’t be on most of the Windows computers you’re using. If you have the space to spare, it would allow you to write and run scripts in Atom and Cmder. WinPython has portability as a priority and is under 400 megabytes.

  2. You need to tell Atom how to find your customized platformio-core. One way is to clone and edit the platformio-atom-ide package as I described above, and it will need to be changed so that every reference to the platformio or pio command instead points to the folder where you’ve put the new code. The other way is to change the environment of Atom when it loads using the Node API to add your folder to the PATH (this is very similar to what Cmder does when it loads).

  3. You need to clone and edit platformio-core so that its default home dir is relative to the location of the code file instead of being based on the currently active user.