обновление
This commit is contained in:
17
unit1.pas
17
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();
|
||||
|
||||
Reference in New Issue
Block a user