Plastic 2.0 on Mac

Thursday, March 13, 2008 0 Comments

The introduction of Plastic 2.0 saw the inclusion of MySQL as the server back-end to store the repository. Not only does this open up a number of excellent possibilities and improvements for Plastic, but also makes the Mac OS X server functional. Plastic 2.0 is still in development but stable enough that following a few simple steps, we can get the client and server operational on the Mac.

Let's start by downloading all the components we'll need.

Begin by downloading the Plastic 2.0 Binary file archive from Codice Labs and extract the zip file. I chose to put it into my user directory as ~/Plastic

Next we'll need to grab Mono 1.2.6_6 from the Mono Project. After downloading, run the installer package.

Finally, we need a MySQL server. The quickest to get going is MAMP 1.7.1. Install this into Applications.

Now it's time to do some configuration of the Plastic server. Launch the MAMP application. This will fire up the MySQL server and keep it running as long as MAMP is running . By default it uses port 8889.  In the directory ~/Plastic/server edit the file db.conf to be:

<DbConfig>
    <ProviderName>mysql</ProviderName>
    <ConnectionString>
         Server=localhost;Port=8889;User ID=root;Password=root;
         Database={0};Pooling=true
     </ConnectionString>
    <DatabasePath></DatabasePath>
</DbConfig>

The line starting Server= contains the MySQL server's network address and account details. I've used the defaults for MAMP. To configure the Plastic server, launch Terminal and issue the commands:

$ cd ~/Plastic/server
$ mono clconfigureserver.exe 

Follow the on screen prompts. I entered 1 for English language, then 1 for NameWorkingMode and left the default port at 8084.

Now start Plastic server with:

$ mono plasticd.exe --console

The resulting output should be:

Creating ServerSink
Plastic SCM daemon up. 2.0.85.0

From a second terminal we now setup the client. Start by configuring the client with:

$ mono clconfigureclient.exe

Again following the prompts, I used 1 for English, 1 for NameWorkingMode and localhost for the server address with port 8084.

Finally, check that the connection is working with:

$ mono cm.exe lregrep

The output should be:

 default 1 default localhost:8084

You now have a working Plastic repository and command line client.

To start the GUI use:

$ mono plastic.exe

Make a workspace and off you go.

0 comentarios: