Difference between revisions of "IntelliJ Setup"
Jump to navigation
Jump to search
imported>Mcroft |
imported>Mcroft |
||
Line 1: | Line 1: | ||
This guide assumes that you have a recent enough version of JAVA JDK, ANT, and IntelliJ Idea. Completing [[Compiling from Source]] is a requirement for this guide, although experienced developers can skip to whatever step is appropriate. | This guide assumes that you have a recent enough version of JAVA JDK, ANT, and IntelliJ Idea. Completing [[Compiling from Source]] is a requirement for this guide, although experienced developers can skip to whatever step is appropriate. | ||
− | #From the IntelliJ IDEA File Menu, choose New>New Project from Existing | + | #From the IntelliJ IDEA ***File*** Menu, choose ***New***>***New Project from Existing Sources...*** |
− | ##Choose the directory with the kolmafia build.xml file and press Open | + | ##Choose the directory with the kolmafia build.xml file and press ***Open*** |
− | ##Choose Create Project from Existing Sources and press Next | + | ##Choose ***Create Project from Existing Sources*** and press ***Next*** |
− | ##Enter the name KoLmafia and press Next | + | ##Enter the name KoLmafia and press ***Next*** |
##Verify that the project is visible to IDEA and press Finish | ##Verify that the project is visible to IDEA and press Finish | ||
#Add the Ant Build File | #Add the Ant Build File | ||
− | ## Open the Ant Toolbar | + | ## Open the Ant Toolbar Item (typically on the right side, and not very large) |
− | ## Choose the + button to add a build file | + | ## Choose the ***+*** button to add a build file |
## Choose build.xml from the file selector and press Open | ## Choose build.xml from the file selector and press Open | ||
## Verify that a list of ANT targets appears in the Ant Toolbar | ## Verify that a list of ANT targets appears in the Ant Toolbar | ||
#Check Project Settings | #Check Project Settings | ||
− | ## From the File Menu, choose Project Structure... | + | ## From the ***File*** Menu, choose ***Project Structure...*** |
− | ## Select Project on the Left Menu | + | ## Select ***Project*** on the Left Menu |
− | ### set the | + | ### set the ***Name*** to kolmafia |
− | ### set the Project SDK to any SDK version 1.8 or higher | + | ### set the ***Project SDK*** to any SDK version 1.8 or higher |
### set the project language level to 8 | ### set the project language level to 8 | ||
### set the project compiler output to the build subdirectory | ### set the project compiler output to the build subdirectory | ||
− | ## Select the libraries tab | + | ## Select the ***libraries*** tab |
− | ### Choose the + button to add library | + | ### Choose the ***+*** button to add library |
### Select Type: Java | ### Select Type: Java | ||
### Open the lib/jar directory and select all jars | ### Open the lib/jar directory and select all jars | ||
### Select add to kolmafia **default is to name the library after the first jar. This can be changed on the next step.** | ### Select add to kolmafia **default is to name the library after the first jar. This can be changed on the next step.** | ||
− | ### Select the | + | ### Select the ***Name*** field and enter "kol-external-jars" |
− | ## Select Modules in the Left Menu | + | ## Select ***Modules*** in the Left Menu |
− | ### In the Paths tab, select Inherit project compile output path | + | ### In the ***Paths*** tab, select ***Inherit project compile output path*** |
## Close the Project Settings window | ## Close the Project Settings window | ||
#c Add Run/Debug Configuration | #c Add Run/Debug Configuration | ||
− | ## From the Run Menu choose Edit Configurations... | + | ## From the ***Run*** Menu choose ***Edit Configurations...*** |
− | ## Choose the + button to add a new configuration | + | ## Choose the ***+*** button to add a new configuration |
− | ## Select Application | + | ## Select ***Application*** |
− | ## In the Name Field, enter "KoLmafia" | + | ## In the ***Name*** Field, enter "KoLmafia" |
− | ## In the Main Class Field, select the Selector [...], wait for it to populate the field, and choose KoLmafia | + | ## In the ***Main Class*** Field, select the Selector ***[...]***, wait for it to populate the field, and choose KoLmafia |
## Add any VM or program arguments needed (typically none) | ## Add any VM or program arguments needed (typically none) | ||
## for the working directory, add the directory of your KoLmafia user data (e.g. ~/Library/Application\ Support/kolmafia ) | ## for the working directory, add the directory of your KoLmafia user data (e.g. ~/Library/Application\ Support/kolmafia ) | ||
## set the "before launch" tasks at bottom (may need to scroll to see the bottom of the configurations window...) | ## set the "before launch" tasks at bottom (may need to scroll to see the bottom of the configurations window...) | ||
− | ### Select the + button at the bottom of the the before launch group | + | ### Select the ***+*** button at the bottom of the the before launch group |
− | ### Select Run ANT target *set.released.false* and drag it above the Build task. | + | ### Select Run ANT target ***set.released.false*** and drag it above the Build task. |
− | ### Select Run ANT target *set.version* and drag it above the Build task. | + | ### Select Run ANT target ***set.version*** and drag it above the Build task. |
− | ### Select Run ANT target *unset.properties*. Leave it below the Build Task | + | ### Select Run ANT target ***unset.properties***. Leave it below the Build Task |
− | # Choose *Apply* | + | # Choose ***Apply*** |
− | # Choose * Close* | + | # Choose ***Close*** |
Test by pressing the run arrow next to your config name in the toolbar at the top of the window. | Test by pressing the run arrow next to your config name in the toolbar at the top of the window. |
Revision as of 04:01, 23 October 2020
This guide assumes that you have a recent enough version of JAVA JDK, ANT, and IntelliJ Idea. Completing Compiling from Source is a requirement for this guide, although experienced developers can skip to whatever step is appropriate.
- From the IntelliJ IDEA ***File*** Menu, choose ***New***>***New Project from Existing Sources...***
- Choose the directory with the kolmafia build.xml file and press ***Open***
- Choose ***Create Project from Existing Sources*** and press ***Next***
- Enter the name KoLmafia and press ***Next***
- Verify that the project is visible to IDEA and press Finish
- Add the Ant Build File
- Open the Ant Toolbar Item (typically on the right side, and not very large)
- Choose the ***+*** button to add a build file
- Choose build.xml from the file selector and press Open
- Verify that a list of ANT targets appears in the Ant Toolbar
- Check Project Settings
- From the ***File*** Menu, choose ***Project Structure...***
- Select ***Project*** on the Left Menu
- set the ***Name*** to kolmafia
- set the ***Project SDK*** to any SDK version 1.8 or higher
- set the project language level to 8
- set the project compiler output to the build subdirectory
- Select the ***libraries*** tab
- Choose the ***+*** button to add library
- Select Type: Java
- Open the lib/jar directory and select all jars
- Select add to kolmafia **default is to name the library after the first jar. This can be changed on the next step.**
- Select the ***Name*** field and enter "kol-external-jars"
- Select ***Modules*** in the Left Menu
- In the ***Paths*** tab, select ***Inherit project compile output path***
- Close the Project Settings window
- c Add Run/Debug Configuration
- From the ***Run*** Menu choose ***Edit Configurations...***
- Choose the ***+*** button to add a new configuration
- Select ***Application***
- In the ***Name*** Field, enter "KoLmafia"
- In the ***Main Class*** Field, select the Selector ***[...]***, wait for it to populate the field, and choose KoLmafia
- Add any VM or program arguments needed (typically none)
- for the working directory, add the directory of your KoLmafia user data (e.g. ~/Library/Application\ Support/kolmafia )
- set the "before launch" tasks at bottom (may need to scroll to see the bottom of the configurations window...)
- Select the ***+*** button at the bottom of the the before launch group
- Select Run ANT target ***set.released.false*** and drag it above the Build task.
- Select Run ANT target ***set.version*** and drag it above the Build task.
- Select Run ANT target ***unset.properties***. Leave it below the Build Task
- Choose ***Apply***
- Choose ***Close***
Test by pressing the run arrow next to your config name in the toolbar at the top of the window.