kit-sdq / intelligrade

IntelliJ-Plugin for grading with the artemis project
Eclipse Public License 2.0
8 stars 2 forks source link

Create custom distribution with the plugin included? #44

Open Luro02 opened 2 months ago

Luro02 commented 2 months ago

We do not want to install the grading plugin in the regular ide used for programming, especially because other third-party plugins might read the source code and send it to third parties.

The current solution is to clone the repository and execute gradlew on it. Suboptimal solution because it requires some working java installation.

For the eclipse plugin, we had an all-in-one zip file that included everything necessary and just had to be extracted.

Some potential references:

dfuchss commented 1 month ago

Currently, we want to stick to the local build as it provides us an easy mechanism for distribution :) Only Java 21 is needed to run Intelligrade now. No further installations :)

Luro02 commented 1 month ago

I am not happy with our hacky solution, especially because installed plugins are not preserved.

dfuchss commented 1 month ago

I mean .. we can do releases where the plugin is built easily, then this might be a manually installable plugin file. We can also put it to the plugin registry of idea .. I like that I do not need to install anything and during grading my colleagues also said that this process was nice .

Luro02 commented 1 month ago

By the way, I have found a potential way to create a custom distribution that would preserve installed things:

  1. On the IntelliJ site, you can select to download it as a ZIP instead of an installer: image

  2. In the ZIP file, you will have all the things the installer would install: image

  3. Note the plugins directory, where we could add additional plugins

  4. The text file Install-Windows-zip.txt is included with the Ultimate Edition, but not the Community Edition, which describes how you can change the paths for the cache and config directories:

    `Install-Windows-zip.txt`
IntelliJ IDEA

INSTALLATION INSTRUCTIONS
===============================================================================

  Windows Installation Instructions
  ------------------------------------------------------------------------------
  1. Unpack the IntelliJ IDEA distribution file that you downloaded to
     where you wish to install the program. We will refer to this destination
     location as your {installation home} below.

  2. [OPTIONAL] Add the "{installation home}\bin" to your %Path% environment
     variable so that you may start IntelliJ IDEA from any directory.

  3. [OPTIONAL] To adjust the value of JVM heap size, create
      "%APPDATA%\JetBrains\IntelliJIdea2024.2\idea64.exe.vmoptions" file,
      and set the -Xms and -Xmx parameters. To see how to do this,
      you can reference the vmoptions file under "{installation home}\bin" as a model.

  4. Open the console, `cd` into "{installation home}\bin", and type:

       idea.bat

     to start the application. As a side effect, this will initialize various
     configuration files in the "%APPDATA%\JetBrains\IntelliJIdea2024.2" directory.

  [OPTIONAL] Changing location of "config" and "caches" directories
  ------------------------------------------------------------------------------
  By default, IntelliJ IDEA stores all your settings under the "%APPDATA%\JetBrains\IntelliJIdea2024.2"
  directory and uses "%LOCALAPPDATA%\JetBrains\IntelliJIdea2024.2" as a data cache.
  If you want to change these settings,

  1. Open a console and `cd` into "%APPDATA%\JetBrains\IntelliJIdea2024.2"

  2. Create the file "idea.properties" and open it in a text editor.
     Set the idea.system.path and/or idea.config.path variables as desired,
     for example:

     idea.system.path=${user.home}/.IntelliJIdea2024.2/system
     idea.config.path=${user.home}/.IntelliJIdea2024.2/config

  3. Note that we recommend storing caches on a local disk with at least 1GB of free space.

Enjoy!

-IntelliJ IDEA Development Team

one would have to check if that works with the community edition as well, but I think that it does.

Luro02 commented 1 month ago

I mean .. we can do releases where the plugin is built easily, then this might be a manually installable plugin file. We can also put it to the plugin registry of idea .. I like that I do not need to install anything and during grading my colleagues also said that this process was nice .

It makes a difference if you have to use it once every semester or every two weeks. If I am going to spend so much time in there grading things, then I want it to be nice, by having my desired theme and some plugins installed, and the inspections configured to highlight things I might miss otherwise.

dfuchss commented 1 month ago

I mean .. we can do releases where the plugin is built easily, then this might be a manually installable plugin file. We can also put it to the plugin registry of idea .. I like that I do not need to install anything and during grading my colleagues also said that this process was nice .

It makes a difference if you have to use it once every semester or every two weeks. If I am going to spend so much time in there grading things, then I want it to be nice, by having my desired theme and some plugins installed, and the inspections configured to highlight things I might miss otherwise.

The configuration stays in the project . At least that was the case for me. But yes I think we can easily introduce releases with plugin for manual install and plugin in the store :)