# How can make Processing run as a stand-alone, portable S/W?

**URL:** <https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657>\
**Category:** Processing\
**Created:** [January 20, 2023, 10:33am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657 "2023-01-20T10:33:11Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alkis](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Alkis](https://discourse.processing.org/u/Alkis)\
**Post date:** [January 20, 2023, 10:33am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/1 "2023-01-20T10:33:11Z")

</div>

I have installed Processing 3.5.4 on an external (portable) hard disk and I have changed the default Sketchbook folder (C:\Users{username}\AppData\Roaming\Processing) to one on that external hard disk, for the purpose ro run Precessing as a stand-alone app. Yet, this folder is re-created (after I delete it) and ‘preferences.txt’, etc. are stored there.

So my question and problem is “How can make Processing run as a stand-alone, portable S/W?”, i.e. w/o the need of using the default Windows disc C:?  
Because, if I bring my portable disk to run Processing on another system, I don’t want to use disc C: which is not mine. Locical, right? Besides, this is the meaning of a portable version of any S/W, isn’t it?

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 20, 2023, 12:41pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/2 "2023-01-20T12:41:59Z")

</div>

> <https://github.com/processing/processing4/issues/362#issuecomment-877689895>
>
> Hi, I'm working in schools and I would to use a portable version, usable on USB …stick. Also because there are securities, and as I work in different school there are different securities. On Processing3 I didn't find all the option I could find in Processing2 preferences to make quite portable (because it still write in c:\\Users\\AppDatat\\etc
> 
> Thanks a lot for helping me.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 24, 2023, 11:46am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/3 "2023-01-24T11:46:27Z")

</div>

Hello,

Related topic:

