fixed config path for windows

This commit is contained in:
mathewguest 2021-08-18 21:47:27 -06:00
parent e86026e691
commit 92bf222868
3 changed files with 51 additions and 23 deletions

38
edit-config-windows.ps1 Normal file

@ -0,0 +1,38 @@
# Opens hie_parser configuration file in the default editor, creating file
# if necessary.
$config_filepath = Join-Path -Path "$env:USERPROFILE" -ChildPath "\AppData\Local\smileyface-ut4\hub_config.ini"
$dir_path = Split-Path -Path "$config_filepath"
# Create config directory if necessary:
if (!(Test-Path "$dir_path" -Type Container))
{
Write-Host "Creating config directory: $dir_path"
New-Item -ItemType "directory" -Path "$dir_path" > $null
Write-Host
}
# Create config.ini if necessary:
if (!(Test-Path "$config_filepath" -Type Leaf))
{
Write-Host "Creating new config.ini: $config_filepath"
New-Item -Path "$config_filepath" > $null
Set-Content "$config_filepath" @"
"@
}
# Open config.ini in favorite text editor:
Write-Host "Opening covid_parser configuration in your system-default editor"
Write-Host "Configuration file: $config_filepath"
Invoke-Item "$config_filepath"
# Leave terminal open after done:
if ($Host.Name -eq "ConsoleHost")
{
Write-Host "Done."
$host.UI.RawUI.ReadKey("NoEcho,IncludeKeyUp") > $null
}

@ -10,13 +10,13 @@ class SmileyFace(app_skellington.ApplicationContainer):
config_filepath = self._get_config_filepath(
'smileyface-ut4',
'app_author',
'',
'hub-config.ini'
)
super().__init__(
configspec_filepath=self.configspec_filepath,
config_filepath=config_filepath,
configini_filepath=config_filepath,
app_name = 'SmileyFace UT4 Server Panel',
app_author = 'Mathew Guest',
app_version = '0.1',

@ -1,24 +1,14 @@
[app]
project_dir = string(max=255, default='')
config_dir = string(max=255, default='')
download_url = string(max=255, default='https://s3.amazonaws.com/unrealtournament/ShippedBuilds/%2B%2BUT%2BRelease-Next-CL-3525360/UnrealTournament-Server-XAN-3525360-Linux.zip')
download_filename = string(max=255, default='UnrealTournament-Server-XAN-3525360-Linux.zip')
download_md5 = string(max=255, default='cad730ad6793ba6261f9a341ad7396eb')
skip_validate = boolean(default=False)
redirect_protocol = string(max=255, default='')
redirect_url = string(max=255, default='')
remote_game_host = string(max=255, default='')
remote_game_dir = string(max=255, default='')
remote_redirect_host = string(max=255, default='')
project_dir = string(max=255, default='')
config_dir = string(max=255, default='')
download_url = string(max=255, default='https://s3.amazonaws.com/unrealtournament/ShippedBuilds/%2B%2BUT%2BRelease-Next-CL-3525360/UnrealTournament-Server-XAN-3525360-Linux.zip')
download_filename = string(max=255, default='UnrealTournament-Server-XAN-3525360-Linux.zip')
download_md5 = string(max=255, default='cad730ad6793ba6261f9a341ad7396eb')
skip_validate = boolean(default=False)
redirect_protocol = string(max=255, default='')
redirect_url = string(max=255, default='')
remote_game_host = string(max=255, default='')
remote_game_dir = string(max=255, default='')
remote_redirect_host = string(max=255, default='')
[logging]