Programming for more operating systems

Talk about anything here that isn't related to the other topics.
Post Reply
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Programming for more operating systems

Post by Cuban-Pete »

How do you coders manage programming for other operating systems? Me being an user of programs that run on other operating systems. Examples are Blender, Inkscape, Gimp etc. I like to keep to that spirit and so when I make a program it should also work in Ubuntu (Linux) or OS X (or whatever it is called now for Apple). My simple program TXT2GTA2 only works in Windows. I found this little program (not yet used/tested) http://industriousone.com/premake perhaps it is good or you guys know about it?
"Mmmm, your eyes are so beautiful."
User avatar
B-$hep
Immortal
Posts: 571
Joined: 24 Apr 2009, 21:43
GH nick: B-Shep
Location: EU

Re: Programming for more operating systems

Post by B-$hep »

Actually i never worry about other OSes, because i always hated Linux, i never thought about supporting it. And in Apple im not even interested.

Because Windows is so widely used OP system i mainly relate on that.
OK, there is Android platform for example, i even thought about doing something for it.
Because i bought a HTC smartphone for my GF.

She wanted it because there are alot of free apps for it. For Windows you must usually pay for the apps. And i heard that Windows Mobile XX (7 or something) was total failure.


JMO.
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Programming for more operating systems

Post by Sektor »

GH was puked out using the obsolete and Windows only Visual Basic 6. The only way I can make a native version for another OS is to rewrite it in another language.

I have ported games from one platform to another. They were easily portable because they were written in C/C++ and used SDL for graphics, input and sound. If you want portable code, you just have to use compilers and libraries that are available on multiple platforms and write a good makefile.
User avatar
Vike the Hube
Hitman
Hitman
Posts: 145
Joined: 28 Feb 2010, 22:34
GH nick: vike

Re: Programming for more operating systems

Post by Vike the Hube »

It depends largely on the language. If you start off with a platform-independent language like Java normally you're fine, although there are occasionally slight differences between the APIs.

The best way to do it is to use an API that is cross platform... e.g. C++ use boost, and wxwidgets or gtk or something etc for windowing.

The other way is to write a wrapper yourself. I wrote a networking thing for work in C because it had to be fast and portable... and I used #ifdefed #defines where necessary to work around the differences between networking on the various platforms it had to work on. But now I realise I would have been better off using libevent.

So yeah basically you figure out what are all the API-interaction things it needs to do, and find a platform-safe way to do that.

With any program design it's a good idea to write down the goals for the project... e.g. my project above 1. stability 2. portability 3. speed of execution (cuz it had to run on a router) 4. speed of development. Stick these on one axis of a table, on the other one put your various options for a solution, and put High Medium Low in each square to see how much it meets the goal. Makes it very easy to make key design decisions like programming language, libraries, interface technologies, architecture, you name it.
User avatar
Sektor
Boss
Boss
Posts: 1426
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: Programming for more operating systems

Post by Sektor »

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: Programming for more operating systems

Post by elypter »

haha, really great!
yur sa'nok ngeyä
User avatar
Cuban-Pete
Immortal
Posts: 909
Joined: 29 Jan 2010, 15:03
GH nick: Cuban-Pete

Re: Programming for more operating systems

Post by Cuban-Pete »

haha, funny video. maybe I should code txt2gta2 in java. java comes with a gui... :)
"Mmmm, your eyes are so beautiful."
Post Reply