Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Android/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ platform=${ANDROID_PLATFORM:-35}
jar=$sdk/platforms/android-$platform/android.jar
[ -f "$jar" ] || { echo "No $jar: install the platform with sdkmanager \"platforms;android-$platform\"." >&2; exit 1; }
tools=$(ls -d "$sdk"/build-tools/* | sort -V | tail -1)
version=${APP_VERSION:-0.9.14}
version=${APP_VERSION:-0.9.17}
IFS=. read -r major minor patch <<<"$version.0.0"
code=$((major * 10000 + minor * 100 + ${patch%%[^0-9]*}))

Expand Down
2 changes: 1 addition & 1 deletion App/QRCode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ enum QRCode {

/// The code as text rows of "1" (dark) and "0", for JSON.
static func rows(_ text: String) -> [String]? {
encode(text)?.map { row in String(row.map { $0 ? "1" : "0" }) }
encode(text)?.map { row in row.map { $0 ? "1" : "0" }.joined() }
}

/// The code drawn with half blocks for a terminal, two rows to a line, with a quiet zone of two modules
Expand Down
2 changes: 1 addition & 1 deletion App/StatusJSON.swift
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ struct LocalResponse {
extension StatusReport {
/// Tokenmeter's version. The Mac app reads it from its Info.plist, which build-library-app.sh writes; the
/// Linux service has no Info.plist, so it uses `releaseVersion`. Keep that in step with the build scripts.
static let releaseVersion = "0.9.14"
static let releaseVersion = "0.9.17"
static var appVersion: String {
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? releaseVersion
}
Expand Down
2 changes: 1 addition & 1 deletion Linux/Compression.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ enum Gzip {
return nil
}
defer { deflateEnd(&stream) }
var packed = Data(count: Int(deflateBound(&stream, UInt(data.count))))
var packed = Data(count: Int(deflateBound(&stream, uLong(data.count))))
let capacity = packed.count
let status: Int32 = data.withUnsafeBytes { source in
packed.withUnsafeMutableBytes { target in
Expand Down
8 changes: 4 additions & 4 deletions Linux/WindowsCalls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ enum WindowsCalls {
static func memory() -> Memory? {
var status = MEMORYSTATUSEX()
status.dwLength = DWORD(MemoryLayout<MEMORYSTATUSEX>.size)
guard GlobalMemoryStatusEx(&status).boolValue else { return nil }
guard GlobalMemoryStatusEx(&status) else { return nil }
let gib = 1_073_741_824.0
// The page file figures count physical memory too: what is beyond it is the page file's own.
let pageTotal = max(0, Double(status.ullTotalPageFile) - Double(status.ullTotalPhys))
Expand All @@ -43,7 +43,7 @@ enum WindowsCalls {
var idle = FILETIME()
var kernel = FILETIME()
var user = FILETIME()
guard GetSystemTimes(&idle, &kernel, &user).boolValue else { return nil }
guard GetSystemTimes(&idle, &kernel, &user) else { return nil }
// Kernel time includes the idle time.
let idleSeconds = seconds(idle)
return ProcessorTime(idle: idleSeconds, busy: max(0, seconds(kernel) - idleSeconds) + seconds(user))
Expand All @@ -55,15 +55,15 @@ enum WindowsCalls {
var exited = FILETIME()
var kernel = FILETIME()
var user = FILETIME()
guard GetProcessTimes(GetCurrentProcess(), &created, &exited, &kernel, &user).boolValue else { return 0 }
guard GetProcessTimes(GetCurrentProcess(), &created, &exited, &kernel, &user) else { return 0 }
return seconds(kernel) + seconds(user)
}

/// The bytes free to this user and the size of the volume `path` is on.
static func diskSpace(_ path: String) -> (free: Double, total: Double)? {
var free = ULARGE_INTEGER()
var total = ULARGE_INTEGER()
let found = path.withCString(encodedAs: UTF16.self) { GetDiskFreeSpaceExW($0, &free, &total, nil).boolValue }
let found = path.withCString(encodedAs: UTF16.self) { GetDiskFreeSpaceExW($0, &free, &total, nil) }
guard found else { return nil }
return (Double(free.QuadPart), Double(total.QuadPart))
}
Expand Down
2 changes: 1 addition & 1 deletion Linux/kde/app/AppVersion.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// update keeps saying the version it is, while the service reports its own (backend.snapshot.version).
// scripts/package-linux.sh and package-flatpak.sh write it from the package's version; keep it in step with
// StatusReport.releaseVersion when bumping (a unit test checks it).
var version = "0.9.14"
var version = "0.9.17"
2 changes: 1 addition & 1 deletion Linux/kde/mock/machines.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"report": {
"schema": 1,
"app": "Tokenmeter",
"version": "0.9.14",
"version": "0.9.17",
"host": "studio",
"chip": "Apple M3 Ultra",
"time": "2026-11-13T19:00:00Z",
Expand Down
2 changes: 1 addition & 1 deletion Linux/kde/mock/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"addresses": [
"192.168.1.20"
],
"version": "0.9.14",
"version": "0.9.17",
"shareHistory": false,
"footprint": {
"cpuPercent": 0.4,
Expand Down
2 changes: 1 addition & 1 deletion Linux/kde/plasmoid/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"Icon": "tokenmeter",
"Category": "System Information",
"License": "Apache-2.0",
"Version": "0.9.14",
"Version": "0.9.17",
"Website": "https://github.com/tokenmeter1/Tokenmeter"
},
"X-Plasma-API-Minimum-Version": "6.0",
Expand Down
2 changes: 1 addition & 1 deletion build-library-app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for word in "$@"; do
esac
done
app="$project_dir/Tokenmeter.app"
version=${APP_VERSION:-0.9.14}
version=${APP_VERSION:-0.9.17}
build=${APP_BUILD:-1}

# SwiftUI's @State is a compiler macro in the macOS 26 SDK. The Command Line Tools ship that SDK without
Expand Down
2 changes: 1 addition & 1 deletion scripts/package-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Needs flatpak and flatpak-builder; the KDE runtime and SDK are fetched from Flathub.
set -eu
project_dir=$(cd "$(dirname "$0")/.." && pwd)
version=${APP_VERSION:-0.9.14}
version=${APP_VERSION:-0.9.17}
arch=$(uname -m)
id=io.github.tokenmeter1.tokenmeter
name="Tokenmeter-$version-linux-$arch"
Expand Down
2 changes: 1 addition & 1 deletion scripts/package-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# and install.sh. Needs the Swift toolchain; run it on Linux.
set -eu
project_dir=$(cd "$(dirname "$0")/.." && pwd)
version=${APP_VERSION:-0.9.14}
version=${APP_VERSION:-0.9.17}
arch=$(uname -m)
name="Tokenmeter-$version-linux-$arch"

Expand Down
2 changes: 1 addition & 1 deletion scripts/package-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# On a Mac, SIGN_IDENTITY signs the program with a Developer ID; without it the program is ad-hoc signed.
set -eu
project_dir=$(cd "$(dirname "$0")/.." && pwd)
version=${APP_VERSION:-0.9.14}
version=${APP_VERSION:-0.9.17}
case "$(uname -s)" in
Darwin) os=macos ;;
Linux) os=linux ;;
Expand Down
2 changes: 1 addition & 1 deletion scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ set -euo pipefail
project_dir=${0:A:h:h}
app="$project_dir/Tokenmeter.app"
dist="$project_dir/dist"
export APP_VERSION=${APP_VERSION:-0.9.14}
export APP_VERSION=${APP_VERSION:-0.9.17}
identity=${SIGN_IDENTITY:-}
profile=${NOTARY_PROFILE:-}

Expand Down
Loading