Skip to content

Commit e47fdae

Browse files
Update version to 5.2, fix analytics reporting
1 parent 4243ed7 commit e47fdae

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

README.md

+6-11
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,12 @@ nexustools --no-analytics
4646

4747
This analytics data is viewable publicly at [plausible.io/nexustools.corbin.io](https://plausible.io/nexustools.corbin.io).
4848

49-
---------------------------------------
49+
### Development info
5050

51-
This program is free software: you can redistribute it and/or modify
52-
it under the terms of the GNU General Public License as published by
53-
the Free Software Foundation, either version 3 of the License, or
54-
(at your option) any later version.
51+
Nexus Tools is written in Dart, so you need the [Dart SDK](https://dart.dev/get-dart) to work on it. You can run Nexus Tools from source like this:
5552

56-
This program is distributed in the hope that it will be useful,
57-
but WITHOUT ANY WARRANTY; without even the implied warranty of
58-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
59-
GNU General Public License for more details.
53+
```
54+
dart ./bin/main.dart
55+
```
6056

61-
You should have received a copy of the GNU General Public License
62-
along with this program. If not, see <http://www.gnu.org/licenses/>.
57+
The `compile.sh` (macOS and Linux) and `compile.ps1` scripts create executables and zip them. You can also use GitHub Actions to compile Nexus Tools, by navigating to Actions > Compile Nexus Tools > Run workflow.

bin/main.dart

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import 'package:archive/archive_io.dart';
22
import 'package:http/http.dart' as http;
33
import 'dart:io' as io;
44
import 'package:archive/archive.dart';
5+
import 'package:uuid/uuid.dart';
56
import 'dart:convert';
67
import 'package:nexustools/sys.dart' as sys;
78

@@ -13,7 +14,7 @@ String windowsZip =
1314
'https://dl.google.com/android/repository/platform-tools-latest-windows.zip';
1415
List supportedCPUs = ['amd64', 'x86_64', 'AMD64'];
1516
Map envVars = io.Platform.environment;
16-
double appVersion = 5.1;
17+
double appVersion = 5.2;
1718

1819
// Function for checking for update
1920
Future checkUpdate() async {
@@ -183,6 +184,8 @@ Future installWindowsDrivers(String dir) async {
183184

184185
// Function for Plausible Analytics reporting
185186
void connectAnalytics() async {
187+
var uuid = Uuid();
188+
var id = uuid.v4();
186189
// Get exact operating system
187190
var realOS = '';
188191
var isWSL = await io.Directory('/mnt/c/Windows').exists();
@@ -201,6 +204,7 @@ void connectAnalytics() async {
201204
'user-agent': 'Nexus Tools',
202205
'X-Forwarded-For': '127.0.0.1',
203206
'Content-Type': 'application/json',
207+
'User-Agent': 'Mozilla/5.0 ($realOS) AppleWebKit/500 (KHTML, like Gecko) Chrome/$id'
204208
};
205209
var netBody = '{"name":"pageview","url":"app://localhost/$realOS/$cpu","domain":"nexustools.corbin.io"}';
206210
// Send request

0 commit comments

Comments
 (0)