Skip to content

Commit

Permalink
Add: NSIS installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Tamas Cseh committed Jan 19, 2021
1 parent 595f8ac commit eaad3bc
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this project will be documented in this file.

## [2.3.0] - 2021-01-19
### Added
- Installer
- Support latest rFactor2 release

## [2.2.0] - 2021-01-19
### Added
- Add countdown timer to lap limited multiplayer race events
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ In this repository you can find small modifications for the new rFactor 2 UI
- Open zip archive `net.rfactor2.ui.framework.jar`
- Go to`static\framework`
- Copy here `dist/scripts/better-ui.js`
- Copy `dist/rf2-better-ui` to `better-ui`
- Copy `dist/rf2-better-ui` to `rf2-better-ui`
- Edit `main-xxxx.js` file
- Append code at the end: <br>
```
require(["./framework/better-ui"]);
```
# How to create an installer
- Create the jar file as it's described above
- Put the jar file into folder `dist/jar`
- Use the NSIS compiler (MakeNSISW) to compile `installer/install.nsi`
- The installer will be located at `dist/installer`

Swagger UI location:
https://amdatu.org/components/amdatu-web/
Expand Down
29 changes: 29 additions & 0 deletions installer/install.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# name the installer
OutFile "..\\dist\\installer\\Better-UI.exe"

Var rFLocation
Var backupDir

# default section start; every NSIS script has at least one section.
Section

# read the value from the registry into the $0 register
SetRegView 64
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 365960" 'InstallLocation'
StrCpy $rfLocation $0
DetailPrint "rFactor 2 location: $rfLocation"

# define the output path for this file
SetOutPath $rfLocation\Bin\Bundles

# First create a backup
StrCpy $backupDir $rfLocation\Bin\Backup
DetailPrint "Creating backups in folder: $backupDir"
CreateDirectory $backupDir
CopyFiles $rfLocation\Bin\Bundles\net.rfactor2.ui.framework.jar $backupDir

# define what to install and place it in the output path
File ..\dist\jar\*.jar

# default section end
SectionEnd
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rf2-better-ui",
"version": "2.2.0",
"version": "2.3.0",
"scripts": {
"ng": "ng",
"start": "ng serve --live-reload=false",
Expand Down

0 comments on commit eaad3bc

Please sign in to comment.