LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   porting: can a non-trained coder do it? (https://www.linuxquestions.org/questions/linux-newbie-8/porting-can-a-non-trained-coder-do-it-707812/)

akuthia 02-26-2009 03:17 PM

porting: can a non-trained coder do it?
 
so say someone one was bored, and wanted to mess around with porting an existing program to linux (and yes i'm talking just for personal, i wonder if i can do this reasons, not commercial) is it something that someone without any coding "training" do? would it be easier/harder than writing from scratch?

I've done some basic coding (mostly in flash, but it was for a program, not animation)

frieza 02-26-2009 03:44 PM

yes and no
depends a lot on the program
you could train yourself as you go depending on how much time and effort
however in general the answer is no especially if you are talking about proprietary windows programs since to port anything you first need access to the source code, if you can't get the source code it doesn't matter how much coding skill you have you can't port the program .. period
however that doesn't mean there isnt hope
you should look into wine for running un-modified windows programs on linux ;)

akuthia 02-26-2009 03:55 PM

well i actually have access to the source code (the project really in question was to fiddle around with the jagged alliance 1.13 project that is out there, i think there was interest in a linux port, at some point, but would need to double check now)guess i can always transfer the source files over and see what goes

frieza 02-26-2009 04:04 PM

well if you have the source code then yes it is possible, however you would have learn the following

what libraries the program uses and how it calls them
what the linux equivilents of those libraries are and how to rewrite the relevant function calls in the source code to use those libraries instead
then compile the program
it is not an impossible task, however it will require some research and self teaching
but if you can pull it off, a valuable learning experience ;)

akuthia 02-26-2009 04:25 PM

oi vie, sounds like a more difficult task than i had imagined.

gergely89 02-26-2009 05:08 PM

Porting applications to a different platform is actually a good way to learn serious programming, though it can be deep water sometimes.

I have found the book "Beos Porting UNIX Applications (Paperback)" a good reference. It refers to the outdated BeOS with the goal of porting UNIX apps to BeOS, but gives an excellent overview on UNIX concepts, tools and strategies for porting. It is available at http://www.amazon.com/Beos-Porting-A.../dp/1558605320 for a hefty price, but I'm sure that second-hand bookstores or eBay could have more appealing offers. BeOS-related stuff often becomes free, so I wouldn't rule out that the contents are also available as a free PDF file in the meantime (I have the book, so I never bothered to find out).

linux

akuthia 02-26-2009 05:34 PM

im just thinking that something other than a full fledged game might make better fodder for a first attempt at trying it, thats my main concern.

frieza 02-26-2009 05:36 PM

sounds like a plan ;) good luck ;)

akuthia 02-26-2009 05:47 PM

another question, just how far "back" can back go? if i could find source files for say dos programs, could i conceivably port those to linux? or is there a point where its just not possible (like, dos games would be written in something linux just wouldnt be able to compile in or understand?

frieza 02-26-2009 06:27 PM

actually yes
in fact dos programs would probaby be the easiest to start with, since they don't rely on alot of complicated gui libraries that are ultra specialized they are more self contained as well

akuthia 02-27-2009 10:14 AM

oi, i took my first look, and i dont even know where i would start :( i open one file that seems like it would be important to start at (game.lnk) and its just the listing of all the files...

Code:


this is the level of water:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



this is me: ^


frieza 02-27-2009 11:25 AM

well for starters, try to compile the source code unmodified and see what errors, if any are generated, then work from there to see what changes you need to make to the source code to correct those errors

akuthia 02-27-2009 10:11 PM

can you recommend a compiler for ubunutu running GNOME? the only one i've found (KWSDL) seems to be for KDE environments, and when i go to run it, it says it's missing a library (kdialog) and when i run synaptic, it doesnt locate that library

AceofSpades19 02-27-2009 10:49 PM

Quote:

Originally Posted by akuthia (Post 3460081)
can you recommend a compiler for ubunutu running GNOME? the only one i've found (KWSDL) seems to be for KDE environments, and when i go to run it, it says it's missing a library (kdialog) and when i run synaptic, it doesnt locate that library

If you need a c compiler, then gcc would be the obvious choice

akuthia 02-28-2009 03:07 PM

is there no gui for gcc? i dont see it in my application list.. i dont like doing command line only stuff yet:D i left that in my early childhood. if i woulda known writing .bats and config files was coding, i might've persued courses in computer programing more heavily in highschool and maybe beyond


All times are GMT -5. The time now is 01:06 PM.