Skip to content

Commit

Permalink
add Chinese readme; improved prompt for macOS users.
Browse files Browse the repository at this point in the history
  • Loading branch information
Archeb committed Aug 30, 2023
1 parent 4a8a00f commit ea60f47
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 30 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,22 @@ name: build-linux

on:
push:
branches: [ "master" ]
branches:
- master
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.resx"
- ".github/workflows/*.yml"
pull_request:
branches: [ "master" ]

branches:
- master
types: [opened, synchronize, reopened]
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.resx"
- ".github/workflows/*.yml"
jobs:

build:
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@ name: build-macos

on:
push:
branches: [ "master" ]
branches:
- master
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.resx"
- ".github/workflows/*.yml"
pull_request:
branches: [ "master" ]
branches:
- master
types: [opened, synchronize, reopened]
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.resx"
- ".github/workflows/*.yml"

jobs:

Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,22 @@ name: build-windows

on:
push:
branches: [ "master" ]
branches:
- master
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.resx"
- ".github/workflows/*.yml"
pull_request:
branches: [ "master" ]
branches:
- master
types: [opened, synchronize, reopened]
paths:
- "**/*.cs"
- "**/*.csproj"
- "**/*.resx"
- ".github/workflows/*.yml"

jobs:

Expand Down
8 changes: 4 additions & 4 deletions MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public MainForm()
var aboutCommand = new Command { MenuText = Resources.ABOUT };
aboutCommand.Executed += (sender, e) => Process.Start(new ProcessStartInfo("https://github.com/Archeb/opentrace") { UseShellExecute = true });

var preferenceCommand = new Command { MenuText = Resources.PREFERENCES };
var preferenceCommand = new Command { MenuText = Resources.PREFERENCES, Shortcut = Application.Instance.CommonModifier | Keys.Comma };
preferenceCommand.Executed += (sender, e) => new PreferencesDialog().ShowModal();

