Can applications be cross-OS compatible?

walla

Senior member
Jun 2, 2001
987
0
0
This is probably a simple question.

If a program is marketed as both Linux and Windows compatible, can the program be installed as one instance to be run on both operating systems (dual-boot).

I would like to have the option to run MATLAB in Linux as well as Windows on a FAT32 partition, but it doesn't make sense to me to install two copies.

Is it possible to install one copy for use with both? If it is not straightforward, can any tricks be used?
 

silverpig

Lifer
Jul 29, 2001
27,703
12
81
Not straight like that I don't believe. There is a way to do it though. You can install WINE in linux and install it to your fat32 partition. You can run it in wine through linux. Now reboot and reinstall it to the same directory in windows (for registry stuff). You SHOULD be able to run it from both operating systems that way.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Sure, but it's not common. Things like q3, ET, doom3 would work like that because you have 2 seperate executables, one for each OS. Something in Java or even .Net (as long as it was supported by Mono) would also probably work, but that's an extremely small set of apps compared to the total of what's available.

MATLAB may or may not work, the only way to find out is to try and see.
 

NogginBoink

Diamond Member
Feb 17, 2002
5,322
0
0
No.

Programs can be source-compatible across platforms, but not binary-compatible. Source-compatible means the vendor can compile the same source for each platform without changes,but will produce different binaries for each.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,580
10,216
126
Actually... :) I believe that COFF/PE-format executables DO support "fat binaries", so as long as the two OSes in question also support compatible filesystems, and there aren't some OS-specific configuration issues with the installation, then it's certainly possible. I know that there were also many combination DOS/Win3.1/OS2 "fat binaries" as well, even though they had an MZ-format executable stub, and then had a more complex executable appended.

Don't forget, that the PE format stands for "portable executable", and NT has supported at various times x86, 68000, PPC, Sparc, MIPS, Alpha, and now AMD64 and Itanium platforms. To say nothing of the embedded WinCE/PocketPC/XPEmbedded platform targets, although I don't know if they use the PE format or not, since it tends to be a bit bloated, and embedded platforms don't have a lot of spare memory to waste.

I regularly install the same application, into the same directory, twice, in different (both Win32/x86) OSes, to save space. Some programs (like MSVC6) are designed to be able to do that. Unreal Tournament doesn't seem to have a problem with it either, nor did various Mozilla versions.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
If your smart about it you can write programs using Java and Python that are run anywere.

I once had a little java game that ran just fine on my linux machine, and it was intended for Windows.

But usually it's not worth the effort to make it work like that. But it's relatively simple to write programs that work with both platforms when you allow some configuration to happen at install time.

Something that you can look into is maybe checking out .Net and Mono. There is a strong chance that you could use Mono to build cross platform apps in the truest sense of the word. Also programming stuff for Wine make it nearly truly cross platform. If you use Wine you can run a Windows OS's stuff inside linux. I think that probably win98 would work out the best.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,580
10,216
126
Originally posted by: drag
If your smart about it you can write programs using Java and Python that are run anywere.

I once had a little java game that ran just fine on my linux machine, and it was intended for Windows.
Ever heard of TAOS, or the Amiga Digital Environment? They had a portable virtual-machine system, kind of like Java, but actually much more efficient, since it wasn't designed around a stack-based intepreter, but around that of a JIT static binary translator instead. I always thought that it was really cool tech, but it never really seemed to catch on, didn't have any big-name backing I guess. They had assemblers, C/C++ compiliers, the whole works, and some standard libraries, including some pretty impressive cross-platform "multimedia" libraries too.