Skip to content

Commit

Permalink
fix(example): path use Platform.script.toFilePath
Browse files Browse the repository at this point in the history
  • Loading branch information
au-top committed Oct 25, 2022
1 parent 063d8e0 commit 81d08e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import '../lib/define.dart';

void main(List<String> args) {
final dartConnectServiceDLL = DartConnectServiceDLL(dllPath);
final servicePath = join(Directory.current.path, "service.exe");
final servicePath = normalize(join(dirname(Platform.script.toFilePath()), "service.exe"));

dartConnectServiceDLL.dartInstallService(
serviceName.toNativeUtf16().cast<Uint16>(),
Expand Down
2 changes: 1 addition & 1 deletion dart_windows_service_support/example/lib/define.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import 'dart:io';

import 'package:path/path.dart';

final dllPath = join(Directory.current.path, "../../../dll/WindowsServiceDLL.dll");
final dllPath = normalize(join(dirname(Platform.script.toFilePath()), "../../../dll/WindowsServiceDLL.dll"));
const serviceName = "dartTestService";

0 comments on commit 81d08e5

Please sign in to comment.