http://www.virtualgamelab.com/unity-resources.html


Unity website: http://unity3d.com/

Which license do you need? http://unity3d.com/unity/licenses

Download the free version of Unity to get started: http://unity3d.com/unity/download/

If you have no previous experience with Unity, start with these six video tutorials which give a quick overview of the Unity interface and some important features
http://unity3d.com/support/documentation/video/ 

Continue with a more in-depth text-based walk through of very basic Unity functionality and work flow http://unity3d.com/support/documentation/Manual/Unity%20Basics.html

To get you started with scripting, have a look at the following PDF document. It was written for an older version of Unity, but still covers relevant aspects of scripting with JavaScript. (2 hours to complete, no previous JavaScript knowledge required)
http://docwiki.unity3d.com/uploads/Main/Scripting%20Tutorial.pdf 

Unity features three scripting languages; JavaScript, C#, and Boo. Depending on your scripting language of choice, you might want to choose different tutorials to get started with Unity. Each tutorial link will also mention which scripting language is used. Most Unity tutorials available on the web are using JavaScript. Notice that JavaScript is commonly used for web applications. Unforunately, books which cover JavaScript are normally of little use for Unity's implementation of JavaScript. But worry not, a vast amount of tutorials will follow...

If you want to familiarize yourself with Unity's functionality more, browse through Unity's manual. You can skip the “Basics” section as we already went through this (see above).
http://unity3d.com/support/documentation/Manual/index.html 

For a printable version of the 600+ pages manual, se
e
http://unity3d.com/support/documentation/printable.html

Unity Videos (including Tutorials)http://video.unity3d.com/ 


Live Online Unity Classes (currently for basic introduction to Unity)
http://unity3d.com/support/online-training/

Picture
If you rather prefer to jump into the action, skip the manual and basic resources altogether and have a look at several books which have been published on Game Development with Unity (several recently added on 03/22/2012).
A complete list of Unity books and their descriptions can be found here: http://gamefromscratch.com/page/Unity-Book-Roundup.aspx 

1) Author Will Goldstone guides you through a complete project and introduces most of Unity's functionality (using JavaScript). The book is available as print and digital version and all needed assets and resources can be downloaded with the book. It's been a helpful investment from my point of view.
http://www.packtpub.com/unity-game-development-essentials/book 
This forum thread discusses the book and its content. 
http://forum.unity3d.com/viewtopic.php?t=29041
The updated version of this book for Unity 3 can be found on Amazon.
Amazon Link

2) Ryan Henson Creighton more recently published "Unity 3D Game Development by Example Beginner's Guide". Find out more about the book here: https://www.packtpub.com/unity-3d-game-development-by-example-beginners-guide/book
and the forum thread - http://forum.unity3d.com/threads/61349-Unity-3D-Game-Development-by-Example

3) Craig Stevenson and Simon Quiq (publisher Deep Pixel) released "Unity 3 Blueprints: A practical guide to Indie games development". Their website provides all the art assests and code to create four classic games from scratch (Match the Pairs, Top-Down Shooter, Tower Defense, Marble Madness).
Amazon link

4) Sue Blackman wrote a book in which she guides the reader through the development of a Javascript-based project which resembles an adventure-type of game. Sue highlights the viewpoint of an artist working in game development. See the forum thread and the amazon link.

5) Coming up on 07/17/2012, Deniz Opal, Sean McCracken and Mike Renwick are publishing "Professional Unity and C#: Multi-Platform 3D Game Development" on Amazon. See this link for a special pre-order price. As the name implies, this book will focus on C# development. 


Picture

Picture
You are now faced with the choice of tackling example projects provided by Unity Technologies or jump straight into user-generated tutorials. As the example projects are quite complex, I would suggest working through some video tutorials first. Nonetheless, here are the links for Unity's official example projects. They can be taken completely apart, reverse-engineered and reused for own projects.

3D Platform Game
http://unity3d.com/support/resources/tutorials/3d-platform-game


2D Platform Game
http://unity3d.com/support/resources/tutorials/2d-gameplay-tutorial


Iphone tutorials and more example projects
http://unity3d.com/support/resources/tutorials/

More Unity Example projects
http://unity3d.com/support/resources/example-projects/ 

Car Tutorial by Unity Technologies
http://unity3d.com/support/resources/tutorials/car-tutorial 


Official Unity Tech. Tutorial for the Animation View - 3-part-series of video tutorials 
http://unity3d.com/support/resources/tutorials/video-animation-view 

Picture
3dbuzz.com 
Series of Unity tutorials in C# (among many other tutorials)
registration required (free)
website - http://www.3dbuzz.com/vbforum/sv_home.php
forum thread - http://forum.unity3d.com/threads/37093-Over-7-hours-of-Unity-Training-Videos-Download-them-now! 


Advanced Media Lab at North Carolina State University 
http://vimeo.com/channels/ncsuunity  


BurgZergArcade - Unity Tutorials
Hack&Slash Tutorial using C# and plenty of other information and useful tutorials
website - http://www.burgzergarcade.com/ 


CannedMushroom Video Tutorials (Unity and other software)
This is a series of projects intended for 2-hour self-instructed lessons using JavaScript
http://www.youtube.com/user/cannedmushrooms  


Car Tutorial 
Physics Setup for a car, AI for driving around racetrack (from 2009)
http://www.gotow.net/andrew/blog/?page_id=78  


Catlike Coding C# Tutorials - text-based tutorials that walk you through creating simple projects, the most complex being a side-scroller game. http://catlikecoding.com/unity/tutorials/

 
GamerToGameDeveloper Tutorials Series 1
This series of video tutorials covers the development of a multiplayer first person shooter prototype from scratch and focuses on C# scripting.
Website: http://www.gamertogamedeveloper.com
 
GearTech Games 
4 Videos on how to work through a project (and more videos)
  • workflow between Modo and Unity
  • lightmapping
http://www.geartechgames.com/GearTech_Games/Beginning_a_Project/Beginning_a_Project.html
 
InfiniteAmmo Tutorial 
General Introduction to Unity (3 parts so far)
Some scripting covered using Javascript (e.g. movement controls)
http://infiniteammo.ca/blog/impromptu-unity3d-intro-tutorial/  

InsurgentX Advanced Video Tutorials
Series of JavaScript tutorials starting from the very basics and slowly increasing in complexity to build a sophisticated game from scratch
http://www.youtube.com/user/InsurgentXdotcom 

LOD Tutorial (Level of Detail, Unity3.5 Pro Feature)
By Manuel Schererhttp://www.youtube.com/watch?v=hX-9ofr2D5w  

Making Sense of Unity 
These video tutorials provide more indepth coverage of unity scripting using Javascript (not meant to be introductory material)
  • lecture style explanations of concepts
  • more entertaining and not like most other screen-capture tutorials :)
http://www.youtube.com/etphonemyhome 

Paul Bourke - Unity for stereoscopic display (from 2008)
text-based with screenshots
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/stereographics/Unitystereo/ 

Paul Bourke – Unity and Idome (from 2008)
text-based with screenshots
http://local.wasp.uwa.edu.au/~pbourke/miscellaneous/domemirror/UnityiDome/  

Robotduck - Blog 
The blog of this Unity user provides tips on Unity scripting and functionality and showcases some of his projects
http://robotduck.wordpress.com/  

Technicat 
Introduction to Game Development with Unity including Workflow, Scripting, GUI, Version Control, etc.
http://technicat.com/games/unity.html  

Terrain Tutorial 
seven videos on how to create terrains in Unity from heightmaps to finish (from 2010)
http://vimeo.com/album/156452  

Terrain Tutorial In-Depth
text-based with screenshots
http://www.unifycommunity.com/wiki/index.php?title=Terrain_tutorial 
forum thread
http://forum.unity3d.com/viewtopic.php?t=16941  

TornadoTwins Video Tutorials 
They show step by step how to create a simple game using Javascript.
http://www.youtube.com/user/TornadoTwins  

Unity Gems

A website of text-based tutorials. This is a mix of introductory (intermediate) scripting tutorials and more advanced tutorials. Themes currently cover general tips for Unity scripting, Memory Management, Finite State Machines, Quaternions/Rotations and Coroutines. Some content for Boo and Unity Script is provided, several tips and descriptions are more conceptual and should be helpful regardless of the language that is used.
website: http://unitygems.com/

Unity Jumpstart 
Proof of Concept Game to learn creating your own game from the ground up (JavaScript)
http://forum.unity3d.com/viewtopic.php?t=28433 
http://www.unityjumpstart.com/ProofOfConcept_1/  

UnityCookie (CGCookie)
A series of tutorials for an introduction to Unity and several scripting video tutorials (using Javascript)
http://cgcookie.com/unity/  

UnityScript Basics (Scripting Basics for Noobs)
If you're new to scripting, read up on this good introduction to scripting in Unity. Lots of analogies are provided which makes it really easy to understand. The details are explained for UnityScript, but the introduction is great for any scripting language.
website - http://www.unityscript.com/lessons1/basics.php 

Virtual Autonomy 
Guide for working with Google SketchUp and Unity
(also shaders and multi-user environments)
text-based with screenshots
http://virtualautonomy.com/blog/index.php/tutorials/

Walker Boys Studio - Unity Tutorials from the Guildhall at SMU (an extensive list of tutorials with more on the way)
http://walkerboystudio.com/html/unity_training___free__.html 

Will Goldstone, author of the Unity Game Development book, worked on a series of helpful video tutorials here (using JavaScript): 
http://learnunity3d.com/ (also http://learnmesilly.com/).
More recently by Will Goldstone: http://www.unity3dstudent.com/

PAID TUTORIALS

Design3.com (subscription-based tutorials, Unity-related content among other software like Maya, 3DS Max, Photoshop)
http://www.design3.com/software/unity

Digital Tutors - (250+ subscription-based tutorials)
http://www.digitaltutors.com/training/unity-tutorials 

Polypusher.net Tai-Pan Development Set Tutorial Series
For an annual payment of 40 Euros, PolyPusher.net offers insights into the complete development process of their RTS Tai-Pan. All assets are included royalty-free and tutorials are delivered as videos or pdf-documents. I have not tested their tutorials yet, but their work seems impressive and of high quality.
website - http://www.polypusher.net/taipan.php
forum thread - http://forum.unity3d.com/threads/104599-Tai-Pan-Development-Set-Tutorial-Series 

VTC - Unity tutorial using JavaScript (subscription based content on vtc.com)
http://www.vtc.com/products/Introduction-to-Game-Development-Using-Unity-3D-Tutorials.htm 
Unity-Tutorials (mostly paid and some free tutorials)
http://www.unity-tutorials.com/  


Picture
Once you went through some or all of these tutorials, you should be creating your own content in no time. Next, I'll provide an overview of general resources for Unity. Whenever you need to find some information about Unity, scripting, projects, collaborations or anything Unity-related, check these links out:

Searching for resources - The All-In-One Unity Reference Search 
http://www.google.com/cse/home?cx=001712401338047450041:csfhqk-trfa 
credit goes to Robotduck for providing this link to the public; tremendous time saver (see http://robotduck.wordpress.com/)

Unity Scripting Reference 
http://unity3d.com/support/documentation/ScriptReference/index.html 

Unity Component Reference 
each available Component described in detail
http://unity3d.com/support/documentation/Components/index.html 

Unity Wiki (UnifyCommunity) 
http://wiki.unity3d.com/index.php?title=Main_Page
UnityScript Keywords: http://wiki.unity3d.com/index.php?title=UnityScript_Keywords

Unity Answers 
Invaluable when you have specific questions about Unity or Scripting
http://answers.unity3d.com/ 
This link should also get you started on learning Unity
http://answers.unity3d.com/search?q=learning+tutorial 

Unity Forum 
http://forum.unity3d.com/ 
http://forum.unity3d.com/viewtopic.php?t=30633 

Unity Feedback 
feature requests go here
http://feedback.unity3d.com 

Unity IRC 
Point your favorite IRC client to irc.freenode.net and join #unity3d to chat in real time. 

Overview of Unity Resources 
http://www.reddit.com/r/unity_tutorials/ 

Overview of Unity blogs 
http://www.reddit.com/r/unity_blogs/ 


Picture
Unity Extensions
  • Terrain Toolkit
  • External Lightmapping Tool
  • Locomotion System
  • Explosion Framework
  • Head Look Controller
http://unity3d.com/support/resources/unity-extensions/
overview of some extensions – Unity youtube and vimeo channels 
http://www.youtube.com/user/Unity3D 
http://www.vimeo.com/unity3d/videos 

Visual C# Express-  free IDE for your C# development
http://www.microsoft.com/express/Downloads/#2008-Visual-CS

3DAttack - Tools and Home of Unity Creative Magazine
First Person Shooter Developer Kit
forum thread - http://forum.unity3d.com/viewtopic.php?t=53136
website - http://www.3dattack.us/3DAttack/News.html

AngryAnt 
One of Unity's developers provides projects to extend Unity's functionality (e.g. pathfinding and AI)
http://angryant.com/ 
forum thread Path - http://forum.unity3d.com/threads/19341-Pathfinding-in-unity-First-Path-1.0-tutorial-now-available!

sturestone's A* Pathfinding (currently version 2.9)
forum thread - http://forum.unity3d.com/threads/67417-A*-Pathfinding-2.9-Is-Released-(Unity-3-Compatible)

Weltenbauer 
Augmented Reality / Webcam Input
http://produktion.weltenbauer.com/#/5 
forum threads:
http://forum.unity3d.com/viewtopic.php?t=32613&highlight=toolkit (Webcam Toolkit)
http://forum.unity3d.com/viewtopic.php?t=11889&highlight=toolkit (ARToolkit Extension)
http://forum.unity3d.com/viewtopic.php?t=32669&highlight=toolkit (UnityAR)

SeeingMachines FaceAPI / VisionBlaster – Head Tracking in Unity (purchase required)
http://visionblaster.com/cms/index.php?option=com_content&view=article&id=48&Itemid=62&lang=en 
and http://www.seeingmachines.com/product/faceapi/downloads/

Mostly Tigerproof – Using Google Analytics and Unity to track game stats
This is a blog entry about Google Analytics and Unity
http://blog.mostlytigerproof.com/2009/10/06/gathering-statistics-using-google-analytics-and-unity-3d/ 

Antares Project
 - Extensive Set of Tools to extend the Unity Editor - Open Source
Also available: Antares.dll (free for non-commercial work)
forum thread - http://forum.unity3d.com/viewtopic.php?t=50843

Antares Deformator - Deform your meshes (Beta Version)
forum thread - http://forum.unity3d.com/viewtopic.php?t=54290

UniWii – WiiMote implementation 
http://www.unifycommunity.com/wiki/index.php?title=UniWii 
forum thread
http://forum.unity3d.com/viewtopic.php?t=7284 

Unity Terrain Tools - EasyRoads (purchase required)
http://unityterraintools.com/downloads.php
forum thread
http://forum.unity3d.com/viewtopic.php?t=23519

Six Times Nothing - Road/Path Tool and River Tool http://www.sixtimesnothing.com/

Dastardly Banana - FPS Weapon Tool, Radar example
http://dastardlybanana.com/Downloads.htm

Starscene Software - Tools, Games and Utilities for Unity (purchase required for utilities) 
http://www.starscenesoftware.com
e.g. Vectrosity - Line Drawing Tool
http://starscenesoftware.com/vectrosity.html
Fractscape - Terrain Tool
Stitchscape - Stitch multiple terrains together

GUIX - visual Menu/GUI builder (purchase required)
http://www.ennanzus.com/developer/GUIX/buy.htm


NGUI - GUI builder/editor (purchase required)
http://www.tasharen.com/?page_id=140

EZ Game Saver - saving tool (purchase required)
http://www.anbsoft.com/middleware/ezs/index.htm
Note that I will cover saving to text file in a later blog

Decal Framework - Easily place decals in your scene
forum thread - http://forum.unity3d.com/viewtopic.php?t=54613

Visual Logic Editor by NeoDrop (Antares VIZIO, Work in Progress)
forum thread - http://forum.unity3d.com/viewtopic.php?t=31132

Nimbus Volumetric Clouds
forum thread - http://forum.unity3d.com/viewtopic.php?t=51972

RapidUnity Vehicle Editor Resource Pack
forum thread - http://forum.unity3d.com/viewtopic.php?t=56257

Ocean 3D - Ocean Simulation
website: http://www.nikko3d.com/index.php/downloads-2/

ShaderFusion - Node-Based Shader Editor (Requires Unity3)
forum thread - http://forum.unity3d.com/viewtopic.php?t=60611

Strumpy Shader Editor - Node-Based Shader Editor
forum thread - http://forum.unity3d.com/threads/56180-Strumpy-Shader-Editor-Beta-3.1-released-(performance-usability-upgrade)

Overview of extensions on UnifyWiki 
http://www.unifycommunity.com/wiki/index.php?title=Extensions 

LightUp (purchase required)
Extension of Google Sketchup (Lighting Solution) which works nicely for exporting lightmaps to Unity
http://www.light-up.co.uk/ 

Stereoscopic Solutions
3D Anaglyph System (purchase required)
Stereoskopix3D

Plugin for Kinect's Primesense Camera
forum thread - http://forum.unity3d.com/threads/67982-Kinect-plugin

Unity Web Suite - tutorials and examples in C# to create online content
forum thread - http://forum.unity3d.com/threads/17674-Unity-Web-Suite-(Examples-Tutorials)
website - http://www.nickbreslin.com/2009/04/phphandler-20-released/

Tools for Visual Programming:
Antares Universe - Vizio (forum thread)
cost (as of 05/22/11) Euro 142.50 
Visual programming tool similar to the approaches of Quest3D and Virtools.

Playmaker by Hutong Games
cost (as of 05/22/11) Euro 95.00
Visual State Machine Editor (website and forum thread)

uScript by Detox Studios
website and forum thread
Visual Scripting Tool based on UDK's Kismet

Brain Builder by boldai
website and forum thread  


Posted by kevino
,

코드 예제 1) 임의의 시간으로 설정해 둔 시간 뒤 작업 진행하기

    function OnCollisionEnter(other : Collision){

   if (other.gameObject.tag == "piece") {
        Debug.Log("Collided");
        gameObject.AddComponent(HingeJoint);
            var otherBody = other.gameObject.Rigidbody;
            hingeJoint.breakForce = 45;
            hingeJoint.breakTorque = 45;
            hingeJoint.connectedBody = otherBody;
        }
}
Posted by kevino
,

