Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/perforce/p4ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
hjain-perforce committed May 26, 2023
2 parents 6698485 + b220284 commit f05c779
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions build.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,44 @@
# Building P4Ruby from Source


Note: Make sure you have following packages installed on your system:
a. build-essential
b. libssl-dev

1. Download the Perforce C++ API from the Perforce FTP site at
<ftp://ftp.perforce.com/perforce>. \
<ftp://ftp.perforce.com/perforce> . \
The API archive is located in release and platform-specific subdirectories and is named
*"p4api-glibc2.3-openssl1.1.1.tgz".<br><br>*
*"p4api-glibc2.3-openssl1.1.1.tgz".*

**Note: 32-bit builds of P4Ruby require a 32-bit version of the C++ API and a 32-bit version of Ruby.\
           64-bit builds of P4Ruby require a 64-bit version of the C++ API and a 64-bit version of Ruby.<br><br>**
Unzip the archive into an empty directory.<br><br>
           64-bit builds of P4Ruby require a 64-bit version of the C++ API and a 64-bit version of Ruby.**

Unzip the archive into an empty directory.

2. Extract the P4Ruby API archive into a new, empty directory.<br><br>
2. Extract the P4Ruby API archive into a new, empty directory.

3. Execute the build commands:<br><br>
3. Execute the build commands:

*bundle install \
bundle exec rake compile -- --with-p4api_dir=<absolute path to Perforce C++ API> \
           --with-ssl-dir=<absolute path to OpenSSL libraries matching Perforce C++ API><br><br>*
           --with-ssl-dir=<absolute path to OpenSSL libraries matching Perforce C++ API>*

OR pass through environment variables\
*bundle exec rake compile p4api_dir=<*absolute path to Perforce C++ API*><br><br>*

**Note: If the --p4api_dir flag is not provided, P4Ruby will attempt\
to download and extract correct version of Perforce C++ API<br><br>**
*bundle exec rake compile p4api_dir=<absolute path to Perforce C++ API>*

4. Test your distribution.<br><br>
**Note: If the --p4api_dir flag is not provided, P4Ruby will attempt
to download and extract correct version of Perforce C++ API**

*bundle exec rake test<br><br>*
4. Test your distribution.

Tests require the perforce server binary (p4d) present in the path.<br><br>
*bundle exec rake test*

5. Install P4Ruby into your local gem cache:<br><br>
Tests require the perforce server binary (p4d) present in the path.

5. Install P4Ruby into your local gem cache:

*bundle exec rake install*
*bundle exec rake gem*\
*gem install pkg/p4ruby\*.gem -- --with-p4api_dir=<absolute path to Perforce C++ API>*

## SSL support

Expand All @@ -41,4 +47,4 @@ C++ API has been compiled with this support.

If the P4Ruby build detects that OpenSSL is available, it will be
included by default. If you want to use libraries deployed to nonstandard
paths, use the --ssl_dir=<*path to Openssl include and lib folders*>
paths, use the --ssl_dir=<*path to Openssl include and lib folders*>

0 comments on commit f05c779

Please sign in to comment.