Quickest and easiest way to build the applications?

I might just be either missing the obvious from the documentation or simply lacking knowledge of npm or electron (which is true either way) but what is the easiest/quickest way to build the applications? If I added something I want to test on Windows without having to set up an entire dev environment I just want to build the joplinportable.exe or likewise the .dmg for macOS.

I had a poke through the deployment.md file but that seems more for the actual official release, not just a quick build I want to test with? What am I missing here?

You would first need to build the app as per BUILD.md, then it's npm run dist from packages/app-desktop and it should create the executable in the "dist" directory.

1 Like

Thank you... I can't believe I forgot about run dist seeing as I've been using it to play with plugins, the thought never crossed my mind...

No problem, we don't document this part because normally it's not needed for development, although it's indeed required to create custom builds.

So after fiddling around with node version I managed to get it to run but it only produced a linux appimage. How can I get it to spit out a portable.exe and a .dmg?

I don't think it possible to build for a system different from what you're running, e.g. you can only build the windows version on windows, and so on.

Indeed you can only build for your current system. If you need the other versions, one way would be to use GitHub Action and run the build on different operating systems, but that's no longer easy.

Aah I see. I have access to all three supported OSs but I don't think I have the mental fortitude to set up an environment on Windows and I'm not sure my mac is up to the task so I was hoping to be able to build all three application packages together so I could just run it on those other devices to test things.

Is this some kind of limitation on the framework? I thought things like electron-build/forge etc. had options to be able to build for multiple platforms built in? Or is this some kind of dependency based issue?

If I'm not mistaken, Joplin uses electron-builder. The very first line on Multi Platform Build - electron-builder says:

Don’t expect that you can build app for all platforms on one platform.

¯\_ (ツ)_/¯

I think it Joplin didn't rebuilt sqlite every time, it could be possible to build for multiple platforms.

Fair enough!
I assume then that the GitHub action stuff is therefore running the build process on GitHub hosted instances of those OSs and giving the results back... still taking baby steps here :smile: this is all brand new to me (never had to worry about problems like this when writing horribly inefficient excel VBA code that somehow my entire company now relies on to work out when people have their annual leave and I now no longer have any clue how it works).

Looks like I might have to just bite the bullet at some point and subject myself to the pain of trying to set up on Windows and waiting 20 mins for the mac to warm up before it starts allowing keyboard inputs.

Just as an aside to this whole discussion, I would like to put forth my opinion that more focus on the developer experience could be positively impactful to the future of Joplin. I've been writing software for 23 years and maintain my skills in modern technology. But, after a week of trial and error, I am still just trying to get past the initial build process (a barrier to entry). I'm honestly just trying to put in my humble vote for where to put some focus; I'm not trying to be a complaining troll.

1 Like

Out of interest where do you find it lacking?
I'm still very much new to this world - my history of programming certainly isn't 23 years of experience and quite literally consists of a few VBA scripts, 1 VB6 project and some SQL wrangling (and all of those were in-house things at work) so Joplin is quite literally my only point of reference.

There was a change merged just today to switch from npm to yarn. In theory it should make it easier to build the project.

There's a lot of focus on improving the developer experience, but getting things to work on multiple applications, on multiple operating systems is not trivial. Any suggestion to improve things would be welcome though.

1 Like

Good question. Please give me a little time to answer because you just gave me an idea. I should write up a little summary of my developer experience for the benefit of the team that might be able to improve it. In short, I've gone around in circles trying to build on both Windows (CMD) and in Windows Subsystem for Linux (WSL). I didn't write down specific issues because I was just in personal-get-it-done mode, but now, I will start recording the actual issues.

1 Like