// 创建菜单栏
Expand Down Expand Up @@ -282,11 +282,11 @@ private void StartTracerouteButton_Click(object sender, EventArgs e)
catch (FileNotFoundException)
{
// 未能在默认搜寻目录中找到NextTrace,询问是否下载 NextTrace
DialogResult dr = MessageBox.Show(Resources.MISSING_COMP_TEXT,
Resources.MISSING_COMP, MessageBoxButtons.YesNo);
DialogResult dr = MessageBox.Show(RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? Resources.MISSING_COMP_TEXT_MACOS : Resources.MISSING_COMP_TEXT ,
Resources.MISSING_COMP, MessageBoxButtons.YesNo);
if (dr == DialogResult.Yes)
{
Process.Start(new ProcessStartInfo("https://github.com/nxtrace/Ntrace-V1/releases/tag/v1.1.7-2") { UseShellExecute = true });
Process.Start(new ProcessStartInfo("https://github.com/nxtrace/Ntrace-V1/releases/") { UseShellExecute = true });
}
CurrentInstance = null;
return;
Expand Down
2 changes: 1 addition & 1 deletion OpenTrace.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Title>OpenTrace</Title>
<ApplicationIcon>icon.ico</ApplicationIcon>
<PackageIcon>icon.png</PackageIcon>
<Version>1.2.4.0</Version>
<Version>1.2.4.1</Version>

</PropertyGroup>

Expand Down
18 changes: 18 additions & 0 deletions Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@ NextTrace can be placed in either:
OR
2. A directory included in your system's PATH environment variable

Would you like to download the NextTrace utility now?</value>
</data>
<data name="MISSING_COMP_TEXT_MACOS" xml:space="preserve">
<value>OpenTrace requires the NextTrace utility to function properly. This executable is currently missing.
Please download NextTrace and set the permissions as follows:

sudo xattr -r -d com.apple.quarantine /path/to/nexttrace
sudo chown root:admin /path/to/nexttrace
sudo chmod +sx /path/to/nexttrace

And specify the path in the settings.

Would you like to download the NextTrace utility now?</value>
</data>
<data name="MISSING_SPECIFIED_COMP" xml:space="preserve">
Expand Down
16 changes: 14 additions & 2 deletions Properties/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<value>异常输出</value>
</data>
<data name="EXE_PATH" xml:space="preserve">
<value>可执行文件目录</value>
<value>可执行文件路径</value>
</data>
<data name="EXPORT" xml:space="preserve">
<value>导出</value>
Expand Down Expand Up @@ -263,6 +263,18 @@
2. PATH 环境变量中的目录下

是否现在下载 NextTrace?</value>
</data>
<data name="MISSING_COMP_TEXT_MACOS" xml:space="preserve">
<value>OpenTrace 需要 NextTrace 才能正常工作,但未能找到可执行文件。
请下载 NextTrace 并设置好权限:

sudo xattr -r -d com.apple.quarantine /path/to/nexttrace
sudo chown root:admin /path/to/nexttrace
sudo chmod +sx /path/to/nexttrace

然后在设置中指定 NextTrace 路径。

是否现在下载 NextTrace?</value>
</data>
<data name="MISSING_SPECIFIED_COMP" xml:space="preserve">
Expand Down Expand Up @@ -362,6 +374,6 @@
<value>Windows 暂不支持 TCP/UDP Traceroute</value>
</data>
<data name="WORST" xml:space="preserve">
<value>最差延迟</value>
<value>最大延迟</value>
</data>
</root>
16 changes: 14 additions & 2 deletions Properties/Resources.zh-HK.resx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<value>異常輸出</value>
</data>
<data name="EXE_PATH" xml:space="preserve">
<value>可執行文件目錄</value>
<value>可執行文件路徑</value>
</data>
<data name="EXPORT" xml:space="preserve">
<value>導出</value>
Expand Down Expand Up @@ -263,6 +263,18 @@
2. PATH 環境變量中的目錄下

是否現在下載 NextTrace?</value>
</data>
<data name="MISSING_COMP_TEXT_MACOS" xml:space="preserve">
<value>OpenTrace 需要 NextTrace 才能正常工作,但未能找到可執行文件。
請下載 NextTrace 並設置好權限:

sudo xattr -r -d com.apple.quarantine /path/to/nexttrace
sudo chown root:admin /path/to/nexttrace
sudo chmod +sx /path/to/nexttrace

然後在設置中指定 NextTrace 路徑。

是否現在下載 NextTrace?</value>
</data>
<data name="MISSING_SPECIFIED_COMP" xml:space="preserve">
Expand Down Expand Up @@ -362,6 +374,6 @@
<value>Windows 暫不支持 TCP/UDP Traceroute</value>
</data>
<data name="WORST" xml:space="preserve">
<value>最差延遲</value>
<value>最大延遲</value>
</data>
</root>
16 changes: 14 additions & 2 deletions Properties/Resources.zh-TW.resx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<value>異常輸出</value>
</data>
<data name="EXE_PATH" xml:space="preserve">
<value>可執行檔案目錄</value>
<value>可執行檔案路徑</value>
</data>
<data name="EXPORT" xml:space="preserve">
<value>匯出</value>
Expand Down Expand Up @@ -263,6 +263,18 @@
2. PATH 環境變數中的目錄下

是否現在下載 NextTrace?</value>
</data>
<data name="MISSING_COMP_TEXT_MACOS" xml:space="preserve">
<value>OpenTrace 需要 NextTrace 才能正常工作,但未能找到可執行檔案。
請下載 NextTrace 並設定好權限:

sudo xattr -r -d com.apple.quarantine /path/to/nexttrace
sudo chown root:admin /path/to/nexttrace
sudo chmod +sx /path/to/nexttrace

然後在設定中指定 NextTrace 路徑。

是否現在下載 NextTrace?</value>
</data>
<data name="MISSING_SPECIFIED_COMP" xml:space="preserve">
Expand Down Expand Up @@ -359,6 +371,6 @@
<value>Windows 暫不支援 TCP/UDP Traceroute</value>
</data>
<data name="WORST" xml:space="preserve">
<value>最差延遲</value>
<value>最大延遲</value>
</data>
</root>
30 changes: 18 additions & 12 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,39 @@

## OpenTrace

OpenTrace 是 NextTrace 的跨平台 GUI 界面,带来您熟悉但更强大的用户体验。

OpenTrace is a cross-platform GUI wrapper for NextTrace. Bringing you a sense of familiarity.

您需要 NextTrace V1 (>= 1.1.7) 的可执行文件才能使用 OpenTrace

You need a working **NextTrace V1** (>= 1.1.7) executable to use this.

### Features
[English Version](readme_en.md)

### 功能

- [x] Cross-platform native GUI (Windows WPF / Linux GTK / macOS)
- [x] 跨平台原生GUI(Windows WPF / Linux GTK / macOS

- [x] An interface you are familiar with, but with even more powerful functionalities
- [x] 您熟悉但功能更强大的界面

- [x] User-friendly GUI and easy-to-understand parameter descriptions
- [x] 用户友好的GUI和易于理解的参数描述

- [x] MTR (My Traceroute) functionality
- [x] MTR (My Traceroute) 功能

- [x] Multi-language support
- [x] 多语言支持

More is coming...
新功能不断添加中...欢迎向我们[提出功能请求](https://github.com/Archeb/opentrace/issues/new/choose)

### Usage
### 使用方法

- Download OpenTrace from [releases](https://github.com/Archeb/opentrace/releases) or build your own binary.
- 自行编译或从 [releases](https://github.com/Archeb/opentrace/releases) 里下载 OpenTrace

- Follow the instruction to install [NextTrace V1](https://github.com/nxtrace/Ntrace-V1/releases): Download the latest release from [here](https://github.com/nxtrace/Ntrace-V1/releases), and place it in either the same directory as the OpenTrace executable or a directory included in your system's PATH environment variable.
- 下载并安装 [NextTrace V1](https://github.com/nxtrace/Ntrace-V1/releases): [这里](https://github.com/nxtrace/Ntrace-V1/releases) 下载对应系统架构的 NextTrace,然后将其放置于 OpenTrace 目录下,或者放置到系统 PATH 环境变量包含的目录中;您亦可以放到任意位置并手动指定路径(macOS 用户推荐)。

- Run OpenTrace(.exe)
- 运行 OpenTrace(.exe)

### Images
### 预览图

![Windows](https://github.com/Archeb/opentrace/assets/11910831/510b61a2-712e-4d83-ae94-f396862e68df)
![MTR on Linux](https://i.imgur.com/MxSHIcU.png)
Expand Down
40 changes: 40 additions & 0 deletions readme_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<div align="center">

<img src="https://github.com/nxtrace/Ntrace-core/raw/main/asset/logo.png" height="200px" alt="Logo"/>

</div>

## OpenTrace

OpenTrace is a cross-platform GUI wrapper for NextTrace. Bringing you a sense of familiarity.

You need a working **NextTrace V1** (>= 1.1.7) executable to use this.

### Features

- [x] Cross-platform native GUI (Windows WPF / Linux GTK / macOS)

- [x] An interface you are familiar with, but with even more powerful functionalities

- [x] User-friendly GUI and easy-to-understand parameter descriptions

- [x] MTR (My Traceroute) functionality

- [x] Multi-language support

More is coming... [Feature request](https://github.com/Archeb/opentrace/issues/new/choose) is welcome!

### Usage

- Download OpenTrace from [releases](https://github.com/Archeb/opentrace/releases) or build your own binary.

- Follow the instruction to install [NextTrace V1](https://github.com/nxtrace/Ntrace-V1/releases): Download the latest release from [here](https://github.com/nxtrace/Ntrace-V1/releases), and place it in either the same directory as the OpenTrace executable or a directory included in your system's PATH environment variable. You can also put it anywhere and specify the path manually (recommended for macOS users).

- Run OpenTrace(.exe)

### Images

![Windows](https://github.com/Archeb/opentrace/assets/11910831/510b61a2-712e-4d83-ae94-f396862e68df)
![MTR on Linux](https://i.imgur.com/MxSHIcU.png)
![macOS](https://i.imgur.com/brB08tl.png)
![Preferences on macOS](https://i.imgur.com/X0L6c6S.png)

0 comments on commit ea60f47

Please sign in to comment.