Tips in development of cocos2d-x project


Below contains some useful information gathered when I tried to solve problems happened in developing cocos2d-x related project for Android.


1. When you meet compile error with message "must override a superclass method"


Check the project's properties and verify that Java Compiler -> Compiler compliance level is set to1.6.



Posted by kevino
,

GDB tips

프로그래밍/linux 2012. 6. 27. 17:48

In this article, I want to share all my findings and gathered information to help debugging with GDB.


1. How to set program arguments when debugging a program.

   ex) If you want to execute following command, 'progname -o outdir inputfilename'

        Then you can provide program's arguments to gdb like this

        $ gdb -ex 'set args -o outdir inputfilename' progname



Posted by kevino
,

다음에서 이어지는 글 

(ndk-gdb가 잘 동작하지 않는 경우 한가지 - run-as에 문제가 있을때 해결법 (1편))



참고로 아래 절차를 성공적으로 수행하려면 에뮬레이터는 상관없지만 폰은 루팅이 되어 있어야 한다.

전편에서 run-as를 원위치로 넣을때 주의해야 할 점이 있다고 했는데 바로 file permission과 file owner ship이다.
원래 있던 run-as의 속성을 보면 다음과 같이 나타난다.
-rwsr-s--- root     shell       59848 2011-11-20 14:36 run-as

새로 만든 run-as를 위와 똑같이 속성을 맞추기 위해서 다음의 명령어를 실행해야 한다.

# chown 0.2000 run-as
# chmod 6750 run-as

