Our main language (Delphi) will be, most probably, cross-platform in its next version.<p>While writing a cross-compiler isn't a thing which interests us very much now, porting a library which was/is Windows-tied to multiple platforms, /certainly/ does.<p>You can think, for example at VCL (Delphi's standard library). While it was designed for Windows only, it has value in it, and, of course, there are huge codebases which depend on it.<p>The question is: Which would be the best approach to made an application / library cross-platform aware ensuring a smooth conversion / upgrade path (as much as possible of course)?<p>I stress it again, we are not interested which is the best way to do cross-platform development <i></i>only<i></i> (there were questions on this theme). We are interested <i>also</i> in yet another requirement: The old code base / installations management.<p>PS: Experiences and/or methodologies from similar situations with other languages (eg. C/C++) which are regarded as standard practices are welcomed.<p>Thanks in advance.
In the words of the great Walter Sobchak: "you're entering a world of pain".<p>The best advice I can offer you is to wrap up your application's functionality into a clean library that could be made into remote services (RPC, SOAP, CORBA, COM, etc. or preferably JSON-RPC or XML-RPC) then make a a VMWare image (or similar) virtualization tool of the app and its environment. You could still use the code that way from any platform, but it's pretty much stagnant and all new improvements and extensions will either have to be made on Win32, or as external interface wrappers to augment a limited shell.<p>Code reuse was already hard enough, but the RAD tools and IDEs made it considerably so. You can't believe how many shops keep Visual Studio 6.0 installation just to build their projects, because later version of VS frobbed the building process and screwed up old resource files.<p>I dread to think of the future that awaits stuff running on the Java stack that can't be built without tools from now defunct vendors.
Depends highly on the project type but if we're talking about a typical Delphi GUI app you don't need to be worry much if you depend on the RTL/VCL more than WINAPI itself.<p>I don't know about Emba.'s actual plans but what they refer to as cross-platform should be a proper port of runtime and VCL. They tried this before with Kylix but killed the project for reasons yet unknown to me (probably didn't raise much cash). So at least to have a taste of how things will work out in the future, I suggest you check out Kylix.