refactor: rename windows-client to gui-client (#3721)

This may cause conflicts with all my other PRs but it has to happen.

```[tasklist]
- [ ] Update test names in branch protection (I don't think I have perms for this)
```
This commit is contained in:
Reactor Scram
2024-02-22 14:21:27 -06:00
committed by GitHub
parent 3bd7dc504e
commit 4106419ef1
68 changed files with 88 additions and 90 deletions

View File

@@ -28,7 +28,7 @@ jobs:
- runs-on: macos-14
packages: -p connlib-client-apple -p snownet
- runs-on: windows-2022
packages: -p connlib-client-shared -p firezone-windows-client -p snownet
packages: -p connlib-client-shared -p firezone-gui-client -p snownet
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
@@ -60,9 +60,9 @@ jobs:
- runs-on: macos-14
packages: -p connlib-client-apple -p snownet
- runs-on: windows-2019
packages: -p firezone-windows-client -p connlib-client-shared -p snownet
packages: -p firezone-gui-client -p connlib-client-shared -p snownet
- runs-on: windows-2022
packages: -p firezone-windows-client -p connlib-client-shared -p snownet
packages: -p firezone-gui-client -p connlib-client-shared -p snownet
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
@@ -87,7 +87,7 @@ jobs:
runs-on: ${{ matrix.runs-on }}
defaults:
run:
working-directory: ./rust/windows-client
working-directory: ./rust/gui-client
env:
CONNLIB_LOG_UPLOAD_INTERVAL_SECS: 300
# The Windows client ignores RUST_LOG because it uses a settings file instead
@@ -107,9 +107,9 @@ jobs:
- name: Compile Tailwind
run: pnpm tailwindcss -i src/input.css -o src/output.css
- name: Build client
run: cargo build -p firezone-windows-client
run: cargo build -p firezone-gui-client
- name: Run smoke test
run: cargo run -p firezone-windows-client -- smoke-test
run: cargo run -p firezone-gui-client -- smoke-test
- name: Test that the crash handler produces a crash dump
run: bash scripts/crash-handling-smoke-test.bash
@@ -119,7 +119,7 @@ jobs:
runs-on: ${{ matrix.runs-on }}
defaults:
run:
working-directory: ./rust/windows-client
working-directory: ./rust/gui-client
strategy:
fail-fast: false
matrix:
@@ -127,11 +127,8 @@ jobs:
# TODO
# - ubuntu-20.04
- windows-2019
include:
# - runs-on: ubuntu-20.04
- runs-on: windows-2019
env:
BINARY_DEST_PATH: firezone-windows-client
BINARY_DEST_PATH: firezone-gui-client
CONNLIB_LOG_UPLOAD_INTERVAL_SECS: 300
steps:
- uses: actions/checkout@v4
@@ -150,7 +147,7 @@ jobs:
# In release mode the name comes from tauri.conf.json
cp "../target/release/Firezone.exe" "${{ env.BINARY_DEST_PATH }}-x64.exe"
cp "../target/release/bundle/msi/*.msi" "${{ env.BINARY_DEST_PATH }}-x64.msi"
cp "../target/release/firezone_windows_client.pdb" "${{ env.BINARY_DEST_PATH }}-x64.pdb"
cp "../target/release/firezone_gui_client.pdb" "${{ env.BINARY_DEST_PATH }}-x64.pdb"
Get-FileHash ${{ env.BINARY_DEST_PATH }}-x64.exe -Algorithm SHA256 | Select-Object Hash > ${{ env.BINARY_DEST_PATH }}-x64.exe.sha256sum.txt
Get-FileHash ${{ env.BINARY_DEST_PATH }}-x64.msi -Algorithm SHA256 | Select-Object Hash > ${{ env.BINARY_DEST_PATH }}-x64.msi.sha256sum.txt
@@ -164,21 +161,21 @@ jobs:
with:
name: ${{ env.BINARY_DEST_PATH }}-x64
path: |
${{ github.workspace }}/rust/windows-client/${{ env.BINARY_DEST_PATH }}-x64.exe
${{ github.workspace }}/rust/windows-client/${{ env.BINARY_DEST_PATH }}-x64.exe.sha256sum.txt
${{ github.workspace }}/rust/gui-client/${{ env.BINARY_DEST_PATH }}-x64.exe
${{ github.workspace }}/rust/gui-client/${{ env.BINARY_DEST_PATH }}-x64.exe.sha256sum.txt
- name: Save Windows MSI installer
if: ${{ runner.os == 'Windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_DEST_PATH }}-x64-msi
path: |
${{ github.workspace }}/rust/windows-client/${{ env.BINARY_DEST_PATH }}-x64.msi
${{ github.workspace }}/rust/windows-client/${{ env.BINARY_DEST_PATH }}-x64.msi.sha256sum.txt
${{ github.workspace }}/rust/gui-client/${{ env.BINARY_DEST_PATH }}-x64.msi
${{ github.workspace }}/rust/gui-client/${{ env.BINARY_DEST_PATH }}-x64.msi.sha256sum.txt
- name: Save Windows debug symbols
if: ${{ runner.os == 'Windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BINARY_DEST_PATH }}-x64-pdb
path: |
${{ github.workspace }}/rust/windows-client/${{ env.BINARY_DEST_PATH }}-x64.pdb
${{ github.workspace }}/rust/windows-client/${{ env.BINARY_DEST_PATH }}-x64.pdb.sha256sum.txt
${{ github.workspace }}/rust/gui-client/${{ env.BINARY_DEST_PATH }}-x64.pdb
${{ github.workspace }}/rust/gui-client/${{ env.BINARY_DEST_PATH }}-x64.pdb.sha256sum.txt

View File

@@ -243,23 +243,21 @@ jobs:
runs-on: windows-2019
defaults:
run:
working-directory: ./rust/windows-client
working-directory: ./rust/gui-client
strategy:
fail-fast: false
# The matrix is 1x1 to match the style of build-push-linux-release-artifacts
# In the future we could try to cross-compile aarch64-windows here.
matrix:
name:
- package: firezone-windows-client
artifact: windows-client
- package: firezone-gui-client
artifact: gui-client
env:
BINARY_DEST_PATH: firezone-${{ matrix.name.artifact }}
CONNLIB_LOG_UPLOAD_INTERVAL_SECS: 300
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-rust
with:
targets: x86_64-pc-windows-msvc
- uses: ./.github/actions/setup-node
- name: Install pnpm deps
run: pnpm install
@@ -278,7 +276,7 @@ jobs:
run: |
# Upload Windows MSI
# This artifact name is tied to the update checker in `windows-client/src-tauri/src/client/updates.rs`
# This artifact name is tied to the update checker in `gui-client/src-tauri/src/client/updates.rs`
gh release upload ${{ needs.update-release-draft.outputs.tag_name }} `
${{ env.BINARY_DEST_PATH }}-x64.msi `
${{ env.BINARY_DEST_PATH }}-x64.msi.sha256sum.txt `

104
rust/Cargo.lock generated
View File

@@ -1816,6 +1816,58 @@ dependencies = [
"uuid",
]
[[package]]
name = "firezone-gui-client"
version = "1.0.0"
dependencies = [
"anyhow",
"arboard",
"arc-swap",
"bincode",
"chrono",
"clap",
"connlib-client-shared",
"connlib-shared",
"crash-handler",
"firezone-cli-utils",
"git-version",
"hex",
"hostname",
"ipconfig",
"keyring",
"known-folders",
"minidumper",
"native-dialog",
"output_vt100",
"rand 0.8.5",
"reqwest",
"ring",
"sadness-generator",
"secrecy",
"semver",
"serde",
"serde_json",
"subtle",
"tauri",
"tauri-build",
"tauri-runtime",
"tauri-utils",
"tauri-winrt-notification",
"thiserror",
"tokio",
"tracing",
"tracing-log 0.2.0",
"tracing-panic",
"tracing-subscriber",
"url",
"uuid",
"windows 0.52.0",
"windows-implement 0.52.0",
"winreg 0.52.0",
"wintun",
"zip",
]
[[package]]
name = "firezone-linux-client"
version = "1.0.0"
@@ -1922,58 +1974,6 @@ dependencies = [
"wintun",
]
[[package]]
name = "firezone-windows-client"
version = "1.0.0"
dependencies = [
"anyhow",
"arboard",
"arc-swap",
"bincode",
"chrono",
"clap",
"connlib-client-shared",
"connlib-shared",
"crash-handler",
"firezone-cli-utils",
"git-version",
"hex",
"hostname",
"ipconfig",
"keyring",
"known-folders",
"minidumper",
"native-dialog",
"output_vt100",
"rand 0.8.5",
"reqwest",
"ring",
"sadness-generator",
"secrecy",
"semver",
"serde",
"serde_json",
"subtle",
"tauri",
"tauri-build",
"tauri-runtime",
"tauri-utils",
"tauri-winrt-notification",
"thiserror",
"tokio",
"tracing",
"tracing-log 0.2.0",
"tracing-panic",
"tracing-subscriber",
"url",
"uuid",
"windows 0.52.0",
"windows-implement 0.52.0",
"winreg 0.52.0",
"wintun",
"zip",
]
[[package]]
name = "flate2"
version = "1.0.28"

View File

@@ -12,7 +12,7 @@ members = [
"snownet-tests",
"phoenix-channel",
"relay",
"windows-client/src-tauri",
"gui-client/src-tauri",
]
resolver = "2"
@@ -38,7 +38,7 @@ connlib-client-apple = { path = "connlib/clients/apple"}
connlib-client-shared = { path = "connlib/clients/shared"}
firezone-gateway = { path = "gateway"}
firezone-linux-client = { path = "linux-client"}
firezone-windows-client = { path = "windows-client/src-tauri"}
firezone-gui-client = { path = "gui-client/src-tauri"}
firezone-cli-utils = { path = "firezone-cli-utils"}
snownet = { path = "connlib/snownet"}
firezone-relay = { path = "relay"}
@@ -58,7 +58,7 @@ quinn-udp = { git = "https://github.com/conectado/quinn", branch = "main" }
strip = true
# Override build settings just for the Windows client, so we get a pdb
[profile.release.package.firezone-windows-client]
[profile.release.package.firezone-gui-client]
# Generate debug symbols for the crash handler to use, even if the exe itself is optimized
debug = "full"
# Split out debug info from the exe. This is already default on Windows.

View File

@@ -1,4 +1,4 @@
How to run manual tests of `firezone-windows-client`
How to run manual tests of `firezone-gui-client`
Using [Given-when-then syntax](https://en.wikipedia.org/wiki/Given-When-Then)
@@ -6,7 +6,7 @@ Using [Given-when-then syntax](https://en.wikipedia.org/wiki/Given-When-Then)
The client may be running or not running.
Only one instance of the client may run at a time per Windows device. If two users are logged in at once, starting a 2nd instance results in undefined behavior.
Only one instance of the client may run at a time per system. If two users are logged in at once, starting a 2nd instance results in undefined behavior.
If the client is running, the GUI may be in a "signed out", "signed in", or "signing in" state.

View File

@@ -9,7 +9,7 @@ DUMP_PATH="$LOCALAPPDATA/$BUNDLE_ID/data/logs/last_crash.dmp"
rm -f "$DUMP_PATH"
# Ignore the exit code, this is supposed to crash
cargo run -p firezone-windows-client -- --crash || true
cargo run -p firezone-gui-client -- --crash || true
# Fail if the crash file wasn't written
stat "$DUMP_PATH"

View File

@@ -1,5 +1,5 @@
[package]
name = "firezone-windows-client"
name = "firezone-gui-client"
# mark:automatic-version
version = "1.0.0"
description = "Firezone"

View File

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -128,6 +128,7 @@ fn run_gui(cli: Cli) -> Result<()> {
fn show_error_dialog(error: &gui::Error) -> Result<()> {
let error_msg = match error {
// TODO: Update this URL
gui::Error::WebViewNotInstalled => "Firezone cannot start because WebView2 is not installed. Follow the instructions at <https://www.firezone.dev/kb/user-guides/windows-client>.".to_string(),
gui::Error::DeepLink(deep_link::Error::CantListen) => "Firezone is already running. If it's not responding, force-stop it.".to_string(),
error => error.to_string(),

View File

@@ -22,7 +22,7 @@ impl Default for AdvancedSettings {
Self {
auth_base_url: Url::parse("https://app.firez.one").unwrap(),
api_url: Url::parse("wss://api.firez.one").unwrap(),
log_filter: "firezone_windows_client=debug,firezone_tunnel=trace,phoenix_channel=debug,connlib_shared=debug,connlib_client_shared=debug,snownet=debug,str0m=info,warn".to_string(),
log_filter: "firezone_gui_client=debug,firezone_tunnel=trace,phoenix_channel=debug,connlib_shared=debug,connlib_client_shared=debug,snownet=debug,str0m=info,warn".to_string(),
}
}
}
@@ -33,7 +33,7 @@ impl Default for AdvancedSettings {
Self {
auth_base_url: Url::parse("https://app.firezone.dev").unwrap(),
api_url: Url::parse("wss://api.firezone.dev").unwrap(),
log_filter: "firezone_windows_client=info,firezone_tunnel=trace,phoenix_channel=info,connlib_shared=info,connlib_client_shared=info,snownet=debug,str0m=info,warn".to_string(),
log_filter: "firezone_gui_client=info,firezone_tunnel=trace,phoenix_channel=info,connlib_shared=info,connlib_client_shared=info,snownet=debug,str0m=info,warn".to_string(),
}
}
}

View File

@@ -9,7 +9,7 @@ use url::Url;
pub(crate) struct Release {
/// URL that will instantly try to download the MSI to disk
///
/// e.g. <https://github.com/firezone/firezone/releases/download/1.0.0-pre.8/windows-client-x64.msi>
/// e.g. <https://github.com/firezone/firezone/releases/download/1.0.0-pre.8/gui-client-x64.msi>
pub browser_download_url: Url,
/// Git tag name
///
@@ -68,7 +68,8 @@ const GITHUB_API_VERSION: &str = "2022-11-28";
/// The name of the Windows MSI asset.
///
/// This ultimately comes from `cd.yml`
const MSI_ASSET_NAME: &str = "firezone-windows-client-x64.msi";
// TODO: Remove 'windows'
const MSI_ASSET_NAME: &str = "firezone-gui-client-windows-x64.msi";
/// Returns the latest release, even if ours is already newer
pub(crate) async fn check() -> Result<Release, Error> {
@@ -77,6 +78,7 @@ pub(crate) async fn check() -> Result<Release, Error> {
// <https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28#user-agent-required>
// This would change for aarch64 support
let user_agent = format!(
// TODO: remove 'windows'
"Firezone Client/{:?} (Windows; Win64; x64)",
current_version()
);
@@ -168,7 +170,7 @@ mod tests {
"url": "https://api.github.com/repos/firezone/firezone/releases/assets/147443612",
"id": 147443612,
"node_id": "RA_kwDOD12Hpc4Iyc-c",
"name": "firezone-windows-client-x64.msi",
"name": "firezone-gui-client-windows-x64.msi",
"label": "",
"uploader": {
"login": "github-actions[bot]",
@@ -196,7 +198,7 @@ mod tests {
"download_count": 10,
"created_at": "2024-01-24T04:33:53Z",
"updated_at": "2024-01-24T04:33:53Z",
"browser_download_url": "https://github.com/firezone/firezone/releases/download/1.0.0-pre.8/firezone-windows-client-x64.msi"
"browser_download_url": "https://github.com/firezone/firezone/releases/download/1.0.0-pre.8/firezone-gui-client-windows-x64.msi"
}
]
}"#;
@@ -204,7 +206,7 @@ mod tests {
#[test]
fn test() {
let release = super::Release::from_str(RELEASES_LATEST_JSON).unwrap();
assert_eq!(release.browser_download_url.to_string(), "https://github.com/firezone/firezone/releases/download/1.0.0-pre.8/firezone-windows-client-x64.msi");
assert_eq!(release.browser_download_url.to_string(), "https://github.com/firezone/firezone/releases/download/1.0.0-pre.8/firezone-gui-client-windows-x64.msi");
assert_eq!(release.tag_name.to_string(), "1.0.0-pre.8");
assert!(

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB