Set NSIS packaging, update readme files.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Dmitry Isaenko 2023-03-21 13:41:13 +03:00
parent 07ad4e92dd
commit 984366e584
13 changed files with 1245 additions and 15 deletions

View file

@ -12,7 +12,7 @@ steps:
- name: m2 - name: m2
path: /root/.m2 path: /root/.m2
- name: archive-artifact - name: archive-artifacts
image: alpine:latest image: alpine:latest
commands: commands:
- mkdir -p /builds/Tihwin - mkdir -p /builds/Tihwin
@ -22,6 +22,20 @@ steps:
- name: builds - name: builds
path: /builds path: /builds
- name: make-win-installer
image: wheatstalk/makensis:3
commands:
- cp target/Tihwin-*.exe NSIS/Tihwin.exe
- NSIS/update_version.sh
- cd NSIS
- makensis -V4 ./installer.nsi
- cp Installer-*.exe /builds/Tihwin/
volumes:
- name: builds
path: /builds
- name: jdk
path: /drone/src/misc/windows/NSIS/jdk
volumes: volumes:
- name: m2 - name: m2
host: host:

146
NSIS/installer.nsi Normal file
View file

@ -0,0 +1,146 @@
;Include Modern UI
!include "MUI.nsh"
Unicode true
;Name and file
!define APPNAME "Tihwin"
!define COMPANYNAME "Dmitry Isaenko"
!define VERSIONMAJOR 0
!define VERSIONMINOR 0
!define VERSIONBUILD 0
Name "Tihwin"
OutFile "Installer.exe"
;Default installation folder
InstallDir "$PROGRAMFILES\${APPNAME}"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\${APPNAME}" ""
;Request application privileges for Windows Vista
RequestExecutionLevel admin
!define MUI_ICON installer_logo.ico
!define MUI_UNICON uninstaller_logo.ico
; !define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_WELCOMEFINISHPAGE_BITMAP "leftbar.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "leftbar_uninstall.bmp"
!define MUI_FINISHPAGE_LINK "Tihwin at GitHub"
!define MUI_FINISHPAGE_LINK_LOCATION https://github.com/developersu/Tihwin/
!define MUI_FINISHPAGE_RUN "$INSTDIR\Tihwin.exe"
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(l10n_CreateShortcut)
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION CreateDesktopShortCut
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Language Selection Dialog Settings
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\${APPNAME}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
;--------------------------------
;Pages
;!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_RIGHTi
;!define MUI_HEADERIMAGE_BITMAP "install_header.bmp"
;!define MUI_HEADERIMAGE_UNBITMAP "install_header.bmp"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "license.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_UNPAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Russian"
!insertmacro MUI_LANGUAGE "Japanese"
;Language strings
LangString l10n_CreateShortcut ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString l10n_CreateShortcut ${LANG_RUSSIAN} "Создать ярлык на Рабочем столе"
;--------------------------------
Section "Tihwin" Install
SetOutPath "$INSTDIR"
file /r jdk
file Tihwin.exe
file logo.ico
; Registry information for add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayIcon" "$\"$INSTDIR\logo.ico$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "Publisher" "$\"${COMPANYNAME}$\""
; Start Menu
CreateDirectory "$SMPROGRAMS\${APPNAME}"
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\Tihwin.exe" "" "$INSTDIR\logo.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
;Store installation folder
WriteRegStr HKCU "Software\${APPNAME}" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
; set mandatory installation rule to section
SectionSetFlags ${Install} 17
FunctionEnd
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
Function CreateDesktopShortCut
CreateShortcut "$DESKTOP\Tihwin.lnk" "$INSTDIR\Tihwin.exe"
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
; Start Menu
Delete "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk"
Delete "$SMPROGRAMS\${APPNAME}\Uninstall.lnk"
Delete "$DESKTOP\Tihwin.lnk"
rmDir "$SMPROGRAMS\${APPNAME}"
;Delete installed files
RMDir /r "$INSTDIR\jdk\*"
Delete "$INSTDIR\Tihwin.exe"
Delete "$INSTDIR\logo.ico"
Delete "$SMPROGRAMS\Uninstall.exe"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\${APPNAME}"
; Cleanup records stored for uninstaller from the registry
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}"
SectionEnd
;--------------------------------
;Uninstaller Functions

BIN
NSIS/installer_logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

BIN
NSIS/leftbar.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

BIN
NSIS/leftbar_uninstall.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

1070
NSIS/license.txt Normal file

File diff suppressed because it is too large Load diff

BIN
NSIS/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

BIN
NSIS/uninstaller_logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

8
NSIS/update_version.sh Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
TIMESTAMP=`date +%Y%m%d.%H%M%S`
VERSIONMAJOR=`grep '<version>' pom.xml | head -1 | sed -e 's/^.*<version>//g' -e 's/\..*$//g'`
VERSIONMINOR=`grep '<version>' pom.xml | head -1 | sed -E 's/^.*<version>[0-9]+?\.//g' | sed -E -e 's/(\..*|-SNAPSHOT|)<\/version>.*$//g'`
sed -z -i -e "s/!define\ VERSIONMAJOR\ [0-9]/!define\ VERSIONMAJOR $VERSIONMAJOR\ /" misc/windows/NSIS/installer.nsi
sed -z -i -e "s/!define\ VERSIONMINOR\ [0-9]/!define\ VERSIONMINOR $VERSIONMINOR\ /" misc/windows/NSIS/installer.nsi
sed -z -i -e "s/OutFile\ \"Installer.exe\"/OutFile\ \"Installer-$VERSIONMAJOR.$VERSIONMINOR-$TIMESTAMP.exe\"\ /" misc/windows/NSIS/installer.nsi

View file

@ -2,9 +2,7 @@
![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) ![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin)
#### Other languages #### Other languages
[Russian](README_RU.md) ![Russian](README_RU.md) ![Japanese](README_JP.md) ![Ryukyuan](README_RYU.md)
[Japanese](README_JP.md)
[Ryukyuan](README_RYU.md)
OPL-compatible PS2 tool for making split files. Sort of ul.cfg manager or USBUtil. Good for use on mac and linux. OPL-compatible PS2 tool for making split files. Sort of ul.cfg manager or USBUtil. Good for use on mac and linux.
@ -21,7 +19,7 @@ GNU GLPv3 or higher. Please see LICENSE.
#### Requirements #### Requirements
* Java * Java (no need if Installer.exe used)
#### Feedback #### Feedback

View file

@ -2,9 +2,7 @@
![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) ![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin)
#### 他の言語 #### 他の言語
[英語](README.md) ![英語](README.md) ![ロシア語](README_RU.md) ![琉球諸語](README_RYU.md)
[ロシア語](README_RU.md)
[琉球諸語](README_RYU.md)
分割ファイルを作成するためのOPL互換のPS2ツール。 ul.cfg ネージャーまたはUSBUtilの並べ替え。MacおよびLinuxでの使用に適しています。 分割ファイルを作成するためのOPL互換のPS2ツール。 ul.cfg ネージャーまたはUSBUtilの並べ替え。MacおよびLinuxでの使用に適しています。

View file

@ -2,9 +2,7 @@
![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) ![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin)
#### Другие языки #### Другие языки
[Английский язык](README.md) ![Английский язык](README.md) ![Японский язык](README_JP.md) ![Рюкюские языки](README_RYU.md)
[Японский язык](README_JP.md)
[Рюкюские языки](README_RYU.md)
Это OPL-совместимая утилита для PS2. Используется для создания т.н. «сплит-файлов». Это что-то вроде менеджера ul.cfg или, другими словами, аналог USBUtil. Отличной подойдёт для использования в маке и линуксе. Это OPL-совместимая утилита для PS2. Используется для создания т.н. «сплит-файлов». Это что-то вроде менеджера ul.cfg или, другими словами, аналог USBUtil. Отличной подойдёт для использования в маке и линуксе.
@ -21,7 +19,7 @@ GNU GLPv3 или выше. Ознакомьтесь с файлом LICENSE.
#### Требования #### Требования
* Java * Java (не требуется при использовании Installer.exe)
#### Обратная связь #### Обратная связь

View file

@ -2,9 +2,7 @@
![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin) ![License](https://img.shields.io/badge/License-GPLv3-blue.svg) ![LatestVer](https://img.shields.io/github/release/developersu/Tihwin.svg) [![Build Status](https://ci.redrise.ru/api/badges/desu/Tihwin/status.svg)](https://ci.redrise.ru/desu/Tihwin)
#### 他ぬ言語 #### 他ぬ言語
[英語](README.md) ![英語](README.md) ![やまとぅぐち](README_JP.md) ![ロシア語](README_RU.md)
[やまとぅぐち](README_JP.md)
[ロシア語](README_RU.md)
分割ファイル作成するたみぬOPL互換ぬPS2ツール。 ul.cfgマネージャーあらんでぃUSBUtilぬ並べい替い。MacうゆびLinuxっしぬ使用んかい適ちょーいびーん。 分割ファイル作成するたみぬOPL互換ぬPS2ツール。 ul.cfgマネージャーあらんでぃUSBUtilぬ並べい替い。MacうゆびLinuxっしぬ使用んかい適ちょーいびーん。