> [@Folders created during installation](https://discourse.processing.org/t/folders-created-during-installation/12360/5):
>
> For complete portability I started here: The Processing 3.3.7 that I compiled worked! This is not for the faint of heart! This is for the adventurous! I have not done this in years so you are on your own if you chose to take this path. slight_smile

I did manage to build a portable version years ago from the source code.

@sableraph It would be nice to see a _portable_ build available for download from the Processing Foundation.

References:  
[https://en.wikipedia.org/wiki/Portable\_application](https://en.wikipedia.org/wiki/Portable_application)

`:)`

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 24, 2023, 11:53pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/4 "2023-01-24T23:53:03Z")

</div>

Update here:

> [@Folders created during installation](https://discourse.processing.org/t/folders-created-during-installation/12360/8):
>
> Update to my last adventure… I made a portable Processing 3.3.7 as referenced here: [https://discourse.processing.org/t/folders-created-during-installation/12360/5](https://discourse.processing.org/t/folders-created-during-installation/12360/5) This evening I made a portable version with Processing 4.1.2 as follows: See the PuddingHill post here: [https://forum.processing.org/two/discussion/12177/make-processing-really-portable/](https://forum.processing.org/two/discussion/12177/make-processing-really-portable/) Source code available here with instructions for Building the Code: [https://github.com/processing/processing4](https://github.com/processing/processing4) I put this on a portable d…

`:)`

---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [January 25, 2023, 9:56am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/5 "2023-01-25T09:56:19Z")

</div>

Hi glv, thanks for suggesting the idea of a portable build for Processing. To make sure we have all the information we need and can keep track of progress, could you please [create a feature request](https://github.com/processing/processing4/issues/new) on the Processing4 repository? This will make it easier for me to discuss this idea with our lead developer, Ben Fry, and figure out what’s needed to make it happen.

I also wanted to remind everyone that Processing is created by a [small group of volunteers](https://github.com/processing/processing4/graphs/contributors?from=2019-10-01&to=2023-01-25&type=c) who work hard to keep it running and make it better. If you have knowledge in Java and want to contribute, we would be thrilled! We have a lot of [open issues](https://github.com/processing/processing4/issues?q=is%3Aissue+is%3Aopen+label%3A%22Help+Wanted%22) that you can help us fix or new features to implement. Every code contribution is highly appreciated and it makes a huge difference in the development of Processing. Thanks for considering it!

---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [January 25, 2023, 11:04am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/7 "2023-01-25T11:04:45Z")

</div>

Hello @alkis, I’m sorry that Processing is not currently meeting your needs. As I mentioned above, code contributions are very much appreciated. Even though the previous issue has been closed, you are welcome to open a new issue and/or make a pull request that addresses the limitations you mention. Let me know if there is anything I can do to facilitate this.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 25, 2023, 12:15pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/8 "2023-01-25T12:15:12Z")

</div>

> [@sableraph](#):
>
> Hi glv, thanks for suggesting the idea of a portable build for Processing. To make sure we have all the information we need and can keep track of progress, could you please [create a feature request](https://github.com/processing/processing4/issues/new) on the Processing4 repository?

Hello @sableraph,

Will do when time permits… busy days for me!

A plug and play portable version may be of benefit to some.

I was able to create a portable version and already shared this information:

- Creating a new build from the source code.  
That is the beautify of open source!

- From the GitHub issue that @GoToLoop shared. Thanks!  
There is a link at the end to documentation about these features.

Either of the above can be simple or a challenge depending on experience level.

I was able to do the above by gleaning insight from the wealth of knowledge provided by the Processing community and applying it.

It was a challenge the first time years ago to build from the source code but was simple enough this time around for me… experience was gained from that first effort.

Adding a _settings.txt_ was much simpler!

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 28, 2023, 4:43pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/9 "2023-01-28T16:43:10Z")

</div>

I don’t understand this thread. I just copy/pasted my Processing app (version 4.1.2) to a USB thumb drive on my Mac. The app runs just fine from this thumb drive. I created a USBDocuments folder on the thumb drive also and copy/pasted an old demo sketch into it. I was able to run the sketch in its new location without problems. Below is a screen shot of the new location for Processing.app. Having it on a thumb drive is about as portable as it gets. Next I’m going to pull the thumb drive out and plug it into another mac and see if it runs there.

 ![thumb](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/2/c27d75c7e25698ad2f25398534fb6137312cb825.png)

**Addendum:**  
Just tried the demo file on another mac and it runs ok there too. It’s portable as far I’m concerned. Maybe someone else with a mac can double check my findings.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 28, 2023, 8:35pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/10 "2023-01-28T20:35:22Z")

</div>

> [@svan](#):
>
> I don’t understand this thread. I just copy/pasted my Processing app (version 4.1.2) to a USB thumb drive on my Mac. The app runs just fine from this thumb drive.

The definition of a portable application is here:

> **[Portable application](https://en.wikipedia.org/wiki/Portable_application)**
>
> A portable application (portable app), sometimes also called standalone, is a program designed to operate without changing other files or requiring other software to be installed. In this way, it can be easily added to, run, and removed from any compatible computer without setup or side-effects.
> In practical terms, a portable application often stores user-created data and configuration settings in the same directory it resides in. This makes it easier to transfer the program with the user's pref...

Instructions for moving the _Sketchbook and Settings Location_ are here:

> **[Preferences](https://github.com/benfry/processing4/wiki/Preferences#sketchbook-and-settings-location)**
>
> Processing 4.x releases for Java 17. Contribute to benfry/processing4 development by creating an account on GitHub.

In the portable Processing 4.1.2 version for W10 that I made all of Processing including the _Sketchbook and Settings Location_ are on my flash drive.

Preferences on one of my W10 PCs reside on flash drive (K: drive) :

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/c/e/cecb9583b3628b908ee22871322018749108c89b.png)

Preferences on another W10 PC reside on the same flash drive (J: drive) :

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/0/d/0d26fd6e526176cc054ea420ef3267cf622616ed.png)

`:)`

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 28, 2023, 9:24pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/11 "2023-01-28T21:24:13Z")

</div>

I’m not sure what you are trying to say. Is Processing already portable in your opinion?

---

<div class="post-metadata">

**Author:** ![Alkis](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@Alkis](https://discourse.processing.org/u/Alkis)\
**Post date:** [January 29, 2023, 7:01pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/12 "2023-01-29T19:01:25Z")

</div>

OK, because I see some confusion around, I wish to clear the actual meaning of “portability” and “standalone”, which is usually not evident from what one can read in the Web or the books.

For a S/W to be fully portable and standalone, it is not enough only to install it to and run it from a USB drive but also that it should need and can use **only that USB drive** to operate. So, if it nees to use the %USERPROFILE% of the system (which normally is on the main disk of the computer) in order to store and retrieve user preferences, etc. does not make it standalone, independent. I believe this is well undestood.

And modifying the %USERPROFILE% --as it is suggested earlier here by a member-- messes up the system, because it is vital for the opertaion of a lot of apps. But even if you do that, Processing also uses %TEMP% (%TMP%), i.e. the system’s Temporary directory, which normally is also on the main disk of the computer. In short, Processing needs and uses other disks besides the one it is installed in.  
Just ask yourself a question: Why does Processing **need** to use another disk to operate instead of just the installation disk? Right. There’s no logical explanation.

Here’s an example of a really portable and standalone S/W:  
The Python compiler and all the libraries it uses, from my installation on a USB disk, which is 3 times larger than Processing installation, **never uses any other disk to store or retrieve a single bit**. (Except of course if it is instructed to by a script.)  
I have dozens of installated S/W --and most probably you too-- that behave in the same way.

I hope that all thus makes it clear what a **really** portable, standalone S/W means.  
I also hope that I have contributed to this forum with something useful. 🙂

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 29, 2023, 8:21pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/13 "2023-01-29T20:21:55Z")

</div>

> [@Alkis](#):
>
> **never uses any other disk to store or retrieve a single bit**.

I am reasonably confident that I can do that with a Mac, but will have to do the experiment to be certain. I plan to remove all Processing apps from the main computer and use Processing solely from the USB drive. I’ll probably also pre-load a bunch of sketches from another system just to see how portable the sketches are.

**Addendum:**  
Just tried the experiment described above. I took an old Mac running MacOS 10.14.6 with Processing 3.5.4. I drug the 3.5.4 app icon from my Applications folder to the trash and emptied it. There were no other Processing apps installed on this system. It has been a few years since I used the computer. I took my USB drive and copy/pasted a current sketch file onto it. Then I took the USB drive and plugged it into the old computer with no Processing app. I was able to launch Processing 4.1.2 and run the sketch that I copied from my newer system. As far as I’m concerned Processing is a portable stand-alone app and the sketch files are also portable. When I download the Processing.app from the website [Processing.org](http://Processing.org) I get a clean install of just the app. All that I do is drag the app icon to my Applications folder and it’s ready to use. There are no dependencies that I am aware of, ie it doesn’t copy a bunch of files that it needs to run onto my operating system. It is a single executable piece of code that runs all by itself as far as I can see. Would love to see someone prove me wrong on a mac. With Windows operating system I am less familiar and there could be a problem with it.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 29, 2023, 11:44pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/14 "2023-01-29T23:44:07Z")

</div>

> [@Alkis](#):
>
> And modifying the `%USERPROFILE%` - as it is suggested earlier here by a member - messes up the system,

If you’re referring to the P4 repo link example I’ve posted, take notice it’s using terminal command SETLOCAL:

```auto
SETLOCAL
SET USERPROFILE=%~dp0\settings
processing.exe

```

So any changes after SETLOCAL should affect that particular session only, leaving the actual OS global settings alone.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 30, 2023, 2:09am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/15 "2023-01-30T02:09:51Z")

</div>

Just so happens that I have a brand new Windows 11 box that I just bought less than a month ago. I did have Processing 4.1.1 and 4.1.2 both installed. I removed both of these folders to the recycle bin and emptied it. I had only made a few sketches on this system; when clicking on them after the de-installation none of them would open. I then took a brand new USB drive and inserted into one of the Windows system’s USB ports. In my Downloads folder was a copy of Processing 4.1.2 which I just downloaded from [Processing.org](http://Processing.org) a few days ago. I extracted all files into a newly created folder that I named Processing\_4\_1\_2 on my USB drive which Windows labelled as the D: drive. After the installation double clicking on the app icon launched Processing 4.1.2 as expected. I then created a simple test file with console output and saved it to a new folder (USBDocuments) that I created on the USB drive for my sketches. It did not initially run the sketch from this new location. I had to ‘open’ the file from the new folder and then run it, but it did work as expected. A screenshot is below. I did notice that by default Processing will look in the Documents folder on my system, but you can tell it to ‘file/open’ a file in the new folder USBDocuments and it will run as expected. The only glitch was that I had to save it and come back to it to get it to run following its creation. It would not run it right when I created it; usually the user will see the file name change in the editor window right after it has been saved, but that didn’t happen. This was my first and only try, so this will need further testing.

 ![usb_win](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/e/0/e0ed1808046670cb8c30310e3c92c4be210648a6.png)

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 30, 2023, 4:20am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/16 "2023-01-30T04:20:05Z")

</div>

What’s the definition of ‘S/W’; never heard that term before. Technically speaking you are correct that the Preferences are stored on the host operating system, but wouldn’t necessarily have to be. In the case of mac the only other alternative that I can think of is to store preferences.txt in the app’s bundle. I’m not 100% certain, but I doubt that the mac gatekeeper system would allow writing to a file in the app.bundle; my opinion is that it would break the code signing and the app would no longer run. I tried removing the Go/Library/Processing folder which contains preferences.txt on my old mac computer and then inserted the USB drive containing Processing 4.1.2. Everything worked as expected, but at the end of the session I went back and looked and the Processing folder containing preferences.txt had been replaced. Apparently it checks to see if there is a Processing folder containing the preferences.txt file and if it’s not there, it creates a new folder. Personally I don’t see any harm in this. Anything that is portable is going to have to be run on a host computer of some sort. It would be interesting to see how Python does their preferences if they use them (maybe you know). In the case of Windows the app .exe file is inside of a folder and is run from there. I don’t why see the preferences.txt file couldn’t be placed in that folder also.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 30, 2023, 5:17am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/17 "2023-01-30T05:17:40Z")

</div>

Did you try this:  
`To change the *default* location of the `preferences.txt`file (as well as the rest of that`Processing`folder that contains other required settings and information), create a file inside the`lib`folder of the Processing download called`settings.txt`. In that file, add a line that reads `settings.path=/your/settings/location`(replacing`/your/settings/location` with the place you'd like the settings folder to live).`

I just tried it on my Windows 11 box and it worked. There is now a preferences.txt file in the Processing app folder. See below:

 ![Preferences](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/2/f228928f3a28614f33229bfce84ea2ac3fe172eb.png)

That should make the Windows version of Processing a complete stand-alone app.

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [January 30, 2023, 10:11am UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/19 "2023-01-30T10:11:47Z")

</div>

Thanks for the clarification. Did you also delete the default preferences.txt to see if it would replace it?  
`Users → [username] → AppData → Roaming → Processing → preferences.txt (on Windows)`

Probably the same thing will happen on my Windows box, but will continue testing. I know preferences files normally get replaced on a mac, but I didn’t know that it continues this behavior after being programmed to do something else.

---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [January 30, 2023, 2:43pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/21 "2023-01-30T14:43:32Z")

</div>



---

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [January 30, 2023, 2:51pm UTC](https://discourse.processing.org/t/how-can-make-processing-run-as-a-stand-alone-portable-s-w/40657/22 "2023-01-30T14:51:51Z")

</div>

Hey everyone, I wanted to take a moment to address the tone of this conversation. While we all have different perspectives, it’s important that we treat each other with kindness and respect. That’s what makes this community special. I have hidden the offending messages and will restore them if they are edited to follow our [community guidelines](https://discourse.processing.org/faq). So, with that in mind, I’m going to close this topic. Let’s aim to keep our discussions positive and caring going forward. Thanks for being a part of this community!
