Skip to content

Commit 5935470

Browse files
committed
Add single-file portable EXE and persistent media setup for 0.1.39
1 parent e8bd87e commit 5935470

31 files changed

Lines changed: 4956 additions & 438 deletions

‎CONTRIBUTING.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Discuss larger changes in an issue before implementing them. Keep changes focuse
1717

1818
Do not include credentials, OAuth downloads, personal mail, recordings, model weights, dependency folders, release packages, or test output. Keep `app/config/google-oauth.json` as the empty template. The PC model services are separate projects; their changes belong in their own repositories.
1919

20-
Build and packaging details, including FFmpeg prerequisites, are in the [installation guide](docs/guides/INSTALL_BUILD.md). A successful package build is not a substitute for workflow tests.
20+
Build and packaging details, including FFmpeg prerequisites, are in the [installation guide](docs/guides/INSTALL_BUILD.md). `npm run package:portable` builds the single-file EXE with the pinned electron-builder toolchain; it does not publish it. Changes to the portable launcher or media installer should be checked for restart behavior, data persistence, and failures that preserve existing files. A successful package build is not a substitute for workflow tests.

‎README.md‎

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
UFriend keeps your workspace on your computer and connects to separately configured local or cloud AI services. Review the original material alongside the result, edit it, and decide how to use it. The interface supports English and Traditional Chinese, with light, dark, and system themes.
1010

11-
**Current version: 0.1.38 · Windows x64 · Electron 44**
11+
**Current version: 0.1.39 · Windows x64 · Electron 44**
1212

