-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the installation script and improve doc
- Loading branch information
1 parent
95d3c68
commit f67f18e
Showing
6 changed files
with
90 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,41 @@ | ||
# Accounts | ||
|
||
![Release](https://img.shields.io/github/v/release/GaelGirodon/accounts?style=flat-square) | ||
![License](https://img.shields.io/github/license/GaelGirodon/accounts?style=flat-square&color=blue) | ||
|
||
A basic personal financial-accounting software. | ||
|
||
## Get started | ||
## Installation | ||
|
||
- Install the [.NET Desktop Runtime](https://dotnet.microsoft.com/download/dotnet/current/runtime/desktop) | ||
- Download the [latest release](https://github.com/GaelGirodon/accounts/releases/latest) | ||
- Extract the archive | ||
- Run `Accounts.exe` | ||
|
||
### Using script | ||
|
||
```powershell | ||
# Install .NET Desktop Runtime using the link above or dotnet install scripts | ||
# Allow running scripts | ||
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser | ||
# Download and install the latest release of Accounts | ||
Invoke-WebRequest 'https://raw.githubusercontent.com/GaelGirodon/accounts/master/Scripts/Install.ps1' ` | ||
| Invoke-Expression | ||
``` | ||
|
||
## Features | ||
|
||
- Manage an account: add, edit, check and remove transactions | ||
- Navigate in the transactions list by month and year | ||
- Get the account balance and the sum of credits and debits of each month | ||
- Batch duplicate transactions to another date | ||
- Save account transactions to a `.account` file (a simple zipped JSON file) | ||
- Easily create account file backups | ||
- Support many keyboard shortcuts and accelerator keys | ||
- Available in :fr: French and :uk: English | ||
|
||
## License | ||
|
||
**Accounts** is licensed under the GNU General Public License. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Install.ps1 | ||
# | ||
# Download and install the application. | ||
# | ||
# Remote install: `Invoke-WebRequest 'https://raw.githubusercontent.com/GaelGirodon/accounts/master/Scripts/Install.ps1' | Invoke-Expression` | ||
# | ||
|
||
$ErrorActionPreference = "stop" # Quit if anything goes wrong | ||
|
||
$PackageUrl = "https://github.com/GaelGirodon/accounts/releases/latest/download/Accounts.zip" | ||
$PackageChecksumUrl = "$PackageUrl.sha256" | ||
$PackagePath = (Join-Path $env:TEMP "Accounts.zip") | ||
$InstallPath = (Join-Path $env:LOCALAPPDATA "Programs\Accounts") | ||
$StartMenuPath = (Join-Path $env:APPDATA "Microsoft\Windows\Start Menu\Programs") | ||
|
||
# Download | ||
Write-Host "Downloading package from $PackageUrl..." | ||
$WebClient = (New-Object System.Net.WebClient) | ||
$WebClient.Headers.Add("User-Agent: WebClient") | ||
$WebClient.DownloadFile($PackageUrl, $PackagePath) | ||
Write-Host -ForegroundColor Green "Package downloaded to $PackagePath" | ||
|
||
# Checksum | ||
Write-Host "Validating checksum..." | ||
$WebClient.Headers.Add("User-Agent: WebClient") | ||
$PackageChecksumExpected = ($WebClient.DownloadString($PackageChecksumUrl)).Trim() | ||
Write-Host "> Expected: $PackageChecksumExpected" | ||
$PackageChecksumActual = (Get-FileHash -Algorithm SHA256 $PackagePath).Hash.ToLower() | ||
Write-Host "> Actual: $PackageChecksumActual" | ||
if ($PackageChecksumActual -ine $PackageChecksumExpected) { | ||
Write-Error "Invalid checksum" | ||
return 2 | Out-Null | ||
} | ||
Write-Host -ForegroundColor Green "Checksum is valid" | ||
|
||
# Extract | ||
Write-Host "Extracting archive to $InstallPath..." | ||
Expand-Archive -Path $PackagePath -DestinationPath $InstallPath -Force | ||
Write-Host -ForegroundColor Green "Archive extracted to $InstallPath" | ||
|
||
# Create a shortcut | ||
Write-Host "Creating a shortcut in the start menu..." | ||
$ShortcutName = "Accounts" | ||
if ((Get-Culture).Name -like "fr*") { | ||
$ShortcutName = "Comptes" | ||
} | ||
$WSScriptShell = New-Object -ComObject WScript.Shell | ||
$Shortcut = $WSScriptShell.CreateShortcut("$StartMenuPath\$ShortcutName.lnk") | ||
$Shortcut.TargetPath = "$InstallPath\Accounts.exe" | ||
$Shortcut.Save() | ||
Write-Host -ForegroundColor Green "Shortcut created" | ||
|
||
# Clean up | ||
Write-Host "Removing package..." | ||
Remove-Item $PackagePath | ||
Write-Host -ForegroundColor Green "Package removed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# | ||
# | ||
# Package.ps1 | ||
# | ||
# Build and package the application. | ||
|