diff --git a/get_jre.cmd b/get_jre.cmd new file mode 100644 index 0000000..0c56346 --- /dev/null +++ b/get_jre.cmd @@ -0,0 +1,3 @@ +@echo off +jlink.exe -v --add-modules java.base,java.logging,java.management,java.naming,java.security.jgss,java.sql,java.xml --output c:\Users\brian\src\json-roller\jre --strip-debug --compress 2 --no-header-files --no-man-pages +pause diff --git a/pom.xml b/pom.xml index 1c61e7d..0fbc046 100644 --- a/pom.xml +++ b/pom.xml @@ -122,6 +122,9 @@ jdeb org.vafer 1.8 + + false + @@ -154,6 +157,83 @@ + + com.akathist.maven.plugins.launch4j + launch4j-maven-plugin + 2.0.1 + + + l4j-gui + package + + launch4j + + + console + target/json-roller.exe + target/${project.artifactId}-${project.version}.jar + + false + Error in launch4j plugin + + ${mainClass} + + src/main/resources/jsonroller.ico + + %JAVA_HOME%;%PATH%;jre + 1.8.0 + 512 + 1024 + + -Djava.awt.headless=true + + + + 1.0.0.0 + 1.0.0.0 + json-roller + Copyright (c) 2019 + openstatic.org + 1.0.0.0 + ${project.version} + JSONRoller + JSONRoller + json-roller.exe + + + + + + + org.digitalmediaserver + nsis-maven-plugin + 1.0.2 + + C:\Program Files (x86)\NSIS\makensis.exe + /usr/bin/makensis + + lzma + true + 64 + + json-roller + ${project.name.camel} + + + + + build-windows-installer + + ${basedir}/src/nsis/json-roller.nsi + json-roller-setup.exe + + + generate-headerfile + make + + + + org.apache.maven.plugins maven-javadoc-plugin diff --git a/src/main/java/org/openstatic/OutputData.java b/src/main/java/org/openstatic/OutputData.java index f330ef9..41915d4 100644 --- a/src/main/java/org/openstatic/OutputData.java +++ b/src/main/java/org/openstatic/OutputData.java @@ -224,7 +224,9 @@ function makeSortable(table) var selectEl = document.createElement('select'); selectEl.style.width = '100%'; selectEl.id = 'filter'+j; - createOptions(selectEl, uniqueArray(valuesForColumn(table, j))); + createOptions(selectEl, uniqueArray(valuesForColumn(table, j)).sort(function (a, b) { // sort rows + return (a.localeCompare(b, 'en', {numeric: true})); + })); let fj = j, ftable = table, fselectEl = selectEl; selectEl.onchange = function() { applyFilters(); diff --git a/src/main/resources/jsonroller.icns b/src/main/resources/jsonroller.icns new file mode 100644 index 0000000..8327886 Binary files /dev/null and b/src/main/resources/jsonroller.icns differ diff --git a/src/main/resources/jsonroller.ico b/src/main/resources/jsonroller.ico new file mode 100644 index 0000000..2b44477 Binary files /dev/null and b/src/main/resources/jsonroller.ico differ diff --git a/src/main/resources/jsonroller64.png b/src/main/resources/jsonroller64.png new file mode 100644 index 0000000..ad13488 Binary files /dev/null and b/src/main/resources/jsonroller64.png differ diff --git a/src/nsis/json-roller.nsi b/src/nsis/json-roller.nsi new file mode 100644 index 0000000..cf4821c --- /dev/null +++ b/src/nsis/json-roller.nsi @@ -0,0 +1,104 @@ +;NSIS Modern User Interface +;Basic Example Script +;Written by Joost Verburg + +;-------------------------------- +;Include Modern UI + +!include "MUI2.nsh" + +!include "EnvVarUpdate.nsh" + +;-------------------------------- +;General + + ;Name and file + Name "json-roller" + + ;Default installation folder + InstallDir "$PROGRAMFILES\json-roller" + + ;Get installation folder from registry if available + InstallDirRegKey HKCU "Software\json-roller" "" + + ;Request application privileges for Windows Vista + RequestExecutionLevel admin + + !define REG_UNINSTALL "Software\Microsoft\Windows\CurrentVersion\Uninstall\json-roller" + +;-------------------------------- +;Interface Settings + + !define MUI_ABORTWARNING + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_INSTFILES + + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" + +;-------------------------------- +;Installer Sections + +Section "json-roller" Main +SectionIn RO + WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayName" "JSON Roller" + WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayIcon" "$INSTDIR\Uninstall.exe" + WriteRegStr HKLM "${REG_UNINSTALL}" "DisplayVersion" "1.0" + WriteRegStr HKLM "${REG_UNINSTALL}" "Publisher" "openstatic.org" + WriteRegStr HKLM "${REG_UNINSTALL}" "InstallSource" "$EXEDIR\" + + ${EnvVarUpdate} $0 "PATH" "A" "HKCU" "$INSTDIR" + ${EnvVarUpdate} $0 "PATH" "A" "HKLM" "$INSTDIR" + + ;Under WinXP this creates two separate buttons: "Modify" and "Remove". + ;"Modify" will run installer and "Remove" will run uninstaller. + WriteRegDWord HKLM "${REG_UNINSTALL}" "NoModify" 1 + WriteRegDWord HKLM "${REG_UNINSTALL}" "NoRepair" 0 + WriteRegStr HKLM "${REG_UNINSTALL}" "UninstallString" '"$INSTDIR\Uninstall.exe"' + + SetOutPath "$INSTDIR" + + File ${PROJECT_BUILD_DIR}\json-roller.exe + + ;Store installation folder + WriteRegStr HKCU "Software\json-roller" "" $INSTDIR + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + +SectionEnd + +Section "Java Runtime Environment" java + + SetOutPath "$INSTDIR\jre" + File /r "${PROJECT_BASEDIR}\jre\*" +SectionEnd + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + + ;ADD YOUR OWN FILES HERE... + + Delete "$INSTDIR\Uninstall.exe" + Delete "$INSTDIR\json-roller.exe" + RMDir /r "$INSTDIR" + + ${un.EnvVarUpdate} $0 "PATH" "R" "HKCU" "$INSTDIR" + ${un.EnvVarUpdate} $0 "PATH" "R" "HKLM" "$INSTDIR" + + DeleteRegKey /ifempty HKCU "Software\json-roller" + DeleteRegKey HKLM "${REG_UNINSTALL}" +SectionEnd