Embarcadero / Dev-Cpp

A fast, portable, simple, and free C/C++ IDE
https://www.embarcadero.com/free-tools/dev-cpp
GNU General Public License v2.0
2.51k stars 275 forks source link

[feature request] Compatibility with systems other than Windows #195

Open mdziczkowski opened 2 years ago

mdziczkowski commented 2 years ago

I would like to request that the sources, libraries and programs (including tools) become made in a format that would allow to become used (and sources to become compiled) on the operating systems other then just Windows, like for example Linux.

Explanation

In the current version:

Many projects require the libraries and headers from Embarcadero (for example VCL) to become compiled. Without them, the software development is becomming very limited and made dificult.

Many developers can't work at the project because Embarcadero is limited to Windows operating systems only

checkdigits commented 2 years ago

My first instinct was to respond to this and say "no, this can't be done".

But, you know what, it could be done - just not easily.

Ignoring other likely hiccups in the process such as making sure the CLANG pre-requisites were present on the target Linux machine (they probably would be, but we'd need to look into that) the biggest hurdle is the framework used for the user interface. There are other considerations in connection with the actual controls that are used which might not work in the same way - or at all - on Linux and other non-Windows targets,

The project uses VCL throughout, heavily. VCL is very tightly bound to the Windows API and, as such, is officially a WIndows-only framework.

There could be two ways to resolve the user interface issue:

  1. Change the UI to use Firemonkey FMX. Or at least produce an alternate user interface and abstract out any UI=bound code so it can work with both the VCL and FMX forms.
  2. Use an alternative cross-platform framework such as Cross VCL to enable Linux UI support.

Option 1 would give the best overall long-term solution since it would mean it uses a platform technology included with RAD Studio and provided by Embarcadero. It would also mean it might be possible to create a macOS version too.

Option 2 might be a quicker short-term solution since it would effectively require little or no changes to the existing project. The downside is Cross VCL is a commercial third-party product which doesn't have a free option. People might need to pay to have a version which compiled and ran under Linux. It also has the disadvantage that being an independent third-party there would be no official backing from Embarcadero for the solution or incentive from them to make changes to fix anything which didn't work.

I do know KS Dev who produce Cross VCL and I would be prepared to work with them to make a version of Dev-Cpp which would compile using Cross VCL if they were willing to work with me. I could compile the binaries for Linux and make those available as part of this project - but any user wishing to replicate that would probably need to purchase their own copy of Cross VCL in order to compile their own copy from source.

The best option, long term, would be to examine the viability of producing an FMX UI which would then allow the project to be wholly open source for all platforms and buildable with readily-available RAD Studio tools.

I'm willing to look into it - but no matter how urgent you think it is this is likely to take a while, if indeed it is possible at all.

checkdigits commented 2 years ago

In fact when I re-read what you're trying to say is that you want the entire project to be compilable under Linux - not just run on Linux.

Sorry, I misunderstood.

That's not something which is going to be possible without a considerable amount of work. It could be possible to convert things to Free Pascal and their LCL (VCL version) but, really, the project is and always has been an IDE created in Delphi and leveraging the strengths of RAD Studio and the VCL component ecosystem.

As far as producing a version which runs on Linux and macOS that's easily possible without major changes and I'm looking to pursue that.

mdziczkowski commented 2 years ago

Let me try to put the explanation more understandable:

I use only a Linux operatin system and I partipicate in some software development with (I don't know why) was wroten under Windows in Embarcadero C++.

The problem is that this editor uses and includes into any project made with it the VCL. For now I'm grounded in the works by the project because:

I hoped that someone here could publish the VCL sources as separate repo

pmcgee69 commented 2 years ago

Running under Wine might work - the Emb command line binaries at least run under Wine.

pmcgee69 commented 2 years ago

A bit of experimenting. Devcpp 5.5 which doesn't use SVGIconList works pretty great with Wine. Compiles and Debugs. (and the compiled .exe files execute under Wine in Linux, and normally back in Windows)

Devcpp 6.3 has several issues. ( The very first one is about using xmllite.dll )

Videos: https://drive.google.com/file/d/1ZRgSp9T2i53ZjVURlxCU2oW42HVsrPBB/view?usp=sharing

https://drive.google.com/file/d/12NCZ8KaSqtjdVtCa89ZTW0drZoVwB11s/view?usp=sharing

[Edits ... ] Adding the 32-bit xmllite.dll to the .exe file directory seems to go a long way with Devcpp 6.3 TDM gcc 9.2 compiles, but there is an issue with gdb.

https://drive.google.com/file/d/1L_HzMvcd1uwWLItAIO0alXSnqmIK0PdW/view?usp=sharing

Downgrading to / Using TDM gcc 4.9 (from Devcpp 5.5), most things seem to be working.

https://drive.google.com/file/d/1LHlOC6Oe1c4CPHLuVQTxqBxodhzLed75/view?usp=sharing

pmcgee69 commented 2 years ago

Hmmm. 😕 Above results were under Wine 3.0 Upgrading to Wine 6.0 ... all broken :) :( Maybe new Wine works in a different way / organised differently?

mdziczkowski commented 2 years ago

The problem is (telling it from user experience) that Wine is one of the worst made (because of too many not fixed bugs) software to emulate Windows...

I tryed to run some simple programs, among the one from the project I help with, with works normally on Windows (tested guest wise on some one's computer), but on Wine it doesn't work as it should.

mdziczkowski commented 2 years ago

@checkdigits I had found something more promissing then LCL. I't called "CrossVCL". Maybe this could become checked and help to cross-compile the software from all projects to create Linux versions ?

checkdigits commented 2 years ago

CrossVCL is great but it's neither free nor Open Source.

mdziczkowski commented 2 years ago

hmm.. there should be a good way to solve it, but I'm not sure anymore where to search for it...

Possibly it would be best to convert it into Pascal as an intermediate step to make it become compiled under Linux...

Other way would be to copy from Embarcadero the sources of VCL and made them avaliable for compilation, but that would require the agreement from the license holder to prevent licensing issues