1313
[Releases](https://github.com/breeze0305/UFriend/releases) · [Documentation](docs/README.md) · [使用手冊(繁體中文)](docs/guides/APP_README.md) · [Report an issue](https://github.com/breeze0305/UFriend/issues)
1414

@@ -27,16 +27,24 @@ AI results need review. Mail summaries currently use Traditional Chinese, indepe
2727

2828
## Run the Windows release
2929

30-
1. Open [GitHub Releases](https://github.com/breeze0305/UFriend/releases) and download the Windows x64 release ZIP. GitHub's **Source code** archives are not runnable desktop packages.
31-
2. Extract the **entire ZIP** into a normal folder. Keep the adjacent DLLs, `resources`, `locales`, and license files with the executable.
32-
3. If another version is running, quit it from the system tray menu, then launch `UFriend.exe` from the extracted folder.
30+
1. Open [GitHub Releases](https://github.com/breeze0305/UFriend/releases) and download **UFriend-0.1.39-Portable.exe** for Windows x64. GitHub's **Source code** archives are not runnable desktop packages.
31+
2. Save the EXE in a folder you want to keep. If another version is running, quit it from the system tray menu first.
32+
3. Double-click the downloaded EXE. No installation wizard, Node.js, or manual extraction is needed.
3333
4. For English, open **設定 → 一般 → 軟體介面語言**, choose **English**, and save.
3434

35-
The desktop package does not require Node.js. AI models and services are installed separately.
35+
The launcher extracts the application into a separate temporary directory for each run. Workspace data and encrypted credentials remain in your Windows user data directory; they are not stored inside the downloaded EXE or its temporary extraction folder. Restarting from the system tray launches the original portable EXE. Keep that file in place until you fully quit the app.
3636

37-
**Optional media runtime:** the public ZIP does not include the FFmpeg executable. For captioned-video export or cloud speech transcription, run `Install media runtime.cmd` in the extracted application folder. The installer downloads the pinned build from Gyan's official site and verifies its hashes. It needs 7-Zip; an already extracted package can instead be supplied through the PowerShell installer's `-From` option. See the [runtime guide](docs/development/FFMPEG_RUNTIME.md) for exact commands and paths. Local Whisper uses its own independently installed runtime.
37+
**Optional media runtime:** the public EXE contains no FFmpeg executable, AI models, or shared OAuth client. For captioned-video export or cloud speech transcription, open **Settings → General → Media runtime**:
3838

39-
Workspace data is separate from the application folder. Use the data-location control in **Settings → General** to find it. Fully quit UFriend before backing up the workspace or replacing application files.
39+
- **Download and install media runtime** downloads the pinned build from Gyan and verifies its hashes. An existing 7-Zip installation is required.
40+
- **Select extracted package** opens a folder picker for an already extracted official package. It does not download anything or require 7-Zip.
41+
- **Media runtime instructions** opens the [runtime guide](docs/development/FFMPEG_RUNTIME.md).
42+
43+
A runtime installed through the app is saved in your user data directory and remains available after restarting or replacing the portable EXE. Local Whisper uses its own independently installed runtime. AI model services and Gmail still require the separate configuration described below.
44+
45+
If you use a folder-based ZIP package instead, extract the **entire ZIP**, keep its DLLs, resources, and license files together, and run its `UFriend.exe`. The ZIP also includes `Install media runtime.cmd`; the runtime guide covers that alternative.
46+
47+
Use the data-location control in **Settings → General** to find the workspace. Fully quit UFriend before backing it up or replacing application files.
4048

4149
## Configure AI and Gmail
4250

@@ -83,13 +91,15 @@ npm test
8391
npm start
8492
```
8593

86-
After quitting the app, create a Windows portable package without an embedded FFmpeg executable:
94+
After quitting the app, build the single-file Windows portable EXE:
8795

8896
```powershell
89-
npm run package -- --without-ffmpeg
97+
npm run package:portable
9098
```
9199

92-
For a local package using the prepared FFmpeg runtime, use `npm run package`. The output is written to `dist/UFriend-<version>/`, or a timestamped directory if that version already exists. Packaging does not run the full test suite for you. See the installation guide for isolated development data, UI smoke tests, media prerequisites, and packaging details.
100+
This uses the pinned electron-builder 26.17.0 NSIS portable target. The first build needs network access to download its build tools. It creates and validates a folder package without FFmpeg or embedded OAuth settings, then writes `UFriend-<version>-Portable.exe` and its build receipt under `local/releases/UFriend-<version>-portable-<timestamp>-<id>/`. The verified folder package remains under `dist/`.
101+
102+
To create only the folder package for ZIP distribution, use `npm run package -- --without-ffmpeg`. For a local folder package using the prepared FFmpeg runtime, use `npm run package`. Packaging does not run the full test suite or publish a release. See the [installation guide](docs/guides/INSTALL_BUILD.md) for isolated development data, UI smoke tests, prerequisites, and packaging details.
93103

94104
## Architecture and data
95105

@@ -103,7 +113,7 @@ flowchart LR
103113
Main --> FFmpeg[Local FFmpeg process]
104114
```
105115

106-
- Mail, files, settings, and completed work are stored locally. Ordinary workspace files are not encrypted by UFriend. Credentials use Electron `safeStorage`, backed by the Windows user account.
116+
- Mail, files, settings, and completed work are stored locally, normally under `%APPDATA%\UFriend\workspace`. Ordinary workspace files are not encrypted by UFriend. Credentials use Electron `safeStorage`, backed by the Windows user account. An app-installed media runtime is stored separately under `%APPDATA%\UFriend\media-runtime\ffmpeg`.
107117
- Gmail operations connect to Google. External email images connect to their source websites. Local inference does not make every feature offline.
108118
- Cloud tasks send the necessary input to the configured endpoint. Chat includes the current conversation history; enabled profile context is included only in the applicable text tasks. Provider retention and charges depend on the provider.
109119
- Model output does not independently send mail, delete messages, create calendar events, or execute programs.

‎THIRD_PARTY_NOTICES.md‎

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
# Third-party software
22

3-
The MIT license in `LICENSE` covers UFriend. Third-party components retain
4-
their own copyrights and licenses.
3+
The [MIT license](LICENSE) covers UFriend's own code. Third-party components retain their own copyrights and licenses.
54

6-
- **Electron and Chromium**: portable packages preserve Electron's `LICENSE`
7-
and `LICENSES.chromium.html` beside the executable.
8-
- **npm dependencies**: exact versions and declared licenses are recorded in
9-
`package-lock.json`. Production dependency license files are retained under
10-
`resources/app/node_modules` in portable packages.
11-
- **FFmpeg**: the public portable package does not include an FFmpeg binary.
12-
The optional media installer obtains the pinned Gyan build directly from its
13-
publisher. That build is GPLv3; its license, upstream notices and provenance
14-
are provided in `scripts/runtime/ffmpeg` and retained when installed. See
15-
[FFmpeg runtime documentation](docs/development/FFMPEG_RUNTIME.md).
5+
- **Electron and Chromium**: folder packages retain Electron's `LICENSE` and `LICENSES.chromium.html` beside the application executable. The single-file portable EXE contains that application payload and expands it, including the notices, into its temporary run directory.
6+
- **npm dependencies**: exact versions and declared licenses are recorded in `package-lock.json`. Production dependency license files are retained under `resources/app/node_modules` in the application payload.
7+
- **Portable build tooling**: the single-file EXE is generated using the pinned electron-builder 26.17.0 NSIS portable target. Build dependencies are identified in the lockfile and retain their own licenses; they are separate from UFriend's project license.
8+
- **FFmpeg**: the public portable EXE and the ZIP built with `--without-ffmpeg` do not include an FFmpeg binary. The optional installer downloads the pinned Gyan build directly from its publisher, or accepts an extracted official package selected by the user. That build is GPLv3. Its license, upstream notices, and provenance are provided in `scripts/runtime/ffmpeg` and retained beside the installed executable. An installation through Settings is stored in the Windows user data directory and survives application restarts and updates. See [FFmpeg runtime documentation](docs/development/FFMPEG_RUNTIME.md).
169

17-
Redistribution of third-party binaries must comply with their own terms. The
18-
UFriend license does not replace or relicense those components.
10+
Redistribution of third-party binaries must comply with their own terms. The UFriend license does not replace or relicense those components.

‎app/locales/en-native.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
(function(){
22
'use strict';
33
const entries={
4+
'UFriend 正在關閉,請稍後再試。':'UFriend is closing. Try again after reopening it.',
5+
'選擇已解壓的官方 FFmpeg 套件':'Select the extracted official FFmpeg package',
6+
'此版本沒有影音元件安裝器,請查看安裝說明。':'This build has no media runtime installer. See the installation instructions.',
7+
'影音元件正在安裝,請稍候。':'The media runtime is being installed. Please wait.',
8+
'找不到 7-Zip。請先安裝 7-Zip,或選擇已解壓的官方 FFmpeg 套件。':'7-Zip was not found. Install 7-Zip first, or select an extracted official FFmpeg package.',
9+
'影音元件安裝失敗。請使用已解壓的官方套件重試,或查看安裝說明。':'Media runtime installation failed. Retry with the extracted official package, or see the installation instructions.',
10+
'影音元件安裝已取消。':'Media runtime installation was cancelled.',
11+
'影音元件安裝尚未停止,請稍後再試。':'Media runtime installation has not stopped yet. Try again shortly.',
412
'郵件排版內容過大,暫時顯示純文字。':'The formatted message is too large. Showing plain text for now.',
513
'郵件排版元件尚未載入。':'The message formatting component has not loaded yet.',
614
'圖片無法顯示':'Image unavailable',

‎app/locales/en-settings.js‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
(function () {
22
'use strict';
33
const entries = {
4+
"影音元件": "Media runtime",
5+
"匯出字幕影片與雲端語音轉錄需要 FFmpeg;只安裝一次,更新程式後仍可用。": "Captioned-video export and cloud speech require FFmpeg. Install it once; it remains available after app updates.",
6+
"自動下載需要 7-Zip,也可選取已解壓的官方套件。": "Automatic download requires 7-Zip. You can also select an extracted official package.",
7+
"正在下載與驗證影音元件…": "Downloading and verifying the media runtime…",
8+
"影音元件已就緒。": "The media runtime is ready.",
9+
"尚未安裝影音元件。": "The media runtime is not installed.",
10+
"下載並安裝影音元件": "Download and install media runtime",
11+
"選擇已解壓的套件": "Select extracted package",
12+
"影音元件安裝說明": "Media runtime instructions",
413
"使用 Google 帳號連接": "Connect with Google",
514
"郵件帳戶": "Email accounts",
615
"連接你的 Gmail": "Connect your Gmail",

0 commit comments

Comments
 (0)