Showing posts with label Perforce. Show all posts
Showing posts with label Perforce. Show all posts

Tuesday, January 27, 2009

Carbide.c++ 2.0 and P4 synchronization

Carbide.c++ 2.0 has been launched on NewLC for quite a while since around December and with new license. It is now available for free for OEM, Developer and Professional edition! Recently, I read stories about Nokia 5800 XpressMusic which based on S60 5th edition for Touch UI. (I think, touch screen becomes trendy since iPhone...everyone goes touch screen now. However, I personally enjoy using the softkey doing things. Perhaps, because my first experience with touch screen for mobile phone, Sony Ericsson P800 - based on UIQ, was not so good.) This new XpressMusic looks very promising, it is thiner than N95. (One thing I dislike about N95 8GB - the phone's thickness.) My idea is just try to build my S60 based on 3rd Edition application to 5th Edition in the future. Although I don't have any 5th Edition in hand...but make the application running with emulator is also fun.

Perhaps, this is a good time to prepare new development environment for our project.

1. Install Carbide.c++ 2.0.
Grasp Carbide.c++ 2.0 from here.

2. Install SCM Plugin for Carbide.
After finishing with Carbide installation, we need P4WSAD, the Perforce Plug-in for Eclipse.
- Go to Help -> Software Updates -> Find and Install
- Enter http://www.perforce.com/downloads/http/p4-wsad/install/ as a new site. Follow the instruction.
- After the installation ready, you can see 2 jar files: com.perforce.p4api_xxxx.jar and com.perforce.team.core_xxxx.jar in plugins directory under your carbide installation directory.

3. Synchronize Carbide.c++ with our SCM.
- Go to Project Explorer, right click at the project and select Team->Share Project.
- From the repository list, you can see list of available repositories, select Perforce.
- Perforce setting parameters can be taken from your P4 client.

Now, we have our environment ready. (I rebuilt my project with Carbide.c++ 2.0 with my old S60 3rd Edition, there was no problem).

4. Install S60 5th Edition SDK
- Here is the link to Nokia's forum to download the 5th Edition SDK

5. Install the SDK plugin.
- Right now, I still have not found any plugin for 5th Edition of S60.

You need to edit your Carbide's project to have a configuration for 5th Edition and the rest depends on your application.


Lately, I have been so busy in the office. Therefore, I have no time to continue on my package updating story but I will try to finish the second part as soon as I can.


---------------
"I spend almost as much time figuring out what's wrong with my computer as I do actually using it." Clifford Stoll, Silicon Snake Oil

Thursday, December 11, 2008

Obligatory Perforce commands

I am used to with P4V or P4Win but from time to time, I need the "p4" from command line to pass the output to the script.
I found the following p4 commands are obligatory.

To view the current p4 setting, type:
>p4 info

To view it from windows environment:
>set

You can see P4CLIENT and other P4's setting parameters.

To remove p4 client :
>p4 client -d client_name

Otherwise try to create a new one or edit the default one with :
>p4 client

it will give you a temp file to be edited. You can then change to any new client's names
which map to your mapping directories. We usually simply change the "client" and "view" entries where the client can be new name while views are your mappings.
(mind you, take care not to put the new line ending at the end of your views entries otherwise you will get the error message)

Or set it with:
>set P4CLIENT=new_client_name

Now, check if the P4CLIENT is set properly
>echo %P4CLIENT%

Normally, we just need the setting to P4USER (default is automatic set from windows's login account), P4EDITOR (default is notepad for Windows) and P4PORT (it must be manually set). However under Linux, we might need to explicitly export the P4USER in .bashrc if it is not set.
This is my case, I simply added the following lines in my .bashrc:

export P4USER=pattreeya
export P4EDITOR=vim
export P4PORT=scm-srv:1666


To list all p4 environment variables used by Perforce:
>p4 help environment

To diff the local files and the ones in depot, type:
>p4 diff -du20 > diff.txt
The option -du is the unified different and contain 20 lines prior each difference.

To diff between two branches, try:
>p4 diff2 -dub20 -u //work/dev_01/... //work/dev_02/... > diffs.txt

To list the current workspace owned by a user:
>p4 clients -u username

For more detail of p4 commands, type "p4" or "p4 help simple" or "p4 help commands".