Skip to content

Commit

Permalink
Farming Simulator version configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
elpatron68 committed Jan 31, 2019
1 parent df83002 commit 7f694b4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cpupdate_portable.bat
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ rem
set deployment="ZIPFILE"
rem set deployment="DIRECTORY"
rem =============================================================================
rem Set Farming Simulator version
set fsversion="2019"
rem set fsversion="2017"
rem =============================================================================
rem If you want the command window to close after run: set autoclose="YES".
rem Otherwise you have to hit a keystroke after the run - which enables you
rem to see what happened.
Expand Down Expand Up @@ -127,13 +131,13 @@ for /f "skip=2 tokens=2*" %%A in ('reg query "HKEY_CURRENT_USER\Software\Microso

:: Setting Mod directory
SETLOCAL
for /f "delims=" %%i in ('cscript %TEMP%\moddir.vbs "%UserDocs%\My Games\FarmingSimulator2017\gameSettings.xml" //Nologo') do set moddir=%%i
for /f "delims=" %%i in ('cscript %TEMP%\moddir.vbs "%UserDocs%\My Games\FarmingSimulator%fsversion%\gameSettings.xml" //Nologo') do set moddir=%%i

rem Setting Courseplay mod folder or file
if defined moddir (
set _dest=%moddir%\ZZZ_courseplay
) else (
set _dest=%UserDocs%\my games\FarmingSimulator2017\mods\ZZZ_courseplay
set _dest=%UserDocs%\my games\FarmingSimulator%fsversion%\mods\ZZZ_courseplay
)

echo Deployment method is %deployment%.
Expand Down

0 comments on commit 7f694b4

Please sign in to comment.