-
Notifications
You must be signed in to change notification settings - Fork 185
Compile instructions
Pascal Coin edited this page Jan 21, 2021
·
15 revisions
This page contains guide to compile PascalCoin for all platforms.
- In Windows, it's tested with XP, Windows 7 and Windows 10.
- In Linux, is tested on Ubuntu 16.04.1 and 20.04 64 bits
- You can compile with:
- Delphi (10.3.2 Community edition) GUI version
- FPC (Free Pascal Compiler 3.2.0) DAEMON
- Lazarus (2.0.10) GUI version & DAEMON & WINDOWS SERVICE
- Cross-compatible if using Lazarus (Windows + Linux + Mac) (Note: Not tested in Mac, only Windows or Ubuntu)
- Create a source code folder, we will call this folder "SOURCE_CODE_FOLDER"
- Download Pascal Coin source code from: https://github.com/PascalCoin/PascalCoin (use latest Release branch).
- Unzip or put source code in SOURCE_CODE_FOLDER
- You don't need to obtain the Blockchain, but it is quicker if you have downloaded it rather than waiting for the App to download it from other nodes...
- You will find a valid BlockChain at SourceForge Pascal Coin downloads: https://sourceforge.net/projects/pascalcoin/files/ - Search for "BlockChain" file
- Blockchain must be unziped and stored in the Pascal Coin data folder: (We will call it "PASCALCOIN_DATA_FOLDER")
- Pascal Coin data folder for Windows: c:\Users(your user)\AppData\Roaming\PascalCoin\Data
- Pascal Coin data folder for Linux: /home/(your user)/PascalCoin/Data
- REMEMBER TO PUT BLOCKCHAIN IN CORRECT "PASCALCOIN_DATA_FOLDER"
- REMEMBER TO GRANT PERMISIONS TO USER AT "PASCALCOIN_DATA_FOLDER"
Free Pascal Compiler is useful to compile PascalCoin on linux servers, otherwise you can use Lazarus (recommended use latests Lazarus version)
- On Linux server edition, install FPC (Free Pascal Compiler) v3.2.0
(Optionally, look at this old tutorial: http://www.freepascal.org/docs-html/user/usersu5.html )
- PLEASE NOTE: Use latest FreePascal version! (Do not use direct links, navigate and find latest versions)
- Download source code from: https://sourceforge.net/projects/freepascal/files/Linux/3.2.0/ (or latest)
- Download fpc-3.2.0.x86_64-linux.tar (or correct CPU/System version) (or latest)
- Unzip file:
tar -xvf fpc-3.2.0.x86_64-linux.tar
(or downloaded version) - install fpc:
./install.sh
- check that FreePascal is installed by executing:
fpc
(will show fpc options) - Version used and tested with this tutorial is FreePascal 3.0.4
(In Delphi, you can only run on Windows)
- Just open Delphi, open project "pascalcoin_wallet_classic.dpr" located at "SOURCE_CODE_FOLDER"
- Build + Compile
- Exe file will be: "pascalcoin_wallet_classic.exe"
- Just open Lazarus (tested with Lazarus 2.0.10 and FPC 3.2)
- Open project "pascalcoin_wallet_classic.lpi"
- Check that
- Build + Compile
- Executable file will be: "pascalcoin_wallet_classic"
- Free Pascal Compiler is useful for execute as a daemon in Linux server
- go to "SOURCE_CODE_FOLDER"
- run command
fpc -Fucore -Fulibraries/synapse -Fulibraries/pascalcoin -Fulibraries/sphere10 -Fulibraries/generics.collections -Fulibraries/hashlib4pascal -Fulibraries/paszlib -Fulibraries/abstractmem -Fulibraries/regex -Tlinux -O- -v0 -opascalcoin_daemon pascalcoin_daemon.pp
- Execute like a daemon with
nohup ./pascalcoin_daemon -r &
- Make sure you have OpenSSL crypto lib in base daemon dir (file "libcrypto.so.1.1")
- Open & Compile
pascalcoin_daemon.lpi
using Lazarus - Install service executing
pascalcoin_daemon -i