(WIP) Cross-Platform Compiler using Windows Linux Subsystem

Developed or developing a new product in PureBasic? Tell the world about it.
IndigoFuzz

(WIP) Cross-Platform Compiler using Windows Linux Subsystem

Post by IndigoFuzz »

Very much a work in progress, but I'm quite excited with progress so far so I thought I'd blog a little about what I'm up to.

PBCC - PureBasic Cross-Compiler Tool
Utilising Windows 10's Windows Linux Subsystem architecture, I wanted to create a tool that would make compiling for different target platforms as easy as using one command-line tool, and as such started developing this application.

A console application (based off my General Purpose Console Interface) where you can specify Windows 32/64bit and Linux 64bit compiler paths, and then compile your projects by simply calling either win32, win64, linux64 followed by the standard command line switches.

Under the hood is also logic and gubbins to handle such things like Windows directory paths within the Linux subsystem, as well as the little nuances between the different platform compilers.

Screenshot
Image

Here's a screenshot of the tool in it's infantile stages in action. For this example I've already configured the paths of 3 different compilers.
When a compiler is added to the tool's config, it exposes a relevant quick-command to the commands available (win32, win64, linux64) which you can then use instead of pbcompiler ....

Release?
It's not quite ready yet - I still have a lot more testing and optimisation, and a few bugs to sort out (namely FASM not running correctly in WSL) to do before I'm happy for it to be released to the public, but once it's ready it will be released for free.
infratec
Always Here
Always Here
Posts: 6866
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: (WIP) Cross-Platform Compiler using Windows Linux Subsys

Post by infratec »

!ThumpUp!

But you can install different version and flavours of Linux in WSL.
Aren't there any differences?
SuSE is (very) different to Debian/Ubuntu

Have you tested already WSL 2 ?
IndigoFuzz

Re: (WIP) Cross-Platform Compiler using Windows Linux Subsys

Post by IndigoFuzz »

infratec wrote:!ThumpUp!

But you can install different version and flavours of Linux in WSL.
Aren't there any differences?
SuSE is (very) different to Debian/Ubuntu

Have you tested already WSL 2 ?

So far my workflow is to get Ubuntu working well as a distro and then work with the other available distros to make any adjustments needed. As it stands I'm at the position where I'm considering just how much I want it to do - from just handling the file system gracefully and guiding a user to apply a fix to FASM by installing it into the distro and have the tool find it and create a symlink in place of the one within the compiler's directory (as the one packaged with Purebasic is throwing a 'Exec format error'), to handling the check install, install shell scripts, and onboarding compilers into a local directory to the cross-compiler tool... And whatever else comes to mind haha

Initial testing release will probably just include the former, and a more full release the latter :) As for WSL 2, as soon as WSL is fully working within the tool I'll begin to explore it to see what adjustments need to be considered to support both
IndigoFuzz

Re: (WIP) Cross-Platform Compiler using Windows Linux Subsys

Post by IndigoFuzz »

Minor update to report:

FASM issue resolved. The one bundled with PureBasic appears to be the x86_64 version of FASM which doesn't place nice with WSL, so adding the feature to onboard (copy just the essential files from a PureBasic installation directory into a local directory) and replace the existing FASM binary with a x64 version.

Tested and working with a simple console Hello World application, more testing will be done to determine what can and cannot be produced.

Plans to create an accompanying GUI tool to manage compilers, build project files, as well as allow it to be integrated into PureBasic IDE as a tool so you can either call the tool from the menu, or a short cut and compile to multiple compilers and platforms at a few clicks of a button...

More to follow
Fred
Administrator
Administrator
Posts: 16664
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: (WIP) Cross-Platform Compiler using Windows Linux Subsys

Post by Fred »

Interesting project !
lolvince
New User
New User
Posts: 4
Joined: Fri May 31, 2013 7:58 am

Re: (WIP) Cross-Platform Compiler using Windows Linux Subsys

Post by lolvince »

Very good project ;)
zikitrake
Addict
Addict
Posts: 834
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: (WIP) Cross-Platform Compiler using Windows Linux Subsys

Post by zikitrake »

:shock: Wow! I was missing this interesting project!
Post Reply