Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 3.14 KB

CONTRIBUTING.md

File metadata and controls

57 lines (39 loc) · 3.14 KB

PCPanel contribution

This repository is based on the decompiled source code of the original app. The parts that couldn't be decompiled (dll's and sndctrl.exe) have been replaced with custom native implementations. The source code for those parts are either Java-JNA implementations or in the src/main/cpp directory.

Running in IntelliJ

  1. Import the project
  2. Either
    1. Install JavaFX manually:
      1. Install JavaFX Windows, Linux
      2. Setup the JAVAFX_HOME environment variable to the javafx-sdk-x.y.z directory
    2. Use Liberica JDK (Full JDK option, minimal version 17). It has JavaFX included.
  3. Use the PCPanel run configuration

For Linux you will also need to do the steps from the Linux instructions Installation step.

Other IDE's

Probably the same, for the run configuration the important part is the VM options:

--module-path="${JAVAFX_HOME}\lib" --add-modules=javafx.controls,javafx.fxml --add-exports javafx.controls/com.sun.javafx.scene.control.skin.resources=ALL-UNNAMED --add-exports javafx.base/com.sun.javafx.event=ALL-UNNAMED

Adding the skipfilecheck command line argument ensures that you can debug while having the installed version running at the same time (otherwise starting in the IDE will open the installed version).

It's also possible to change the application.properties (or create an application-default.properties so it doesn't get committed) with the following:

application.root=${user.home}/.pcpaneldev/

This will make the application use a different directory for the settings and profiles so that you don't overwrite your non-development profile while testing.

Build installer

  1. Install Liberica JDK. The Full JDK option is required, at least version 17.
    • Verify by opening a fresh Terminal/Command Prompt and typing java --version.
  2. Install Apache Maven 3.6.3 or later and make sure it's on your path.
    • Verify this by opening a fresh Terminal/Command Prompt and typing mvn --version.
  3. install Wix 3 binaries.
    • Windows only, not needed for Linux
    • Installing Wix via the installer should be sufficient for jpackage to find it.
  4. Final step: run mvn clean install

Native code (Windows only)

There is a visual studio solution in the src/main/cpp directory. The solution seems to have a single setting that has a hardcoded path which is the JNI include directory.

This can be changed by clicking the project properties and changing Configuration properties > C/C++ > General > Additional Include Directories.

The SndCtrlTest project is there because Access Violations within JNI just close the application. Running it with the Test code might actually show the error.

An EnableFullDump.reg registry file is included to enable full dumps when the application crashes. This can be used to debug the native code.