diff --git a/Building_RomRaider_VSCode.md b/Building_RomRaider_VSCode.md new file mode 100644 index 00000000..f1748ab4 --- /dev/null +++ b/Building_RomRaider_VSCode.md @@ -0,0 +1,89 @@ +Here are steps to setup Visual Studio Code to build and debug Romraider. + +1. Download Git for your operating system. You'll use git to clone the Romraider repository. + > https://git-scm.com/downloads + +1. Download a Java OpenJDK 8 32bit version, several options are available: RedHat, Oracle, Adopt, etc. I use AdoptOpenJdk 8 just because I don't to register to download it. + + When installing if there's a option to set JAVA_HOME variable, have the installer it. You may have to do it manually later, Adopt lets you set this during OpenJDK install. + + > Links: + > + > [Redhat OpenJdk](https://developers.redhat.com/products/openjdk/download?extIdCarryOver=true&sc_cid=701f2000000RWTnAAO) + > + > [Adopt OpenJdk](https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=openj9) + +1. Download ANT: https://ant.apache.org/bindownload.cgi + > - 1.10.7 release - requires minimum of Java 8 at runtime + > - Unzip **ANT** to a known location. + > + > For example, I use windows and decided on: 'C:\Users\Walter\ANT' + +1. Add '**ANT_HOME**' as a System Environment variable execluding the quotes. + > - For the value use the unzipped ANT path from the previous step. For Example: 'C:\Users\\ANT' + > - If you do not know how to add a environment variable, see: https://docs.oracle.com/javase/tutorial/essential/environment/paths.html + +1. Edit the existing '**PATH**' System Environment, add the file directory you unzipped ANT to with the bin directory appended. + > For Example: 'C:\Users\\ANT\bin' + +1. Download & Install '**Visual Studio Code**': + > https://code.visualstudio.com/ + +1. Download & Install '**Java Extension Pack**' VsCode Extension: + > https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack + +1. Optional: Download & Install '**Ant Target Runner**' Extension: https://marketplace.visualstudio.com/items?itemName=nickheap.vscode-ant + +1. Open the Romraider folder in VS Code. Ensure the Explorer panel is open. + > 'View Menu > Explorer' + +1. Open the terminal window '**View Menu > Terminal**' + > - Type the following and press enter: ant all + > - Alternately, you can use the 'Ant Target Runner' panel, it should be underneath the files list. Right click the 'all' node and select 'Run Ant Target' + > - *You will need to do one of the above each time you make a code change.* + +1. Open the Debug Panel. + > 'View Menu > Debug' + +1. On the debug panel, click the '**create and launch.json file**' link. You may get a popup asking for Environment select Java. This will generate a launch.json file and open it. + +1. When this file is generated, you'll need to delete all but two json entries. You want to keep ECUExec and EcuLoggerExec. The end result should look similar to below. + ``` + { + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "java", + "name": "Debug (Launch)-ECUExec", + "request": "launch", + "mainClass": "com.romraider.ECUExec", + "projectName": "romraider" + }, + { + "type": "java", + "name": "Debug (Launch)-EcuLoggerExec", + "request": "launch", + "mainClass": "com.romraider.logger.ecu.EcuLoggerExec", + "projectName": "romraider" + } + ] + } + +1. At the top of the debug panel, you'll see a label '**Run And Debug**' and a drop down box. + > - From the dropdown box select the appropriate option depending on whether you want to debug Romraider Editor or Romraider Logger. + > - Press the play button next to the dropdown or press F5. + > - You will likely get a popup: 'Build failed, do you want to continue?' Click Proceed. + > - Romraider should launch. + +1. If you're still here, Congrats! You are now able to debug Romroader. You can set breakpoints in the source code, and step through the code. + +1. If the steps above didn't work, please review them to make sure you didn't miss anything. If it still doesn't work contact me via my github account below. + +Thanks, + +Walter Stypula + +https://github.com/walterstypula \ No newline at end of file diff --git a/Building_RomRaider_VSCode.txt b/Building_RomRaider_VSCode.txt deleted file mode 100644 index 70b7b73e..00000000 --- a/Building_RomRaider_VSCode.txt +++ /dev/null @@ -1,74 +0,0 @@ -Here are steps to setup Visual Studio Code to build and debug Romraider. - -1) Download Git for your operating system: https://git-scm.com/downloads - a) You'll use git to clone the Romraider repository. - -2) Download a Java OpenJDK 8 32bit version, several options are available: RedHat, Oracle, Adopt, etc. I use AdoptOpenJdk 8 just because I don't to register to download it. - a) https://developers.redhat.com/products/openjdk/download?extIdCarryOver=true&sc_cid=701f2000000RWTnAAO - b) https://adoptopenjdk.net/releases.html?variant=openjdk8&jvmVariant=openj9 - c) When installing if there's a option to set JAVA_HOME variable, have the installer it. You may have to do it manually later Adopt lets you set this during OpenJDK install. - -3) Download ANT: https://ant.apache.org/bindownload.cgi - a) 1.10.7 release - requires minimum of Java 8 at runtime - b) Unzip ANT to a known location. For example, I use windows and decided on: 'C:\Users\\ANT' - -4) Add 'ANT_HOME' as a System Environment variable execluding the quotes. - a) For the value use the unzipped ANT path from the previous step. For Example: 'C:\Users\\ANT' - b) If you do not know how to add a environment variable, see: https://docs.oracle.com/javase/tutorial/essential/environment/paths.html - -5) Edit the existing 'PATH' System Environment, add the file directory you unzipped ANT to with the bin directory appended. For Example: 'C:\Users\\ANT\bin' - -6) Download & Install 'Visual Studio Code': https://code.visualstudio.com/ - -7) Download & Install 'Java Extension Pack' VsCode Extension: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack - -8) Optional: Download & Install 'Ant Target Runner' Extension: https://marketplace.visualstudio.com/items?itemName=nickheap.vscode-ant - -9) Open the Romraider folder in VS Code. Ensure the Explorer panel is open. 'View Menu > Explorer' - -10) Open the terminal window 'View Menu > Terminal' - a) Type the following and press enter: ant all - b) Alternately, you can use the 'Ant Target Runner' panel, it should be underneath the files list. Right click the 'all' node and select 'Run Ant Target' - c) *You will need to do one of the above each time you make a code change.* - -11) Open the Debug Panel. 'View Menu > Debug' - -12) On the debug panel, click the 'create and launch.json file' link. You may get a popup asking for Environment select Java. This will generate a launch.json file and open it. - -13) When this file is generated, you'll need to delete all but two json entries. You want to keep ECUExec and EcuLoggerExec. The end result should look similar to below. - { - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "java", - "name": "Debug (Launch)-ECUExec", - "request": "launch", - "mainClass": "com.romraider.ECUExec", - "projectName": "romraider" - }, - { - "type": "java", - "name": "Debug (Launch)-EcuLoggerExec", - "request": "launch", - "mainClass": "com.romraider.logger.ecu.EcuLoggerExec", - "projectName": "romraider" - } - ] - } - -11) At the top of the debug panel, you'll see a label 'Run And Debug' and a drop down box. - a) From the dropdown box select the appropriate option depending on whether you want to debug Romraider Editor or Romraider Logger. - b) Press the play button next to the dropdown or press F5. - c) You will likely get a popup: 'Build failed, do you want to continue?' Click Proceed. - d) Romraider should launch. - -12) If you're still here, Congrats! You are now able to debug Romroader. You can set breakpoints in the source code, and step through the code. - -13) If the steps above didn't work, please review them to make sure you didn't miss anything. If it still doesn't work contact me via my github account below. - -Thanks, -Walter Stypula -https://github.com/walterstypula \ No newline at end of file