This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
EveryOS's profile picture

Setting up the CC development environment [Windows]

Started by EveryOS, 25 January 2018 - 04:58 PM
EveryOS #1
Posted 25 January 2018 - 05:58 PM
Now that CC is opensource, we can edit it, granted we set up the environment. Sadly, I did not see a setup.md file, so I had to figure out how to get it set up myself.

Technically, we can set this up on eclipse, but it is much easier just to use IntelliJ.

First, you will need to download the following files:
IntelliJ
Java 8 (You may need to uninstall Java 9)
Java 8 SDK - You should choose the version that matches your Java
git bash

Run each of those, and wait for them to install.
Next, open git bash and run the following:
git clone https://github.com/d...mputerCraft.git

When it is done, leave it open, we will use it again.

Open IntelliJ and choose 'import project'. Navigate to the computercraft folder and choose 'build.gradle'
I think it might ask you where your SDK is, if it is 64x it will be in Program Files/Java, labeled jdk1.80_161 (or whatever patch you have)
It will start syncing, when the bottom window says it is done syncing, close IntelliJ.
Now you must type ./setup.bat into git bash
When that finishes, open IntelliJ again.
Goto file>project settings>project. Change the project language level from 9 to 8.
Goto Run>Edit Configs, goto new (+)>Application.
In name, type Forge_Client
In Main Class, type GradleStart
In vm options, type -Xms500m
In module dropdown, choose ComputerCraft_main
In Jre, choose default (Maybe it was here that it made you choose the JDK? just look at instructions above)
Click Apply, then run
TADA

CC source is in src folder, you can edit it.

Tell me if I made a mess up.

Correction: set module to computercraft_main, not computercraft. Updated in instructions.
Edited on 25 January 2018 - 10:42 PM
ThreeSpy712 #2
Posted 24 March 2018 - 01:05 PM
Thanks
EveryOS #3
Posted 24 March 2018 - 03:23 PM
Your welcome
theoriginalbit #4
Posted 30 March 2018 - 09:29 AM
Now that CC is opensource, we can edit it, granted we set up the environment. Sadly, I did not see a setup.md file, so I had to figure out how to get it set up myself.

Technically, we can set this up on eclipse, but it is much easier just to use IntelliJ.

First, you will need to download the following files:
IntelliJ
Java 8 (You may need to uninstall Java 9)
Java 8 SDK - You should choose the version that matches your Java
git bash

Run each of those, and wait for them to install.
Next, open git bash and run the following:
git clone https://github.com/d...mputerCraft.git

When it is done, leave it open, we will use it again.

Open IntelliJ and choose 'import project'. Navigate to the computercraft folder and choose 'build.gradle'
I think it might ask you where your SDK is, if it is 64x it will be in Program Files/Java, labeled jdk1.80_161 (or whatever patch you have)
It will start syncing, when the bottom window says it is done syncing, close IntelliJ.
Now you must type ./setup.bat into git bash
When that finishes, open IntelliJ again.
Goto file>project settings>project. Change the project language level from 9 to 8.
Goto Run>Edit Configs, goto new (+)>Application.
In name, type Forge_Client
In Main Class, type GradleStart
In vm options, type -Xms500m
In module dropdown, choose ComputerCraft_main
In Jre, choose default (Maybe it was here that it made you choose the JDK? just look at instructions above)
Click Apply, then run
TADA

CC source is in src folder, you can edit it.

Tell me if I made a mess up.

Correction: set module to computercraft_main, not computercraft. Updated in instructions.

Just run the setup.bat file on Windows, and the setup.sh file on macOS/Linux after you've cloned the repo. It will perform all the IntelliJ setup for you.