Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: peous on September 10, 2014, 07:26:37 pm

Title: Code::Blocks <-> Perforce integration: Checkout script
Post by: peous on September 10, 2014, 07:26:37 pm
Just a simple tip to checkout files from editor when you use Code::Blocks and Perforce.
This is tested under Ubuntu 14, but should work for Windows also.

Use Tools/Configure tools/Add
Name it: Chechout current file
Executable: p4
Paramters: -c your_workspace_name -u your_user_name -p server_name:1666 edit ${ACTIVE_EDITOR_FILENAME}
Option: Launch hidden with output redirected

You may need to type in a terminal
p4 -c XXX -u XXX  -p XXX:1666 login
once, to enter your password.

Note: You need download & put p4 executable somewhere you can access it

(under Linux)
Download P4 command line from Perforce website, for you processor type, then
in a terminal, type (given that there is a p' file in your Download folder)

sudo cp ~/Downloads/p4 /usr/local/bin
sudo chmod +x /usr/local/bin/p4

Have fun !

(http://s11.postimg.org/fkv59qptf/p4_checkout_for_code_blocks.png)