Skip to content

Commit

Permalink
v1.1.0: Fix immediate crash on MacOS: now database and logs are store…
Browse files Browse the repository at this point in the history
…d under user's home directory: `~/pstorage-multiplatform`; MacOS build info enriched with app category, BundleID specified explicitly
  • Loading branch information
shaart committed Aug 1, 2023
1 parent bfbd6a0 commit b0bc580
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 8 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## Changelog
#### 2023-06-12
#### v1.1.0
- Fix immediate crash on MacOS: now database and logs are stored under user's home
directory: `~/pstorage-multiplatform`
- MacOS build info enriched with app category, BundleID specified explicitly.

**Note:** if you already used `v1.0.1` - you should move a database file from `<app_dir>/pstorage.data.db`
to `<user_home>/pstorage-multiplatform/pstorage.data.db`

#### v1.0.1
- Application MVP:
- authorization
- system tray with way to reopen app, copy password or exit
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,17 @@ On screenshot:
authorized.
- Exit button.

## How to install
## How to install on Windows

1. Download release build for your system from "Releases" section.
2. Run installation file.
3. Open `pstorage-multiplatform.exe` in the root of installed directory. Be free to move
application to another place or to another PC as whole directory.
2. Run `.msi` installation file.
3. Open `pstorage-multiplatform.exe` in the root of installed directory.

## How to install on MacOS

1. Download release build for your system from "Releases" section.
2. Run `.dmg` installation file. Drag `pstorage-multiplatform.app` into "Application" directory.
3. Open `pstorage-multiplatform.app`.

## How to build

Expand Down
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ plugins {
group = "com.github.shaart"
version = extra["app.version"].toString()
val applicationName = "pstorage-multiplatform"
val fullAppPackage = "com.github.shaart.pstorage.multiplatform"

repositories {
google()
Expand Down Expand Up @@ -102,6 +103,11 @@ compose.desktop {
val iconsDir = project.file(iconsDirPath)
macOS {
iconFile.set(iconsDir.resolve("icon64.icns"))
bundleID = fullAppPackage
appCategory = "public.app-category.utilities"
signing {
sign.set(false)
}
}
linux {
iconFile.set(iconsDir.resolve("icon64.png"))
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pstorage version
app.version=1.0.1
app.version=1.1.0

kotlin.code.style=official
kotlin.version=1.8.20
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package com.github.shaart.pstorage.multiplatform.config

import java.util.*

private val userHomePath = System.getProperty("user.home")

data class PstorageProperties(
var applicationName: String = "pstorage",
var version: Version = Version(),
Expand Down Expand Up @@ -58,7 +60,7 @@ data class UsernameLength(
)

data class Database(
var url: String = "jdbc:sqlite:pstorage.data.db",
var url: String = "jdbc:sqlite:$userHomePath/pstorage-multiplatform/pstorage.data.db",
var username: String? = null,
var password: String? = null,
)
Expand Down
2 changes: 1 addition & 1 deletion src/commonMain/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<configuration>
<property name="LOG_DIR" value="logs" />
<property name="LOG_DIR" value="${user.home}/pstorage-multiplatform/logs" />
<property name="LOG_FILE" value="pstorage" />
<property name="PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [userId=%X{userId}] [%thread] %-5level %logger{36} - %msg%n" />

Expand Down

0 comments on commit b0bc580

Please sign in to comment.