Joriku
Working in the mines, need something?
Alright, so after hours and hours of work. I finally found an creative solution for OT 12 users or any other user for that matter that uses an auto restarter. This is not the best and can be developed futher.
MODS: If this is the wrong, just switch it. I couldn't find an post corner for this one.
Alright, what it does:
I asked around everywhere here on otland, and people i Know and everyone came back with the same answer. It's not possible... Well in your face, here it is.
Due to client.exe can't be moved out of "bin" folder, this is an solution to run your file anyways without moving it or make your auto updater run your file.
Here's my updater:
Note how i have a cfg for later folder for later.
Alright, it's automatically downloading the files (Auto updater..)
Note ConfigFilesDesktop/Downloads and Start.bat
Here's where the "magic" begins, and this is made with batch due to my c++ knowledge being trash like many others. So if you even dare to comment that it's useless, salamaleko i ban u .I.
Inside the start.bat:
Here we got some modifications, what this does.
Simple, it checks for downloads/desktop location of the "userprofile" and saves your cfg which i just discovered is deleted every time an update gets released. Here's where the "cfg" folder comes to use.
Here it checks for the location of "Hoxera" and it's files, launches up either desktop or downloads and runs the ConfigFIles.bat to automatically save your old config and replace it as a backup for updates. It does this everytime you use "Start.bat".
This is a workaround for auto-update and config issues.
ConfigFiles.bat:
MODS: If this is the wrong, just switch it. I couldn't find an post corner for this one.
Alright, what it does:
I asked around everywhere here on otland, and people i Know and everyone came back with the same answer. It's not possible... Well in your face, here it is.
Due to client.exe can't be moved out of "bin" folder, this is an solution to run your file anyways without moving it or make your auto updater run your file.
Here's my updater:
Note how i have a cfg for later folder for later.
Alright, it's automatically downloading the files (Auto updater..)
Note ConfigFilesDesktop/Downloads and Start.bat
Here's where the "magic" begins, and this is made with batch due to my c++ knowledge being trash like many others. So if you even dare to comment that it's useless, salamaleko i ban u .I.
Inside the start.bat:
Here we got some modifications, what this does.
Simple, it checks for downloads/desktop location of the "userprofile" and saves your cfg which i just discovered is deleted every time an update gets released. Here's where the "cfg" folder comes to use.
Lua:
echo off
timeout 1 > NUL
echo Restoring your config files, please wait..
:file_checkrestore
if exist "%USERPROFILE%\desktop\Hoxera\Build\ConfigFilesDesktop.bat" (goto file_existscfg) else (timeout /t 1 /nobreak > output)
(goto file_checkrestore1)
:file_existscfg
START %USERPROFILE%\desktop\Hoxera\Build\ConfigFilesDesktop.bat
timeout 1 > NUL
echo current time: %time%
echo waiting for config files..
timeout 6 > NUL
(goto file_check)
:file_checkrestore1
if exist "%USERPROFILE%\downloads\Hoxera\Build\ConfigFilesDownloads.bat" (goto file_existscfg1) else (timeout /t 1 /nobreak > output)
(goto file_noexistcfg)
:file_existscfg1
START %USERPROFILE%\downloads\Hoxera\Build\ConfigFilesDownloads.bat
timeout 1 > NUL
echo current time: %time%
echo waiting for config files..
timeout 6 > NUL
(goto file_check)
:file_noexistcfg
echo Failed to find ConfigFiles.bat, please contact an Administrator over at our discord for support.
pause
exit
echo off
:file_check
if exist "%USERPROFILE%\desktop\Hoxera\Build\bin\Hoxera.exe" (goto file_exists) else (timeout /t 1 /nobreak > output)
(goto file_check1)
:file_check1
if exist "%USERPROFILE%\downloads\Hoxera\Build\bin\Hoxera.exe" (goto file_exists1) else (timeout /t 1 /nobreak > output)
(goto file_noexist)
:file_exists
START %USERPROFILE%\desktop\Hoxera\Build\bin\Hoxera.exe
(goto file_exist)
:file_exists1
START %USERPROFILE%\downloads\Hoxera\Build\bin\Hoxera.exe
(goto file_exist)
:file_noexist
echo Failed to find Hoxera.exe, please. Go to https://hoxera.com/ to read more about this at the Downloads section.
pause
:file_exist
Here it checks for the location of "Hoxera" and it's files, launches up either desktop or downloads and runs the ConfigFIles.bat to automatically save your old config and replace it as a backup for updates. It does this everytime you use "Start.bat".
This is a workaround for auto-update and config issues.
ConfigFiles.bat:
Lua:
echo off
echo Copying clientoptions.json..
echo f | xcopy /s/y %USERPROFILE%\desktop\Hoxera\Build\conf\clientoptions.json %USERPROFILE%\desktop\Hoxera\cfg\clientoptions.json
timeout 1 > NUL
echo Copying clientoptions.json..
echo f | xcopy /s/y %USERPROFILE%\desktop\Hoxera\cfg\clientoptions.json %USERPROFILE%\desktop\Hoxera\Build\conf\clientoptions.json
exit