added haskell build instruction
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -31,6 +31,7 @@ server/docker/containers/
|
||||
|
||||
# generic folder to ignore
|
||||
export/
|
||||
exports/
|
||||
|
||||
# Any testing file
|
||||
*test
|
||||
|
||||
@@ -96,7 +96,7 @@ main =
|
||||
p2prcAPI :: P2PRCapi
|
||||
p2prcAPI =
|
||||
MkP2PRCapi
|
||||
{ startServer = spawnProcP2PRC p2prcCmdName [ MkOptAtomic "--s" ]
|
||||
{ startServer = spawnProcP2PRC p2prcCmdName [ MkOptAtomic "-s" ]
|
||||
|
||||
, execListServers =
|
||||
execProcP2PRCParser [ MkOptAtomic "--ls" ] MkEmptyStdInput
|
||||
|
||||
@@ -116,5 +116,5 @@ eitherErrorDecode esa =
|
||||
-- assumes the program is ran inside the haskell module in p2prc's repo
|
||||
-- assumes that last path segment is "haskell" and that p2prc binary's name is "p2p-rendering-computation"
|
||||
p2prcCmdName :: String
|
||||
p2prcCmdName = "p2prc"
|
||||
p2prcCmdName = "p2p-rendering-computation"
|
||||
|
||||
|
||||
3
Makefile
3
Makefile
@@ -14,6 +14,9 @@ sharedObjects:
|
||||
python:
|
||||
sh build-python-package.sh
|
||||
|
||||
haskell:
|
||||
sh build-haskell.sh
|
||||
|
||||
clean:
|
||||
go clean -modcache
|
||||
rm -fr .go-build vendor result*
|
||||
|
||||
29
build-haskell.sh
Normal file
29
build-haskell.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
# This bash script consists of the manaul build script of haskell
|
||||
go build .
|
||||
|
||||
# Unset p2prc path
|
||||
unset p2prc
|
||||
|
||||
# Enter the haskell project
|
||||
cd Bindings/haskell
|
||||
# Remove exsisting export build
|
||||
rm -rf exports
|
||||
# Create exports directory
|
||||
mkdir exports
|
||||
# Copy current haskell project into the folder
|
||||
cp -rf . exports/
|
||||
# Copy p2prc binary inside haskell folder
|
||||
cp ../../p2p-rendering-computation exports/
|
||||
|
||||
cd exports
|
||||
|
||||
# Set p2prc variable
|
||||
echo export P2PRC=$PWD
|
||||
|
||||
export P2PRC=$PWD
|
||||
|
||||
./p2p-rendering-computation --dc
|
||||
|
||||
echo "Run the following commands in the directory: ${PWD}"
|
||||
echo "To build: cabal build"
|
||||
echo "To run sample program: cabal run"
|
||||
Reference in New Issue
Block a user