코드 정리
This commit is contained in:
parent
cc0433b256
commit
1ca584fc12
4 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import 'dart:io';
|
||||
|
||||
import 'package:dart_framework/data/isolate_data.dart';
|
||||
import 'package:dart_framework/platform/platform_base.dart';
|
||||
import 'package:dart_framework/utils/string_util.dart';
|
||||
import 'package:dart_framework/utils/system_util.dart';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import 'package:dart_framework/data/isolate_data.dart';
|
||||
import 'package:dart_framework/platform/platform_stub.dart'
|
||||
if (dart.library.io) 'package:dart_framework/log/log_writer_io.dart'
|
||||
if (dart.library.html) 'package:dart_framework/log/log_writer_web.dart';
|
||||
|
|
|
|||
|
|
@ -211,10 +211,11 @@ class ProcessExecutor {
|
|||
}
|
||||
|
||||
static String get tempFileName {
|
||||
if (Platform.isMacOS || Platform.isLinux)
|
||||
if (Platform.isMacOS || Platform.isLinux) {
|
||||
return 'temp_${DateTime.now().microsecondsSinceEpoch}.sh';
|
||||
else
|
||||
} else {
|
||||
return 'temp_${DateTime.now().microsecondsSinceEpoch}.bat';
|
||||
}
|
||||
}
|
||||
|
||||
static bool getSuccess(int exitCode) {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ class _Startup {
|
|||
}
|
||||
}
|
||||
|
||||
/// ************* MAC ***************
|
||||
class _StartupMac extends _Startup {
|
||||
final plistTemplate = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
|
|
@ -168,6 +169,7 @@ class _StartupMac extends _Startup {
|
|||
}
|
||||
}
|
||||
|
||||
/// ************* LINUX ***************
|
||||
class _StartupLinux extends _Startup {
|
||||
final serviceTemplate = """[Unit]
|
||||
Description={LABEL}
|
||||
|
|
@ -262,6 +264,7 @@ WantedBy=default.target""";
|
|||
}
|
||||
}
|
||||
|
||||
/// ************* WINDOWS ***************
|
||||
class _StartupWindows extends _Startup {
|
||||
final windowsStartupPath =
|
||||
'\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Startup\\';
|
||||
|
|
|
|||
Loading…
Reference in a new issue