![]() ![]() ![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() | |
![]() ![]() ![]() ![]() |
§@ªÌ | þï[How-to] Install Ubuntu 8.1 in Virtual PC 2007 for iPhone SDK / Android SDK development |
javacom
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ª©¥D ¤å³¹: 3083 ![]() |
![]() ![]() ![]() ![]() [How-to] Install Ubuntu 8.1 in Virtual PC 2007 for iPhone SDK / Android SDK development Install Linux in VMWare is rather straight forward but in Microsoft Virtual PC, it will have screen display problem and fail during installation. The following guide describe the steps involved for the installation, the only pitfall is that sound is not working for the virtual machine of Ubuntu in Virtual PC 2007 Requirement: Windows XP Pro or above Microsoft Virtual PC 2007 is free, you can download it from http://www.microsoft.com/windows/downloads/virtualpc/default.mspx Ubuntu 8.1 is also free you should download the 32 bit Intel i386 Desktop version http://www.ubuntu.com/getubuntu/download MD5 (ubuntu-8-1.10-desktop-i386.iso) = 24ea1163ea6c9f5dae77de8c49ee7c03 Here are the steps to install Ubuntu 8.1 in Virtual PC 2007. (1) Setup the new Virtual Machine in VPC 2007 and mount the iso image (ubuntu-8-1.10-desktop-i386.iso). The virtual machine setting is : Harddisk Size 8G (after installation of SDKs and packages of this guide, it will take up about 5G) Ram 512MB (more ram is not that useful in this VM) (2) Inside the Ubuntu Install Screen, first Press "F4" and Select "Safe Graphics mode" (3) Then press down arrow and highlight the menu "Install Ubuntu" (highlight only and don't press Enter) (4) Press "F6" to bring up the "Other Options" Then type "vesa vga=771" at the end of the option line Then Press "Enter", the installation will start instantly. Note: If you want other resolution, you can try say vga=791 instead of vga=771 I did not try all these, some of them might not work. The codes are listed out for reference only. vga=769 means 600x480 8 bits color vga=785 means 600x480 16 bits color vga=786 means 600x480 24 bits color vga=771 means 800x600 8 bits color vga=788 means 800x600 16 bits color vga=789 means 800x600 24 bits color vga=773 means 1024x768 8 bits color vga=791 means 1024x768 16 bits color vga=792 means 1024x768 24 bits color During Installation just choose your timezone and language, you will be asked for the username and password and remember what you type I choose English Language because I found out that if you choose Chinese, the default folder name will also be in Chinese which is very odd for me. If you choose English, you can enable the lanaguage support in the desktop and add input method later. I use sdkuser as username for the installation guide below (5) After installation, it will prompt to restart. But the restart might not work and you have to manually reset the VM in VPC 2007 (6) Then release the mounted iso image and to reset the VM that is in VPC 2007 menu do Action -> Reset ![]() After you have installed the Ubuntu 8.1 in VPC 2007, you will have to start installation the necessary packages in Ubuntu The purpose of this virtual machine is to develop apps for iPhone SDK and Android SDK. So it will have (a) llvm-gcc for iPhone toolchain SDK 2.0 (b) Android SDK (c) Eclipse IDE (d) apache 2 websever with php and sqlite3 support (so that you can test some http get/post locally and install your local cydia repository as well) (e) samba and open ssh server (so that you can smb mount it or ssh/scp to it) (7) Install build essential packages so that you can compile llvm-gcc for iPhone toolchain SDK2.0 you need to open the Terminal and type these commands
(8) install server packages so that you can have local webserver and ssh and samba server
Install php5-sqlite3
(9) Create Project folder for smb mount (guest login ok) so that you can use windows / smb mount the virtual machine folder (assume sdkuser is the default user account) mkdir -p /home/sdkuser/Projects edit the smb.conf sudoedit /etc/samba/smb.conf and add the followings at the end
Note : you have to restart samba server to make the new configuration effective if you need to use it right now sudo /etc/init.d/samba restart (10) install jdk6 so that you can compile Andriod app sudo apt-get install sun-java6-jdk (11) Download Android SDK http://dl.google.com/android/android-sdk-linux_x86-1.0_r1.zip from http://code.google.com/android/download_list.html Install the SDK in ~/Android/ mkdir -p ~/Android/ Create sd card & test emulator and create data directory ~/Android/android-sdk-linux_x86-1.0_r1/tools/mksdcard -l SD500M 500M ~/Android/sd500m.img (12) Download and Install Eclipse 3.4.1 (you can't use the debian package eclipse which is 3.2 only) from http://www.eclipse.org/downloads/ http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR1/eclipse-java-ganymede-SR1-linux-gtk.tar.gz Install eclipse in /usr/lib cd /usr/lib; sudo tar -xzvf ~/Desktop/eclipse-java-ganymede-SR1-linux-gtk.tar.gz Add main menu & icon for eclipse in GNOME sudoedit /usr/share/applications/eclipse.desktop and save this
There is no eclipse icon in the download file eclipse-java-ganymede-SR1-linux-gtk.tar.gz. You can get it from eclipse 3.2.2 package and install it manually download the eclipse 3.2.2 package wget http://us.archive.ubuntu.com/ubuntu/pool/universe/e/eclipse/eclipse_3.2.2-5ubuntu2_i386.deb extract the package and copy the icons to /usr/share/pixmaps/ and clean up dpkg -x eclipse_3.2.2-5ubuntu2_i386.deb tmp Install Android sdk plug-in for Eclipse (based on http://code.google.com/android/intro/installing.html#installingplugin) add this site and install in Eclipse http://dl-ssl.google.com/android/eclipse/ Edit Eclipse's preference for Andriod (Window -> Preferences -> Android) SDK location /home/sdkuser/Android/android-sdk-linux_x86-1.0_r1/ emulator options -scale 0.7 -sdcard /home/sdkuser/Android/sd500m.img Test HelloActivity in Eclipse (a) Create a New Android Project in Eclipse (File -> New -> Project... -> Android -> Android Project) (b) Choose Create project from existing source and browse to ~/Android/android-sdk-linux_x86-1.0_r1/samples/HelloActivity (c) Run HelloActivity as Android Application (d) Then the emulator will start Hello, World! will be on the emulator screen Note: Please don't set the workspace of Eclipse to the sample project folder ~/Android/android-sdk-linux_x86-1.0_r1/samples/ or else you will get error when importing project from existing source (13) Install iPhone llvm-gcc and toolchain SDK2.0 Refer to this article and download the file UpgradeToolChain2.tgz and run the build_20.sh to build the llvm-gcc for iPhone http://www.iphone.org.hk/cgi-bin/ch/topic_show.cgi?id=9359 new!! install ldid in Linux, so that you can fake codesign it
If you need to codesign the iPhone binary in Linux add this to your build script
(14) test apache2 and php so as to see the php info page in the local webserver In Firefox browser of Ubuntu enter this address http://localhost/ enable php5 (sometimes you need this) a2enmod php5 restart apache server sudo /etc/init.d/apache2 restart create this test.php script in /var/www sudo chown -R sdkuser:sdkuser /var/www and see the php server info in Firefox browser of Ubuntu http://localhost/test.php (15) create sqlite3 db for testing
and test sqlite3 & php5-sqlite3 by using testdb.php script to test the access to sqlite3 db on webserver
![]() Additional Notes ----------------------- If you need to install flash plugin in firefox sudo apt-get install flashplugin-nonfree If you need to install java plugin in firefox sudo apt-get install sun-java6-plugin If you need to install xpdf sudo apt-get install xpdf-reader If you need to install jedit sudo apt-get install jedit If you need to add Chinese Language Support and Input Method System -> Administration -> Language Support Choose Chinese and Support complex characters System -> Preferences -> SCIM Input Method Setup You may need to change the hot-key to turn-on/off SCIM as it may collide with your host OS if you need it. Alternatively, you can change input method in the top menu bar near the date javacom ×§ï¤_ 2009-01-05 21:52
http://www.cnepub.com/discuz/?fromuid=47472 »´ä¥æ³q§Ö©ç v1.1 Preview http://hk.youtube.com/watch?v=1BHvTC5-QTc ¶}±ÒÁôÂêºªí±¡²Å¸¹¡A¤£¥Î jailbreak ![]() iPhone 3G ¡º«uºÆ¥Í´þ¡º ±`¨£°ÝÃD¶° |
¾ð«¬¥Ø¿ý |
![]() |
![]() ![]() |
[¿ù»~«H®§] |
Table './iphone1/ut_online' is marked as crashed and should be repaired
½Ð³qª¾°Q½×°ÏºÞ²zû <kk@hkfoot.com>¡C |