Building Linux packages on Windows

Ok, so now that I have Windows and OS X covered with my app, it is time to tackle Linux.

After some reading I plan to distribute my application on Linux using three formats (to cover as many distros as possible), nl. tar.gz, RPM and DEB.

Creating the tar.gz is pretty straight forward, and I’ve already tested that it works.

Now to my question, has any person perhaps got some experience or suggestions on how to build the RPM and DEB packages, but here is the catch, on Windows? Are there any tools available (on Windows) to automate the packaging of RPM and DEB?

How do you set the appropriate file permisions when building the .tgz on Windows?
When I tried some time ago I always needed to chmod the executable file manually on Linux, which is obviously not what one wants/expects.

Unfortunately, I don’t know of any tools creating .deb or .rpm on Windows.
Our build process is also mainly running on Windows, but there are tasks that require the appropriate OS. For example: code-signing macOS app and .dmg. I doubt there’s a way to do that on Windows.

We do this like that:

  • the build process (running on Windows) places the “files-to-be-signed” in a shared folder (and waits until… see below)
  • macOS: a (virtual) machine is running a script every (couple of) minute (s) to check if there are any “files-to-be-signed”
  • if yes: process them, and place them in a “files-signed” shared folder
  • the build process (running on Windows) also checks the “files-signed” folder (and continues… see above)

Of course the same procedure would work similarily with a (virtual) Linux machine, which would create the .deb’s and .rpm’s.

[quote=335247:@Jürg Otter]How do you set the appropriate file permisions when building the .tgz on Windows?
When I tried some time ago I always needed to chmod the executable file manually on Linux, which is obviously not what one wants/expects.[/quote]

I don’t set the file permissions in the .tgz, and that is why I want to build RPM and DEB “installers”.

Neither could I find any useful information on the Internet on how to build .deb or .rpm on Windows. I was hoping to avoid using virtual machines, but I guess I’ll have to go the VM route.

Thanks for sharing your process Jürg.

Hi Alwyn:

just a stupid question: how do you test your application on Linux ?
(yes, this is not a naive question, but a vicious one: read below)

So, after the Linux testings 'debuging), you build your install stuff.

Install Linux using a VM… I installed Mint using VirtualBox on macOS

It’s just a possible example (it grew on what existed long before). If I had to do it again from scratch, I’d probably use “curl” to execute scripts on the remote machine right then when it’s needed (compared to the “cronjobs” which are looking for work-to-be-done).
But the basics remain the same - some things just work easier (or can only be done) on the “right” OS, so it needs some kind of “delegate / offload” during the process.

I’m using the same setup as Dave, Linux Mint in VirtualBox, but just using Windows as the host.

Currently I compile my app on Windows using Xojo, then compress it to myapp.tar.gz and then copy it manually onto the VM. On Linux I then need to MANUALLY extract and run the files.

PS. Just installed Google Chrome on Linux Mint using their .DEB file and that is what I’d like to achieve with my apps. An automated install that installs the files, creates shortcut links etc.

But it seems I’ll have to do this kind of packaging on Linux itself. I couldn’t find any tools to do this on Windows.

Or you can use the “run remote” to link to the VM…
I have one remote link setup for MINT on the same box as my macOS developement
and another link to an old MacPro running Windows 10 under Bootcamp

Alwyn,

I found this article for building .deb packages on Linux mint Build .deb package

Might be worth reading or seeing if it helps you find other sources

[quote=335348:@Dave S]Or you can use the “run remote” to link to the VM…
I have one remote link setup for MINT on the same box as my macOS developement
and another link to an old MacPro running Windows 10 under Bootcamp[/quote]

Thanks Dave. I’ll give this a try.

Currently I connect to my MacMini from my PC using VNC. This works quite well for testing.

Thank you Brian. I’ll read through this to set up a DEB packager on my Mint VM.