Compiling application in Linux: Difference between revisions

From KolibriOS wiki
Jump to navigation Jump to search
(Created page with "=== 1. Installing SVN === '''''Installing subversion:''''' sudo apt-get install subversion '''''Getting sources:''''' cd ~ mkdir kolibrios cd kolibrios/ svn co svn...")
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== 1. Installing SVN ===  
== Getting KolibriOS sources from SVN repository ==




Line 22: Line 22:
[[File:guide-01.png]]
[[File:guide-01.png]]


 
== Installing FASM ==  
=== 2. Installing FASM ===  




Line 66: Line 65:




=== 3. Downloading KolibriOS ===  
== Downloading KolibriOS ==  




Line 84: Line 83:




=== 4. Compiling a KolibriOS program ===  
== Compiling a KolibriOS program ==  




Line 97: Line 96:




=== 5. Copying a compiled program to disc ===  
== Copying a compiled program to disc ==  


sudo mkdir /media/floppy1/
sudo mkdir /media/floppy1/
Line 111: Line 110:




=== 6. Running a program in VirtualBox ===  
== Running a program in VirtualBox ==  




Line 136: Line 135:


[[File:guide-05.png]]
[[File:guide-05.png]]
[[Category:Coding]]

Latest revision as of 13:50, 10 March 2015

Getting KolibriOS sources from SVN repository

Installing subversion:

sudo apt-get install subversion


Getting sources:

cd ~

mkdir kolibrios

cd kolibrios/

svn co svn://kolibrios.org


Error creating thumbnail: Unable to save thumbnail to destination

Installing FASM

Downloading:

wget http://flatassembler.net/fasm-1.71.22.tgz


Extracting:

tar zxvf ./fasm-1.71.22.tgz

rm ./fasm-1.71.22.tgz

sudo mv fasm/ /opt


Editing PATH variable:

sudo nano /etc/profile


Inserting two strings into profile:

PATH=$PATH:/opt/fasm

export PATH


Error creating thumbnail: Unable to save thumbnail to destination


After logging out and logging in we can see fasm in the PATH variable:


Error creating thumbnail: Unable to save thumbnail to destination


Downloading KolibriOS

Downloading:

wget http://builds.kolibrios.org/eng/latest-img.7z


Extracting:

sudo apt-get install p7zip

p7zip -d ./latest-img.7z


Compiling a KolibriOS program

cd ~/kolibrios/kolibrios.org/programs/system/run/trunk

echo lang fix en > lang.inc

fasm run.asm run

Error creating thumbnail: Unable to save thumbnail to destination


Copying a compiled program to disc

sudo mkdir /media/floppy1/

sudo mount -o loop ~/kolibrios/kolibri.img /media/floppy1/

sudo mkdir /media/floppy1/my

sudo cp ~/kolibrios/kolibrios.org/programs/system/run/trunk/run /media/floppy1/my

sudo umount /media/floppy1/


Running a program in VirtualBox

Installing Oracle VM VirtualBox:

sudo apt-get install virtualbox


Creating virtual machine:

vboxmanage createvm --name "kolibrios" --register

vboxmanage storagectl "kolibrios" --name "Floppy" --add floppy

vboxmanage storageattach "kolibrios" --storagectl "Floppy" --port 0 --device 0 --type fdd --medium ~/kolibrios/kolibri.img


Running KolibriOS:

vboxmanage startvm "kolibrios" &

Error creating thumbnail: Unable to save thumbnail to destination