diff --git a/Program.cs b/Program.cs index df0671b..c0f97ea 100644 --- a/Program.cs +++ b/Program.cs @@ -53,7 +53,7 @@ Console.WriteLine($"AyaNovaProgramFolder resolved to: {AyaNovaProgramFolder}"); //================== LAUNCH POSTGRES SERVER ================== //https://notepad.onghu.com/2021/portable-postgresql-on-windows-without-installation/ -ProcessStartInfo PGStartInfo = new ProcessStartInfo(); +ProcessStartInfo PGStartInfo = new ProcessStartInfo(Path.Combine(AyaNovaProgramFolder, "local-postgres", "bin","pg_ctl.exe")); PGStartInfo.EnvironmentVariables["PGDATA"] = Path.Combine(DataPath, "database"); //PGStartInfo.EnvironmentVariables["PGDATABASE"] = "AyaNova"; PGStartInfo.EnvironmentVariables["PGUSER"] = "postgres"; @@ -64,7 +64,7 @@ PGStartInfo.EnvironmentVariables["PGLOGS "] = Path.Combine(DataPath, "logs"); //ARGUMENTS DOC: https://www.postgresql.org/docs/11/app-postgres.html //PGStartInfo.Arguments = $"-D {Path.Combine(DataPath, "database")} -o \"-p 5432\" -l {Path.Combine(DataPath, "logs","postgres.log")} start"; PGStartInfo.Arguments = "start"; -PGStartInfo.FileName = "pg_ctl.exe"; +//PGStartInfo.FileName = "pg_ctl_test.exe"; //PGStartInfo.WorkingDirectory = Path.Combine(DataPath, "database"); PGStartInfo.WorkingDirectory = Path.Combine(AyaNovaProgramFolder, "local-postgres", "bin"); @@ -94,8 +94,8 @@ set AYANOVA_DATA_PATH=%~dp0data //================== LAUNCH AYANOVA SERVER ================== //Go UP one folder from the current launcher folder which should *always* be contained within the AyaNova.exe containing folder if it was installed -ProcessStartInfo ServerStartInfo = new ProcessStartInfo(); -ServerStartInfo.FileName = "AyaNova.exe"; +ProcessStartInfo ServerStartInfo = new ProcessStartInfo(Path.Combine(AyaNovaProgramFolder, "AyaNova.exe")); +//ServerStartInfo.FileName = "AyaNova.exe"; ServerStartInfo.WorkingDirectory = AyaNovaProgramFolder; ServerStartInfo.UseShellExecute = false; var ServerProcess = Process.Start(ServerStartInfo);