From 477d042670603e1eae9a88d4ea88aa207c345c0e Mon Sep 17 00:00:00 2001 From: Alex L Date: Mon, 9 Feb 2026 01:08:56 +0200 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project1.lps | 18 +++++++++--------- unit1.pas | 17 ++++++++--------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/project1.lps b/project1.lps index 23aaccc..14633b2 100644 --- a/project1.lps +++ b/project1.lps @@ -10,7 +10,7 @@ - + @@ -20,9 +20,9 @@ - - - + + + @@ -31,14 +31,10 @@ - + - - - - @@ -155,6 +151,10 @@ + + + + diff --git a/unit1.pas b/unit1.pas index e20434a..7f7a5c5 100644 --- a/unit1.pas +++ b/unit1.pas @@ -141,15 +141,8 @@ begin Write(f, player_name_edit.Text); CloseFile(f); - Process:= TProcess.Create(nil); - Process.Executable:= 'HytaleClient.exe'; - Parameters:= '--app-dir "'+APath+app_dir+'" --java-exec "'+APath+java_exec+'" --user-dir "'+APath+user_dir+'" --auth-mode offline --uuid '+PLAYER_UUID+' --name '+PLAYER_NAME; - - Process.Parameters.Add(Parameters); - //ShowMessage(APath+Hytale_Dir+'HytaleClient.exe '+Parameters); - if not FileExists(APath+Hytale_Dir+'HytaleClient.exe') then begin ShowMessage('HytaleClient.exe не найден'); @@ -158,7 +151,9 @@ begin else begin ChDir(APath+Hytale_Dir); - //ExecuteProcess('HytaleClient.exe', Parameters); + Process:= TProcess.Create(nil); + Process.Executable:= 'HytaleClient.exe'; + Process.Parameters.Add(Parameters); Process.Execute; Close; end @@ -172,7 +167,11 @@ end; procedure TForm1.FormShow(Sender: TObject); begin APath:= ExtractFilePath(Application.ExeName); - ForceDirectories(ExtractFilePath(APath+user_dir)); + if not ForceDirectories(ExtractFilePath(APath+user_dir+'\')) then + begin + ShowMessage('Не удалось создать папку UserData'); + Close; + end; SetPlayerName(); GenerateID();