참고사항: file permission에 대해 (다음 링크 참조: http://danielmiessler.com/study/unixlinux_permissions/)




-rwsr-s--- root     shell       59848 2011-11-20 14:36 run-as

참고 링크에서도 나와있지만 setuid가 존재하는 이유를 설명하면 사용자가 어떤 파일을 실행할때 권한이 부족해서 실행할 수 없는 경우가 있다. 사용자의 권한이 낮은 경우에도 불구하고 때때로 특정 작업을 할때 사용자의 권한을 높일 수 있도록 하는 방법을 도입한 것이 setid 항목이다. 의미는 setid의 항목이 1로 enable되어 있는 경우 해당파일(run-as)를 누가 접근하던지 상관없이 소유자의 권한이 주어지게 된다. 예를 들어 위와 같은 경우 uid가 일반 사용자이고 run-as의 소유자가 root로 되어 있다. 이때 s=0으로 되어 있으면 일반 사용자가 root가 소유자인 run-as를 읽으려 하면 권한 부족으로 못 읽지만 s=1로 되어 있으면 가능해진다. 이때 x=1이면 일반 사용자가 실행가능하게 된다.

참고로 s=1이고 x=0이면 문자표현에서는 대문자'S'로 표시되고 일반사용자가 파일을 실행할수 없게 된다.


Posted by kevino
,

어떤 ndk 프로젝트를 개발하다가 디버깅하기 위해 ndk-gdb를 실행하면 다음과 같은 오류를 내놓으면서 진행되지 않는 문제가 있다.

Found package name: com.louis.testnative

ABIs targetted by application: armeabi

Device API Level: 10

Device CPU ABIs: armeabi-v7a armeabi

Compatible device ABI: armeabi

Using gdb setup init: ./libs/armeabi/gdb.setup

Using toolchain prefix: /cygdrive/c/NVPACK/android-ndk-r8//toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-

Using app out directory: ./obj/local/armeabi

Found debuggable flag: true

Found device gdbserver: /data/data/com.louis.testnative/lib/gdbserver

ERROR: Could not extract package's data directory. Are you sure that

       your installed application is debuggable?


로그에서 보여지다시피 패키지는 찾았으나 아래 로그에서는 패키지를 못찾겠다고 에러를 출력하는데 이때 의심해 봐야 할 것이 /system/bin/run-as의 버그를 의심해야 한다. 

관련내용은 다음 링크(http://code.google.com/p/android/issues/detail?id=16391)


이미 패치가 나와 있는 관계로 수정해서 새로운 run-as를 만들어 이전과 똑같은 위치에 넣어두고 시스템을 재시작하면 오류가 해결된다.(확인요망)


새로 만든 run-as를 /system/bin에 넣어줄때 몇가지 주의해야 할 사항이 있는데 이는 별도의 게시물로 해서 좀더 자세하게 설명한다.



Posted by kevino
,

1. adb shell로 실행하는 명령어를 root권한으로 실행하게 만들려면

 참고(http://android.stackexchange.com/questions/5884/is-there-a-way-for-me-to-run-adb-shell-as-root-without-typing-in-su)

   안드로이드 루트 폴더에 default.prop이라는 파일을 찾아서 ro.secure=1로 되어 있는 부분을 ro.secure=0으로 바꿔주고 시스템을 재시작한다.(검증 되지 않음)

   재시작후 adb root를 실행하면 adbd가 root권한을 갖게 되어서 이후 adb shell [명령어] 들은 모두 root권한으로 실행되게 된다고 한다.


2. 

Posted by kevino
,

Building android native application

(Referred to following link: http://software.intel.com/en-us/articles/ndk-android-application-porting-methodologies/)



0. Prerequisites

1. Need to install Tegra android development pack from here

2. Install latest cygwin with development tools including gcc, unzip and etc.



1. Download a zipped source code from here.


2. Build apk file


   <Added>

    Set environment variable ANDROID_HOME to $ANDROID_SDK_DIR

   </Added>


    a. $ ndk-build NDK_DEBUG=1 APP_ABI="armeabi armeabi-v7a x86"

    b. $ android.bat update project --path .

           If you see a error something like "Error: The project either has no target set or the target is invalid.", then you need to define what target you want to use using "--target" option. For example, 

    b-1. $ android.bat update project --path . -t android-15

    c. $ ant -f build.xml debug


   <fix>

   f-1. If the compilation fails here with message "sdk.dir is not defined" then use following command to define sdk.dir manually.

    

        ant -Dsdk.dir=$ANDROID_HOME -f build.xml debug


   f-2. With cygwin env, check all project folder including subdirectory set to readable and writable.

        $(PROJECT_HOME) chmod -R a+rw *

    </fix>


   [Otional 1] If you want to check whether generated apk is valid or not, run below command and see the   output message. Below shows an example.

   o-1. 

unzip -l bin/HelloGdbServer-debug.apk

Archive:  bin/HelloGdbServer-debug.apk

  Length      Date    Time    Name

---------  ---------- -----   ----

     2200  06-09-2012 17:25   res/drawable/icon.png

      864  06-09-2012 19:06   res/layout/main.xml

     1500  06-09-2012 19:06   AndroidManifest.xml

     1296  06-09-2012 19:06   resources.arsc

     3976  06-09-2012 19:06   classes.dex

   125208  04-24-2012 23:20   lib/armeabi/gdbserver

    10052  06-09-2012 18:52   lib/armeabi/libhello-gdbserver.so

   125208  04-24-2012 23:20   lib/armeabi-v7a/gdbserver

    10060  06-09-2012 18:52   lib/armeabi-v7a/libhello-gdbserver.so

   214328  04-24-2012 23:20   lib/x86/gdbserver

     2504  06-09-2012 18:52   lib/x86/libhello-gdbserver.so

      881  06-09-2012 19:06   META-INF/MANIFEST.MF

      934  06-09-2012 19:06   META-INF/CERT.SF

      776  06-09-2012 19:06   META-INF/CERT.RSA

---------                     -------

   499787                     14 files



Debugging NDK application


In the project folder, run below command.

  

$ ndk-gdb --force --start --verbose

Android NDK installation path: /cygdrive/c/NVPACK/android-ndk-r8/

Using default adb command: /cygdrive/c/NVPACK/android-sdk-windows/platform-tools/adb

ADB version found: Android Debug Bridge version 1.0.29

Using ADB flags:

Using auto-detected project path: .

Found package name: com.example.hellogdbserver

ABIs targetted by application: x86

Device API Level: 15

Device CPU ABI: x86

Compatible device ABI: x86

Using gdb setup init: ./libs/x86/gdb.setup

Using toolchain prefix: /cygdrive/c/NVPACK/android-ndk-r8//toolchains/x86-4.4.3/prebuilt/windows/bin/i686-android-linux-

Using app out directory: ./obj/local/x86

Found debuggable flag: true

Found device gdbserver: /data/data/com.example.hellogdbserver/lib/gdbserver

Found data directory: '/data/data/com.example.hellogdbserver'

Found first launchable activity: .HelloGdbServer

Launching activity: com.example.hellogdbserver/.HelloGdbServer

## COMMAND: /cygdrive/c/NVPACK/android-sdk-windows/platform-tools/adb shell am start -n com.example.hellogdbserver/.HelloGdbServer

Starting: Intent { cmp=com.example.hellogdbserver/.HelloGdbServer }


.....

Error while mapping shared library sections:

libOpenglSystemCommon.so: No such file or directory.

Error while mapping shared library sections:

gralloc.goldfish.so: No such file or directory.

warning: Unable to find dynamic linker breakpoint function.

GDB will be unable to debug shared library initializers

and track explicitly loaded dynamic code.

(gdb) list

1       /*

2        * Copyright (C) 2010 Max Vilimpoc


(gdb) Line number 31 out of range; jni/hello-gdbserver.c has 30 lines.

c

Continuing.

[New Thread 2259]


Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 2259]

0xad5bd4af in Java_com_example_hellogdbserver_HelloGdbServer_invokeCrash (

    env=0x8534500, clazz=0xb49b6c70) at jni/hello-gdbserver.c:29

29              *crasher = 0xdeaddead;

(gdb) bt

#0  0xad5bd4af in Java_com_example_hellogdbserver_HelloGdbServer_invokeCrash (

    env=0x8534500, clazz=0xb49b6c70) at jni/hello-gdbserver.c:29

#1  0xb72a3b80 in ?? ()

#2  0x08534500 in ?? ()



Error case #1. 

If you cannot see debug symbols, need to check gdb.debug file whether it has wrong line ending codes. If such case, then run below command to convert dos style line ending to Unix style so that gdb can parse it to display symbols correctly. After this conversion, restart ndk-gdb command above then you will see debug symbol.


$ tr -d '\012' < libs/x86/gdb.setup | tr '\015\015' '\012\012' > libs/x86/gdb.setup


Posted by kevino
,
1. XawTV
If compilation succeed, then one can capture raw camera input data into file. Below is one example to save video.raw file during first 5 seconds.
./streamer -video /dev/video0 -t 0:5 -f 422 -s 640x480 -r 24 -o video.raw
 

2. One way to stream live webcam video using vlc

(Referred: http://superuser.com/questions/567016/live-streaming-using-ffmpeg)

Environment

OS: Ubuntu 13.1

Webcam : Microsoft Corp. LifeCam VX-1000

Web-server running on 192.168.1.20


Ok. now lets do the jobs to stream live webcam via vlc and webbrowser

First make sure vlc is installed.

sudo apt-get install vlc 

1
sudo apt-get install vlc

If you installed vlc, then you can execute cvlc. So run below command


1
cvlc v4l2:// :v4l2-vdev="/dev/video0" --sout '#transcode{vcodec=h264,vb=512,scale=1,acodec=none,venc=x264{aud,profile=high,level=60,keyint=15,bframes=0,ref=1,nocabac}}:duplicate{dst=std{access=livehttp{seglen=10,delsegs=true,numsegs=5,index=/var/www/live/mystream.m3u8,index-url=http://192.168.1.20/live/mystream-########.ts},mux=ts{use-key-frames},dst=/var/www/live/mystream-########.ts},dst=std{access=http,mux=ts,dst=:8082/video.mp4}}' &


Note: The above command may fail if you don't have "/var/www/live/" folder created and have right permission to access it.

After successful running the above command without any error, then use can access this live stream from web page addressed http://<serve_ip_address>/live.

Posted by kevino
,
#This guide is for Ubuntu 10.04 & 10.10; For other versions, please refer to the reference below.
#Reference: http://wiki.meego.com/Image_Creation
#1. Environment creation:
 1.1: sudo apt-get install yum rpm kpartx parted syslinux isomd5sum kvm zlib1g-dev squashfs-tools python2.6-dev qemu-arm-static python-urlgrabber

 1.2: add the below line to /etc/apt/sources.list
    For Ubuntu 10.04, add the below line to /etc/apt/sources.list 
      deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.04/ /

    For Ubuntu 10.10, add the below line to /etc/apt/sources.list 
      deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.10/ /

 1.3: Execute:
    sudo apt-get update
      [Should see some error "GPG error"]

 1.4: add the repository public key using the following command:
ssh-keygen -t rsa ;(If neccesary)
    gpg --keyserver subkeys.pgp.net --recv 0BC7BEC479FC1F8A 
    gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add - 

 1.5: Again execute:
    sudo apt-get update

 1.6: Meego Image Creator (MIC2) Installation
    sudo apt-get install mic2 


#Building a MeeGo chroot on Linux
#Reference: http://wiki.meego.com/SDK/Docs/1.2/Building_a_MeeGo_chroot_on_Linux

#1. Prepare chroot image:
  1.1 Unpack the image using MIC2
    sudo mic-chroot --unpack-only -s ~/meego-chroot <image file>.img

#2. Chroot into the image using mic-chroot: 
    sudo mic-chroot ~/meego-chroot

#3. Environment creation (into chroot):
 3.1: #sudo zypper in yum rpm kpartx parted syslinux isomd5sum kvm zlib1g-dev squashfs-tools python2.6-dev qemu-arm-static python-urlgrabber osc build

 3.2: Install Perl from MeeGo repo:
      #rpm -ivh --nodeps --force ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/ia32/packages/i586/perl-*.rpm
      #rpm -ivh --nodeps --force ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/ia32/packages/noarch/perl-*.rpm
      #rpm -ivh --nodeps ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/ia32/packages/i586/rpm-*.rpm
      #rpm -ivh --nodeps ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/ia32/packages/noarch/rpm-*.rpm

 3.3: Add URL to yup repos:
#cat <<REPO > /etc/yum.repos.d/meego-tools.repo
[meego-tools]
name=MeeGo Tools for Fedora
baseurl=http://repo.meego.com/MeeGo/tools/repos/fedora/12
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-meego
REPO

 3.3.1
ssh-keygen -t rsa
 3.4: add the repository public key using the following command (before create SSH key):
    #gpg2 --keyserver subkeys.pgp.net --recv 0BC7BEC479FC1F8A
    #gpg2 --export --armor 0BC7BEC479FC1F8A > /etc/pki/rpm-gpg/RPM-GPG-KEY-meego

 3.5: Meego Image Creator (MIC2) Installation
    #yum install mic2

 if you get asked to import the key do so: 

    warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 79fc1f8a: NOKEY
    meego-fedora/gpgkey                                                                        | 3.3 kB     00:00 ... 
    Importing GPG key 0x79FC1F8A:
    Userid: "Moblin Build (Moblin Build User) <build@moblin.org>"
    From  : /etc/pki/rpm-gpg/RPM-GPG-KEY-meego
    Is this ok [y/N]: y

 3.6: Meego Image Creator (MIC2) Update
    #yum update mic2

 3.7: Install MeeGo 1.2 config:
    Download \\runnfs003\LGE_Car\CM\Config\meego-1.2.conf to /usr/lib/build/configs
    #sudo ln -s -f /usr/lib/build/configs/meego-1.2.conf /usr/lib/build/configs/default.conf

 3.8: Exit from chroot:
    #exit



#4. Build chroot rpm:
 4.1: Chroot into the image using mic-chroot: 
    sudo mic-chroot ~/meego-chroot

 4.2: Create directories for rpmbuild:
    #cd ~
    #mkdir rpmbuild
    #cd rpmbuild
    #mkdir SOURCES
    #mkdir SPECS

 4.3: Unpack your SRPM (for exapmle kernel):
    #cd ~/rpmbuild/SOURCES
#cp /root/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/source/kernel-adaptation-intel-automotive-2.6.37.6-10.8.src.rpm ~/rpmbuild/SOURCES/
    #rpm2cpio kernel-adaptation-intel-automotive-2.6.37.6-10.8.src.rpm | cpio -i

 4.4: Move spec file from ~/rpmbuild/SOURCES to ~/rpmbuild/SPECS
    #mv kernel-adaptation-intel-automotive.spec ../SPECS/

 4.5: Change Source and/or spec files.

 4.6: Create SRMP:
    #cd ~/rpmbuild
    #rpmbuild -bs ~/rpmbuild/SPECS/kernel-adaptation-intel-automotive.spec

    Yuor SRMP into ~/rpmbuild/SRPMS/

 4.7: Build yor SRMP:
    #cd ~/rpmbuild/SRPMS
    FALSE: #sudo build --repository ~/Downloads/MeeGo_1.2.0.90.3.20110607/MeeGo/snapshots/stable/1.2.0.90/1.20.90.3.20110607.2/repos/oss/ia32/packages --arch i686 kernel-adaptation-intel-automotive-2.6.37.6-10.8.src.rpm
    CORCT: #sudo build --repository ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/ia32/packages/ --arch i686 kernel-adaptation-intel-automotive-2.6.37.6-10.8.src.rpm

    Your RPM into /var/tmp/build-root/home/abuild/rpmbuild/RPMS/i586/


or make -s CONFIG_DEBUG_SECTION_MISMATCH=y ARCH=x86 -j4 bzImage


 4.8: Exit from chroot:
    #exit


#5. Replace packages to meego repo:
 5.1: Copy your packages to meego repo, for example to ~/Downloads/MeeGo_1.2.0.90.3.20110607/MeeGo/snapshots/stable/1.2.0.90/1.20.90.3.20110607.2/repos/oss/ia32/packages/
 5.2: Recreate repo:
    sudo createrepo --update -g repodata/group.xml ~/Downloads/MeeGo_1.2.0.90.3.20110607/MeeGo/snapshots/stable/1.2.0.90/1.20.90.3.20110607.2/repos/oss/ia32/packages

#6. Add new packjages to meego repo:
 6.1: Create yuor directory:
    mkdir my_packages
 6.2: Copy your packages to this directory
 6.3: Create repo (or if your repo is present then add --update option):
    createrepo my_packages
 6.4: Add your repo to .ks file (for example meego-ivi-ia32-1.2.0.90.3.20110607.2.ks):   
    repo --name=my-repos --baseurl=file:///home/your_name/my_packages/ --save --debuginfo --source
 6.5: Add instalation line in section %packages to .ks file:
    my_package_name
    

#7. Create LiveCD image:
 7.1: Prepare workspace for build:
    sudo mic-create-bootstrap -n trunk -k /home/your_name/repocache -r file:///home/your_name/Download/MeeGo_1.2.0.90.3.20110607/MeeGo/snapshots/stable/1.2.0.90/1.20.90.3.20110607.2/repos/oss/ia32/packages/ -o /home/your_name/MeegoBuild/build
 7.2: Create LiveCD image:
    sudo mic-image-creator --bootstrap=/home/your_name/MeegoBuild/build/ --format=livecd --arch=i686 --config=meego-ivi-ia32-1.2.0.90.3.20110607.2.ks --cache=/home/your_name/MeegoBuild/repocache/ --run-mode=1


#8. GIT:
 8.1: Close git-repo, for example kernel:
   git clone ssh://your_id@denuls031.global.ad.teleca.com:29418/linux-2.6.37
 8.2: Checkout your branch:
   git checkout -b /devs/TRU/your_id_kernel_20110630 LGECAR0001_01.01R
 8.3: Create archiv from your source:
   git archive -o ./linux-2.6.37.tar --prefix=linux-2.6.37/ HEAD
   gzip -c linux-2.6.37.tar > linux-2.6.37.tar.gz
 or
   tar cf - linux-2.6.37 --exclude .git | gzip -c > linux-2.6.37.tar.gz



how to install X11 dev package

rpm -ivh ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/oss/ia32/packages/i586/xcb-proto-1.6-4.10.i586.rpm

To link with GLESv2 lib for pvr HW

rpm -ivh --nodeps --force ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/non-oss/ia32/packages/i586/pvr-bin-5.3.0.0039-1.1.i586.rpm

rpm -ivh --nodeps --force ~/Downloads/MeeGo/snapshots/stable/1.2.0.90/1.2.0.90.3.20110607.2/repos/non-oss/ia32/packages/i586/pvr-bin-devel-5.3.0.0039-1.1.i586.rpm
 
If faad plug in is necessary, then please install following

wget http://ftp.yandex.ru/mirrors/meego-community/meego1.2/i586/gst-plugins-bad-0.10.20-2.1.i586.rpm
wget http://ftp.yandex.ru/mirrors/meego-community/meego1.2/i586/faad2-libs-2.7-1.1.i586.rpm

rpm -ivh faad2-libs-2.7-1.1.i586.rpm
rpm -ivh --nodeps --force gst-plugins-bad-0.10.20-2.1.i586.rpm

export GST_DEBUG_DUMP_DOT_DIR=/tmp

Start playing 

gst-launch playbin uri=file:///home/thijs/Desktop/mewmew-vorbis-ssa.mkv
or
gst-launch-0.10 filesrc location=I\ Am\ Legend\ -\ Trailer.mp4 ! qtdemux ! MixVideoDecoderH264 ! vaimagesink

After play stopped
dot -Tsvg -o pipeline.svg 0:00:02.270914892-gst-launch.error.dot
 
 
 
Posted by kevino
,