55using GeneralUpdate . ClientCore . Pipeline ;
66using GeneralUpdate . Common . FileBasic ;
77using GeneralUpdate . Common . Internal ;
8+ using GeneralUpdate . Common . Internal . Bootstrap ;
89using GeneralUpdate . Common . Internal . Event ;
910using GeneralUpdate . Common . Internal . Pipeline ;
1011using GeneralUpdate . Common . Internal . Strategy ;
@@ -21,7 +22,6 @@ namespace GeneralUpdate.ClientCore.Strategys;
2122public class LinuxStrategy : AbstractStrategy
2223{
2324 private GlobalConfigInfo _configinfo = new ( ) ;
24- private const string ProcessInfoFileName = "ProcessInfo.json" ;
2525
2626 public override void Create ( GlobalConfigInfo parameter ) => _configinfo = parameter ;
2727
@@ -97,17 +97,15 @@ public override void StartApp()
9797 {
9898 try
9999 {
100+ Environments . SetEnvironmentVariable ( "ProcessInfo" , _configinfo . ProcessInfo ) ;
100101 var appPath = Path . Combine ( _configinfo . InstallPath , _configinfo . AppName ) ;
101102 if ( File . Exists ( appPath ) )
102103 {
103- if ( File . Exists ( ProcessInfoFileName ) )
104+ Process . Start ( new ProcessStartInfo
104105 {
105- File . SetAttributes ( ProcessInfoFileName , FileAttributes . Normal ) ;
106- File . Delete ( ProcessInfoFileName ) ;
107- }
108-
109- File . WriteAllText ( ProcessInfoFileName , _configinfo . ProcessInfo ) ;
110- Process . Start ( appPath ) ;
106+ UseShellExecute = true ,
107+ FileName = appPath
108+ } ) ;
111109 }
112110 }
113111 catch ( Exception e )
0 commit comments