diff --git a/WINDOWS-DEPLOYMENT.md b/WINDOWS-DEPLOYMENT.md new file mode 100644 index 0000000..1a7e69e --- /dev/null +++ b/WINDOWS-DEPLOYMENT.md @@ -0,0 +1,117 @@ +# Windows Deployment Guide for SimpliNote4j + +This guide explains how to create and deploy SimpliNote4j as a Windows application. + +## Prerequisites + +- Java 17 or later installed +- Maven 3.6+ installed +- Windows 10/11 (for creating Windows installers) + +## Building the Application + +### 1. Standard JAR Build +```bash +./mvnw clean package +``` +This creates a fat JAR with all dependencies at `target/SimpliNote4j-1.0.0.jar` + +### 2. Quick Windows Deployment + +**For End Users:** +1. Copy `target/SimpliNote4j-1.0.0.jar` to a folder on Windows +2. Copy `run-windows.bat` to the same folder +3. Double-click `run-windows.bat` to launch the application + +**System Requirements:** +- Java 17+ must be installed and in PATH +- JavaFX modules are included in the JAR + +### 3. Creating Windows Installer (Advanced) + +If you have a Windows development environment with jpackage available: + +```bash +# First build the application +./mvnw clean package + +# Create Windows installer (requires Windows environment) +./mvnw jpackage:jpackage +``` + +This will create: +- A Windows `.exe` installer in `target/installer/` +- The installer includes a bundled JRE (no Java installation required for end users) +- Start menu shortcuts and desktop shortcuts +- Professional Windows application appearance + +### 4. Manual Windows Installer Creation + +If the jpackage plugin doesn't work in your environment, you can use the system jpackage tool: + +```bash +# Ensure you have JDK 17+ with jpackage +jpackage --version + +# Create the installer +jpackage \ + --input target \ + --name SimpliNote4j \ + --main-jar SimpliNote4j-1.0.0.jar \ + --main-class com.simplinote.simplinote.Main \ + --type exe \ + --dest target/installer \ + --app-version 1.0.0 \ + --vendor "SimpliNote Team" \ + --description "AI-powered productivity application" \ + --win-dir-chooser \ + --win-menu \ + --win-shortcut \ + --icon icon.png +``` + +## Deployment Methods + +### Method 1: Simple JAR Distribution +- **Pros**: Works on any system with Java 17+, small download +- **Cons**: Users need Java installed +- **Best for**: Technical users, development testing + +### Method 2: Windows Installer (.exe) +- **Pros**: Professional deployment, includes JRE, easy for end users +- **Cons**: Larger file size (~200-300MB), Windows-only +- **Best for**: End user distribution + +## File Structure for Distribution + +``` +SimpliNote4j-Windows/ +├── SimpliNote4j-1.0.0.jar # Main application +├── run-windows.bat # Windows launcher script +├── README-Windows.txt # User instructions +├── icon.png # Application icon +└── LICENSE # License file +``` + +## Troubleshooting + +**"Java not found" error:** +- Install Java 17+ from https://adoptium.net/ +- Ensure Java is in system PATH + +**JavaFX errors:** +- The JAR includes JavaFX dependencies +- If issues persist, use: `java --module-path . --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.media,javafx.swing -jar SimpliNote4j-1.0.0.jar` + +**Module system errors:** +- Try running with: `java --add-opens java.base/java.lang=ALL-UNNAMED -jar SimpliNote4j-1.0.0.jar` + +## Features Included + +The Windows deployment includes all SimpliNote4j features: +- AI Chat powered by Ollama (requires Ollama installed separately) +- Calendar and scheduling +- To-do list management +- Pomodoro timer +- Smart note-taking +- File import/export capabilities \ No newline at end of file diff --git a/mvnw b/mvnw old mode 100644 new mode 100755 diff --git a/pom.xml b/pom.xml index 109cf26..ff5a23e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,18 +4,22 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.yourplan - YourPlan - 1.0-SNAPSHOT - YourPlan + com.simplinote + SimpliNote4j + 1.0.0 + SimpliNote4j + AI-powered productivity application with note-taking, calendar, and timer features UTF-8 -5.10.2 + 5.10.2 + 17 + 17 + 17.0.6 + - - + com.google.api-client google-api-client @@ -41,94 +45,60 @@ langchain4j-open-ai 1.0.0-beta3 - dev.langchain4j langchain4j-core - 0.27.0 - - - dev.langchain4j - langchain4j-ollama - 1.0.0-beta3 - - - - - - - - dev.langchain4j - langchain4j-document-parser-apache-tika 1.0.0-beta3 - - org.testcontainers - ollama - 1.20.4 - dev.langchain4j langchain4j-ollama 1.0.0-beta3 - dev.langchain4j - langchain4j-core - 0.27.0 + langchain4j + 1.0.0-beta3 - dev.langchain4j - langchain4j-ollama + langchain4j-document-parser-apache-tika 1.0.0-beta3 - - - - dev.langchain4j - langchain4j - 1.0.0-beta3 - test + org.testcontainers + ollama + 1.20.4 + org.openjfx javafx-controls - 17.0.6 + ${javafx.version} org.openjfx javafx-fxml - 17.0.6 + ${javafx.version} org.openjfx javafx-web - 17.0.6 - - - com.google.code.gson - gson - 2.10.1 + ${javafx.version} org.openjfx javafx-swing - 17.0.6 + ${javafx.version} org.openjfx javafx-media - 17.0.6 - - - org.mapdb - mapdb - 3.0.9 + ${javafx.version} + + org.controlsfx controlsfx @@ -188,118 +158,26 @@ + + - org.junit.jupiter - junit-jupiter-api - ${junit.version} - test - - - org.junit.jupiter - junit-jupiter-engine - ${junit.version} - test + com.google.code.gson + gson + 2.10.1 - - - - - - - - - - - dev.langchain4j - langchain4j-core - 1.0.0-beta3 + org.mapdb + mapdb + 3.0.9 - dev.langchain4j - langchain4j - 1.0.0-beta3 - compile + org.apache.pdfbox + pdfbox + 2.0.29 + - org.openjfx - javafx-controls - 17.0.6 - - - org.openjfx - javafx-fxml - 17.0.6 - - - org.openjfx - javafx-web - 17.0.6 - - - org.openjfx - javafx-swing - 17.0.6 - - - org.openjfx - javafx-media - 17.0.6 - - org.controlsfx - controlsfx - 11.2.1 - - com.dlsc.formsfx - formsfx-core - 11.6.0 - - - org.openjfx - * - - - - net.synedra - validatorfx - 0.5.0 - - - org.openjfx - * - - - - org.kordamp.ikonli - ikonli-javafx - 12.3.1 - - org.kordamp.bootstrapfx - bootstrapfx-core - 0.4.0 - - eu.hansolo - tilesfx - 21.0.3 - - - org.openjfx - * - - - - com.github.almasb - fxgl - 17.3 - - - org.openjfx - * - - - - org.junit.jupiter junit-jupiter-api ${junit.version} @@ -310,7 +188,8 @@ junit-jupiter-engine ${junit.version} test - + + @@ -319,8 +198,8 @@ maven-compiler-plugin 3.13.0 - 23 - 23 + 17 + 17 @@ -333,10 +212,10 @@ default-cli - com.yourplan.yourplan/com.yourplan.yourplan.HelloApplication - app - app - app + com.simplinote.simplinote.Main + SimpliNote4j + SimpliNote4j + SimpliNote4j true true true @@ -344,6 +223,61 @@ + + + + org.apache.maven.plugins + maven-shade-plugin + 3.5.1 + + false + + + com.simplinote.simplinote.Main + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + + + + package + + shade + + + + + + + + org.panteleyev + jpackage-maven-plugin + 1.6.5 + + SimpliNote4j + 1.0.0 + SimpliNote Team + ${project.build.directory}/installer + com.simplinote.simplinote/com.simplinote.simplinote.Main + ${project.build.directory}/modules + EXE + true + true + true + ${project.basedir}/icon.png + https://github.com/CodeLanderV/SimpliNote4j + SimpliNote4j - AI-powered productivity application with note-taking, calendar, and timer features. + + \ No newline at end of file diff --git a/run-windows.bat b/run-windows.bat new file mode 100644 index 0000000..3958289 --- /dev/null +++ b/run-windows.bat @@ -0,0 +1,24 @@ +@echo off +REM SimpliNote4j Windows Launcher Script +REM This script launches the SimpliNote4j application + +echo Starting SimpliNote4j... +echo. + +REM Check if Java is installed +java -version >nul 2>&1 +if %errorlevel% neq 0 ( + echo ERROR: Java is not installed or not in PATH. + echo Please install Java 17 or later and make sure it's in your PATH. + echo You can download Java from: https://adoptium.net/ + pause + exit /b 1 +) + +REM Run the application +java --module-path . --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.media,javafx.swing -jar SimpliNote4j-1.0.0.jar + +REM If we get here, the application has closed +echo. +echo SimpliNote4j has closed. +pause \ No newline at end of file diff --git a/run-windows.ps1 b/run-windows.ps1 new file mode 100644 index 0000000..08b0805 --- /dev/null +++ b/run-windows.ps1 @@ -0,0 +1,45 @@ +# SimpliNote4j PowerShell Launcher +# This script launches SimpliNote4j on Windows + +Write-Host "SimpliNote4j Launcher" -ForegroundColor Green +Write-Host "=====================" -ForegroundColor Green +Write-Host "" + +# Check if Java is installed +try { + $javaVersion = java -version 2>&1 | Select-String "version" + Write-Host "Java found: $javaVersion" -ForegroundColor Green +} catch { + Write-Host "ERROR: Java is not installed or not in PATH." -ForegroundColor Red + Write-Host "Please install Java 17 or later from: https://adoptium.net/" -ForegroundColor Yellow + Read-Host "Press Enter to exit" + exit 1 +} + +# Check if the JAR file exists +$jarFile = "SimpliNote4j-1.0.0.jar" +if (-not (Test-Path $jarFile)) { + Write-Host "ERROR: $jarFile not found in current directory." -ForegroundColor Red + Write-Host "Please ensure the JAR file is in the same directory as this script." -ForegroundColor Yellow + Read-Host "Press Enter to exit" + exit 1 +} + +Write-Host "" +Write-Host "Starting SimpliNote4j..." -ForegroundColor Cyan + +# Launch the application +try { + & java --module-path . --add-modules javafx.controls,javafx.fxml,javafx.web,javafx.media,javafx.swing -jar $jarFile +} catch { + Write-Host "" + Write-Host "ERROR: Failed to start SimpliNote4j." -ForegroundColor Red + Write-Host "Error details: $($_.Exception.Message)" -ForegroundColor Red + Write-Host "" + Write-Host "Try running this command manually:" -ForegroundColor Yellow + Write-Host "java -jar $jarFile" -ForegroundColor White +} + +Write-Host "" +Write-Host "SimpliNote4j has closed." -ForegroundColor Green +Read-Host "Press Enter to exit" \ No newline at end of file diff --git a/src/main/java/com/simplinote/simplinote/superpie/Frontend.java b/src/main/java/com/simplinote/simplinote/superpie/Frontend.java index a474df4..925322e 100644 --- a/src/main/java/com/simplinote/simplinote/superpie/Frontend.java +++ b/src/main/java/com/simplinote/simplinote/superpie/Frontend.java @@ -176,7 +176,7 @@ private void setupModelMenu() { private void setupTemperatureSlider() { if (setTemp != null) { setTemp.setValue(SP.temperature); - setTemp.valueProperty().addListener((_, oldVal, newVal) -> { + setTemp.valueProperty().addListener((observable, oldVal, newVal) -> { SP.temperature = newVal.doubleValue(); SP.VogueModel(); }); diff --git a/src/main/java/module-info.java b/src/main/java/module-info.java index 53f2f8c..367f242 100644 --- a/src/main/java/module-info.java +++ b/src/main/java/module-info.java @@ -19,7 +19,6 @@ requires net.synedra.validatorfx; requires org.kordamp.ikonli.javafx; requires org.kordamp.bootstrapfx.core; - requires eu.hansolo.tilesfx; requires javafx.media; requires org.apache.pdfbox; opens com.simplinote.simplinote to javafx.fxml;