none
This commit is contained in:
parent
8f5ad2984a
commit
6cf58ae408
3 changed files with 17 additions and 3 deletions
|
|
@ -23,8 +23,9 @@
|
|||
use warnings;
|
||||
use strict;
|
||||
|
||||
use Cwd; # Fast way to get the current directory
|
||||
use lib getcwd();
|
||||
use Cwd qw(getcwd); # Fast way to get the current directory
|
||||
use FindBin qw($Bin);
|
||||
use lib $Bin;
|
||||
use Frontier::Daemon::OGP::Forking; # Forking XML-RPC server
|
||||
use File::Copy; # Simple file copy functions
|
||||
use File::Copy::Recursive
|
||||
|
|
|
|||
|
|
@ -29,6 +29,19 @@ if not exist "%WD%OGP\ogp_agent.pl" (
|
|||
exit /b 1
|
||||
)
|
||||
|
||||
if not exist "%WD%OGP\Cfg\Config.pm" (
|
||||
echo Creating default Cfg\Config.pm from Config.pm.default...
|
||||
copy /Y "%WD%OGP\Cfg\Config.pm.default" "%WD%OGP\Cfg\Config.pm" >nul
|
||||
)
|
||||
if not exist "%WD%OGP\Cfg\Preferences.pm" (
|
||||
echo Creating default Cfg\Preferences.pm from Preferences.pm.default...
|
||||
copy /Y "%WD%OGP\Cfg\Preferences.pm.default" "%WD%OGP\Cfg\Preferences.pm" >nul
|
||||
)
|
||||
if not exist "%WD%OGP\Cfg\bash_prefs.cfg" (
|
||||
echo Creating default Cfg\bash_prefs.cfg from bash_prefs.cfg.default...
|
||||
copy /Y "%WD%OGP\Cfg\bash_prefs.cfg.default" "%WD%OGP\Cfg\bash_prefs.cfg" >nul
|
||||
)
|
||||
|
||||
REM Verify gameserver user exists
|
||||
net user %AGENT_USER%
|
||||
if errorlevel 1 (
|
||||
|
|
|
|||
|
|
@ -39,6 +39,6 @@ Common installed layout:
|
|||
|
||||
The launcher checks `%~dp0bin\bash.exe`, `C:\OGP64\bin\bash.exe`, `C:\cygwin64\bin\bash.exe`, and `C:\cygwin\bin\bash.exe`. Missing-bash errors should print every checked path and pause in manual use.
|
||||
|
||||
Generated config files under `/OGP/Cfg` are production state. Installer/startup may create them from `.default` templates if missing, but update logic must preserve them. Restart-time auto-update may replace only `/OGP/ogp_agent.pl`; it must not overwrite `Cfg/Config.pm`, `Cfg/Preferences.pm`, `Cfg/bash_prefs.cfg`, service settings, passwords, server data, or logs.
|
||||
Generated config files under `/OGP/Cfg` are production state. `C:\OGP64\agent_start.bat` may create them from `.default` templates if missing, but update logic must preserve them. Restart-time auto-update may replace only `/OGP/ogp_agent.pl`; it must not overwrite `Cfg/Config.pm`, `Cfg/Preferences.pm`, `Cfg/bash_prefs.cfg`, service settings, passwords, server data, or logs.
|
||||
|
||||
When the Windows agent starts, `C:\OGP64\agent_start.bat` should be launched from the Cygwin root itself. It verifies the `gameserver` account, normalizes text files, validates `OGP\ogp_agent.pl`, and then launches the agent in the same console window. It should not call an installer wrapper from the start script.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue