<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-931884588738837390</id><updated>2011-08-15T10:35:20.867-07:00</updated><title type='text'>Programming</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bachcode-en.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bachcode-en.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anatolii</name><uri>http://www.blogger.com/profile/11644284165407995644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-931884588738837390.post-5637098683225393162</id><published>2009-10-29T13:36:00.000-07:00</published><updated>2009-11-01T03:47:38.295-08:00</updated><title type='text'>Compiling objective-C program using GNUStep</title><content type='html'>&lt;p&gt;My current OS is &lt;strong&gt;Fedora 10 x86_64&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;First what you should do it is install GNUStep. I installed it from repository. Search gnustep packages.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;1. Create new project directory and add the following Objective-C source code to hello.m file&lt;/strong&gt;:&lt;/p&gt;&lt;p&gt;hello.m:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;#import &lt; Foundation/Foundation.h&gt; &lt;br /&gt;&lt;br /&gt;int main(int argc, const char* argv[])&lt;br /&gt;{&lt;br /&gt;NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];&lt;br /&gt;NSLog(@"Hello from Hello.m!");&lt;br /&gt;&lt;br /&gt;[pool release];&lt;br /&gt;return 0;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2. Now create the makefile and save it in the same project directory with the filename GNUmakefile&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;#&lt;br /&gt;# A simple GNUmakefile example for an Objective-C command line utility&lt;br /&gt;#&lt;/span&gt;&lt;span style="color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#993399;"&gt;include&lt;/span&gt;&lt;span style="color:#666666;"&gt; $(GNUSTEP_MAKEFILES)/common.make&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;# Build a simple Objective-C program, called Example&lt;/span&gt;&lt;span style="color:#666666;"&gt;&lt;br /&gt;TOOL_NAME = Example&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;# The Objective-C Implementation files to compile&lt;/span&gt;&lt;span style="color:#666666;"&gt;&lt;br /&gt;Example_OBJC_FILES = Main.m Some_Class.m Other_Class.m&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;# Class Header (Interface) files&lt;/span&gt;&lt;span style="color:#666666;"&gt;&lt;br /&gt;Example_HEADER_FILES = Some_Class.h Other_Class.h&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;# Define the compiler flags&lt;/span&gt;&lt;span style="color:#666666;"&gt;&lt;br /&gt;ADDITIONAL_CPPFLAGS = -Wall -Wno-import&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color:#009900;"&gt;# Include the rules for making Objective-C command line tools&lt;/span&gt;&lt;span style="color:#666666;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color:#993399;"&gt;include&lt;/span&gt;&lt;span style="color:#666666;"&gt; $(GNUSTEP_MAKEFILES)/tool.make&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;In our case GNUMakefile looks as follow:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;include $(GNUSTEP_MAKEFILES)/common.make&lt;br /&gt;&lt;br /&gt;TOOL_NAME = Hello&lt;br /&gt;Hello_OBJC_FILES = hello.m&lt;br /&gt;&lt;br /&gt;include $(GNUSTEP_MAKEFILES)/tool.make&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;3. To make makefile useful configure GNUStep&lt;/strong&gt;:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;set GNUSTEP_MAKEFILES variable to correct path to your installed GNUStep.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;On most Unix systems, GNUstep is installed in /usr/lib/GNUstep. In my case it is in /usr/lib64/GNUstep&lt;/p&gt;&lt;p&gt;So use following command to set this variable or add it to ~/.bachrc file&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;export GNUSTEP_MAKEFILES=/usr/lib64/GNUstep&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;set your GNUstep environment variables:&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The simplest way to do this is to execute following command:&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;source &lt;gnustep&gt;/System/Library/Makefiles/GNUstep.sh&lt;/span&gt;&lt;/p&gt;&lt;p&gt;In my case it is: &lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;source /usr/lib64/GNUstep/Makefiles/GNUstep.sh&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;4. After all steps are done you can use just make command to build your objective-c project&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;$ make&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Following output means that program was built without errors:&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for help.&lt;br /&gt;Making all for tool Hello...&lt;br /&gt;Compiling file hello.m ...&lt;br /&gt;Linking tool Hello ...&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;That's all. Enjoy!&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/931884588738837390-5637098683225393162?l=bachcode-en.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bachcode-en.blogspot.com/feeds/5637098683225393162/comments/default' title='Дописати коментарі'/><link rel='replies' type='text/html' href='http://bachcode-en.blogspot.com/2009/10/compiling-objective-c-program-using.html#comment-form' title='43 коментарі(в)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/5637098683225393162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/5637098683225393162'/><link rel='alternate' type='text/html' href='http://bachcode-en.blogspot.com/2009/10/compiling-objective-c-program-using.html' title='Compiling objective-C program using GNUStep'/><author><name>Anatolii</name><uri>http://www.blogger.com/profile/11644284165407995644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>43</thr:total></entry><entry><id>tag:blogger.com,1999:blog-931884588738837390.post-1387861601378709300</id><published>2009-06-14T02:07:00.000-07:00</published><updated>2009-06-14T02:15:22.791-07:00</updated><title type='text'>Grub rescue</title><content type='html'>&lt;p&gt;1. Load from CD and choose system rescue.&lt;/p&gt;&lt;p&gt;2. I've been trying to use grub-install of CD linux but it was a bad way, becuse program was asking me about dependencies which it can not found. So I propouse to use grug-install of your installed linux. For do this you need change root to your system root. For it do the following:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="font-size:100%;"&gt;a) find where your installed linux (fdisk -l can help you)&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="font-size:100%;"&gt;b) mount your installed system root partition to (for example) /mnt/sysimage/&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span style="font-size:100%;"&gt;c) mount /proc and /dev folders to you system folders with --bind parameter:&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;  &lt;span style="font-family:courier new;"&gt;mount --bind /proc/ /mnt/sysimage/proc/&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt; mount --bind /dev/ /mnt/sysimage/dev/&lt;/span&gt;&lt;/p&gt;&lt;p&gt;4. and ofcourse command chroot&lt;br /&gt;&lt;/p&gt;&lt;p&gt;    &lt;span style="font-family:courier new;"&gt;chroot /mnt/sysimage/&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Now you can use /grub-install of your installed system&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;grub-install &lt;your system="" partition=""&gt; --root-directory &lt;root directory=""&gt;&lt;/span&gt;&lt;p&gt;now it is not nessessary to set root directory, because now it is /&lt;br /&gt;&lt;/p&gt;so:&lt;br /&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;grub-install /dev/sda6&lt;/span&gt;&lt;/p&gt;&lt;p&gt;5. reboot.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;6. If after reboot you have grub menu but it is impossible to load your system - you should edit grub menu items.&lt;/p&gt;&lt;p&gt;7. It is very simple, just read documentation which displayed abow. In my case it was: press 'e' - to edit menu item, press 'e' to set boot device.&lt;br /&gt;&lt;/p&gt;8. Set device in the same format as it was before: root (hd5,0) in my case for /dev/sda6 partition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/931884588738837390-1387861601378709300?l=bachcode-en.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bachcode-en.blogspot.com/feeds/1387861601378709300/comments/default' title='Дописати коментарі'/><link rel='replies' type='text/html' href='http://bachcode-en.blogspot.com/2009/06/grub-rescue.html#comment-form' title='0 коментарі(в)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/1387861601378709300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/1387861601378709300'/><link rel='alternate' type='text/html' href='http://bachcode-en.blogspot.com/2009/06/grub-rescue.html' title='Grub rescue'/><author><name>Anatolii</name><uri>http://www.blogger.com/profile/11644284165407995644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-931884588738837390.post-1034505766961765058</id><published>2009-03-25T12:46:00.000-07:00</published><updated>2009-03-27T03:48:32.314-07:00</updated><title type='text'>Installing Maemo onto Fedora 9 x86</title><content type='html'>&lt;p&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Installing scratchbox using the installer script&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;The installer script can be found from &lt;a href="http://repository.maemo.org/stable/diablo/maemo-scratchbox-install_4.1.2.sh"&gt;here&lt;/a&gt;:&lt;/p&gt;Before running downloaded script I recomend to run the following commands:&lt;p&gt;&lt;span&gt;Add user to your system which will be Maemo user:&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;#adduser tolyan&lt;br /&gt;#passwd tolyan&lt;/span&gt;&lt;/p&gt;&lt;span&gt;If you use prox&lt;/span&gt;&lt;span&gt;y, do not forget to export it:&lt;/span&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;#export http_proxy=http://proxy_user:proxy_passwd@proxy.server.com:port/&lt;/span&gt;&lt;/p&gt;&lt;p&gt;You will be asked to run these two commands by installing script, so you can do it now&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;#echo 0 &gt; /proc/sys/vm/vdso_enabled&lt;br /&gt;#echo 0 &gt; /selinux/enforce&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Now you can run script, also you can specify users to be added to scratchbox users with '-u USER', in out case it is tolyan:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;#./maemo-scratchbox-install_4.1.2.sh -u tolyan -s /scratchbox&lt;/span&gt;&lt;/p&gt;&lt;p&gt;Start scratchbox:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;#/scratchbox/sbin/sbox_ctl start&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Checking the scratchbox installation&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;Open other terminal and login under tolyan&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;@su -l tolyan&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;try to login:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-family:courier new;"&gt;@/scratchbox/login&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;if login is successfull press&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; Ctrl+D &lt;/span&gt;&lt;span&gt;to logout&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Installing Maemo 4.1.2 SDK using the installer script&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;To install the SDK, first download the script&lt;a href="http://repository.maemo.org/stable/diablo/maemo-sdk-install_4.1.2.sh"&gt; &lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://repository.maemo.org/stable/diablo/maemo-sdk-install_4.1.2.sh"&gt;maemo-sdk-install_4.1.2.sh&lt;/a&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;and put it somewhere where it will be accessible to user tolyan&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;All following commands should be runned from tolyan user, you can do it in the same terminal where you was testing scratchbox login&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;Do not forget to export proxy if you need it:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;@export http_proxy=http://proxy_user:proxy_passwd@proxy.server.com:port/&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;run installing script:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;@sh maemo-sdk-install_4.1.2.sh&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;After that graphics menu will be shown&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;em&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;in menu Select Installed Packages: select Runtime Environment (it will be enough for now)&lt;br /&gt;Do you wish to download and install closed Nokia Binaries? Yes&lt;br /&gt;Installation about to begin with following settings: Continue&lt;/span&gt;&lt;/span&gt;&lt;/em&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;After that wait untill sdk will be installed.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Running system&lt;/span&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;login using tolyan user&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;@/scratchbox/login&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;run following command from scratchbox&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&gt;sb-conf select DIABLO_ARMEL&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;Start Xephyr from other terminal using any user&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;@Xephyr :2 -host-cursor -screen 800x480x24 -dpi 96 -ac -extension Composite&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;In &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;useinstalling manual there is &lt;span style="font-family:courier new;"&gt;-screen &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;800x480x16&lt;/span&gt; parameter, but I've changed it into &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;span style="font-size:100%;"&gt;-screen &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;800x480x24&lt;/span&gt;, because my Xephyr crashed.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;Now return to our scratchbox where we already logged on.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;export display:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&gt;export DISPLAY=:2&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;following command should start the Hildon Application Framework inside the Xephyr window:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p  style="font-family:courier new;"&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&gt;af-sb-init.sh start&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;Also you can install metapackage of Nokia EUSA licensed&lt;br /&gt;binaries as it recommended after installing SDK:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:courier new;"&gt;&gt;fakeroot apt-get install maemo-explicit&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;Happy Hacking !&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span&gt;&lt;span style="font-size:100%;"&gt;for more information see &lt;a href="http://repository.maemo.org/stable/4.1.2/INSTALL.txt"&gt;useinstalling manual&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/931884588738837390-1034505766961765058?l=bachcode-en.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bachcode-en.blogspot.com/feeds/1034505766961765058/comments/default' title='Дописати коментарі'/><link rel='replies' type='text/html' href='http://bachcode-en.blogspot.com/2009/03/installing-maemo-onto-fedora-9-x86.html#comment-form' title='0 коментарі(в)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/1034505766961765058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/1034505766961765058'/><link rel='alternate' type='text/html' href='http://bachcode-en.blogspot.com/2009/03/installing-maemo-onto-fedora-9-x86.html' title='Installing Maemo onto Fedora 9 x86'/><author><name>Anatolii</name><uri>http://www.blogger.com/profile/11644284165407995644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-931884588738837390.post-7885292201049547956</id><published>2009-03-20T07:48:00.000-07:00</published><updated>2009-03-20T07:55:51.632-07:00</updated><title type='text'>Variable parameters count in #define</title><content type='html'>There are two ways:&lt;br /&gt;1.&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;#define MAKE_INT_ARRAY(name,size,values) int name [size]= { values }&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;#define _ ,&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;MAKE_INT_ARRAY&lt;/span&gt; (i1, 1, 1);&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;MAKE_INT_ARRAY&lt;/span&gt; (i2, 2, 1 _ 2);&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;MAKE_INT_ARRAY&lt;/span&gt; (i8, 8, 1 _ 2 _ 3 _ 4 _ 5 _ 6 _ 7 _ 8);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;#undef _&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Using Boost.Preprocessor&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;#define MAKE_INT_ARRAY(name, values) \&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;int name[BOOST_PP_SEQ_SIZE(values)] = { BOOST_PP_SEQ_ENUM(values) }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;MAKE_INT_ARRAY&lt;/span&gt; (i1, (1));&lt;br /&gt;&lt;span style="color: rgb(153, 51, 153);"&gt;MAKE_INT_ARRAY&lt;/span&gt; (i2, (1)(2));&lt;br /&gt;&lt;span style="color: rgb(204, 51, 204);"&gt;MAKE_INT_ARRAY&lt;/span&gt; (i8, (1)(2)(3)(4)(5)(6)(7)(8));&lt;br /&gt;&lt;br /&gt;But you should remember, do not use macros if you can avoid it. It is a bad style of programming.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/931884588738837390-7885292201049547956?l=bachcode-en.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bachcode-en.blogspot.com/feeds/7885292201049547956/comments/default' title='Дописати коментарі'/><link rel='replies' type='text/html' href='http://bachcode-en.blogspot.com/2009/03/variable-parameters-count-in-define.html#comment-form' title='0 коментарі(в)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/7885292201049547956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/7885292201049547956'/><link rel='alternate' type='text/html' href='http://bachcode-en.blogspot.com/2009/03/variable-parameters-count-in-define.html' title='Variable parameters count in #define'/><author><name>Anatolii</name><uri>http://www.blogger.com/profile/11644284165407995644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-931884588738837390.post-5522443265622918832</id><published>2009-03-20T03:18:00.000-07:00</published><updated>2009-03-20T05:59:36.579-07:00</updated><title type='text'>Running squish tests on Xephyr X server (Fedora 9)</title><content type='html'>Squish is test tool for Qt applications. Sometimes when you need run tests and you have only one machine for it - your workstation,- it is very boring. So I decided to do it on other display. But I've had a problem with squish, when I've been trying to run squish tests on another display.&lt;br /&gt;There is what I did:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Started another display:&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;Ctrl+Alt+F1&lt;br /&gt;login&lt;br /&gt;# xinit -- :1&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;switch to display:&lt;/li&gt;&lt;/ul&gt;on my Fedora 9 it is &lt;span style="font-family:courier new;"&gt;Ctrl+Alt+F8&lt;/span&gt; or some another 'F' bigest than 7&lt;br /&gt;and then run squish tests as on usual 0 display, but there was a problem. When I switched to 0 display squish was waiting "for me" and did not do it's job.&lt;br /&gt;&lt;br /&gt;Solution is using &lt;span style="font-weight: bold;"&gt;Xephyr X server&lt;/span&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Installing&lt;/span&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;# sudo yum install Xephyr&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Running&lt;/span&gt;:&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# Xephyr :3 -screen 1280x920 -ac&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;:3&lt;/span&gt; - third virtual display&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-screen 1280x920&lt;/span&gt; - display resolution&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-ac&lt;/span&gt; disable access control restrictions. Without this option squish could not access to my virtual display:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;No protocol specified&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;_squish: cannot connect to X server :3&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Accessing:&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;open another terminal and export display there&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# export DISPLAY=:3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;run squish from this terminal.&lt;br /&gt;&lt;br /&gt;You can run terminal instead squish and after that you can run anything what you need for your comfortable work (metacity, gnome-panel, whatever you want)&lt;br /&gt;&lt;br /&gt;Also you can export display to&lt;span style="font-size:100%;"&gt; &lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;Xephyr on any host&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# export DISPLAY=0.0.0.0:3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Do not forget to run &lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;# xhost +&lt;/span&gt;&lt;/span&gt; on remote host&lt;br /&gt;&lt;br /&gt;Now when my tests are running on &lt;span style="font-size:85%;"&gt;&lt;span style="font-size:100%;"&gt;Xephyr&lt;/span&gt;&lt;/span&gt; I have a time to write this blog )&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/931884588738837390-5522443265622918832?l=bachcode-en.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bachcode-en.blogspot.com/feeds/5522443265622918832/comments/default' title='Дописати коментарі'/><link rel='replies' type='text/html' href='http://bachcode-en.blogspot.com/2009/03/running-squish-tests-on-xephyr-x-server.html#comment-form' title='0 коментарі(в)'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/5522443265622918832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/931884588738837390/posts/default/5522443265622918832'/><link rel='alternate' type='text/html' href='http://bachcode-en.blogspot.com/2009/03/running-squish-tests-on-xephyr-x-server.html' title='Running squish tests on Xephyr X server (Fedora 9)'/><author><name>Anatolii</name><uri>http://www.blogger.com/profile/11644284165407995644</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
