Jump to content

[offer] Batchscripts to switch between two versions


olbo
 Share

Recommended Posts

Hello guys 'n gals!

 

It came to my attention that a lot of people would like to use

different versions (beta/retail) and would like to switch between

them easily. So I wrote a lil shellscript to do this ...

 

nb: This is working with the NTFS filesystem only, so if you use

FAT/FAT32 i'm sorry and you are oldschool. =)

 

1. First off, download junction and copy it to your windows dir

so you can access this tool everywhere. This tool will let you use

symbolic links (NTFS only) like linux ... etc.

 

2. Install two different Maxwell versions. After that is done, rename

the directories to a different name! You don't have to change the

MAXWELL_ROOT variable, I'll grab it from the environments ...

 

3. create a textfile with the extension .bat and copy the content

that I'll post below into it.

 

4. Change all vars on top to the right directorys.

 

5. Almost forgotten an important thing, the 3dsmax plugins

have to go into different dirs too and the dir that is used for the

"Maxwell_junction_plugin_dir" variable has to be in the 3dsmax

plugin.ini file!

 

 

After thinking about workflows, there are two versions

of the batchfile that you can choose from. The first one

will ask you what kinda version you wanna run, the second

will switch between the versions and will not ask. So the

second one is for people that do know what they are

doing. :p:D :D ;)

 

 

 

This batchfile will let you choose between two versions

@echo off

rem ################### Variables to change ##################

SET Maxwell_beta_dir="x:\Maxwell_beta"
SET Maxwell_retail_dir="x:\Maxwell_retail"

SET Maxwell_junction_plugin_dir="x:\3dsMax\plugins\Maxwell"
SET Maxwell_beta_plugin_dir="x:\3dsMax\plugins\Maxwell_beta"
SET Maxwell_retail_plugin_dir="x:\3dsMax\plugins\Maxwell_retail"

rem ###########################################################


:start
CLS
SET Maxwell_version=
SET /P Maxwell_version=Choose between (r)etail or (b)eta:

IF '%Maxwell_version%'=='' goto grmpf
IF '%Maxwell_version%'=='b' goto beta
IF '%Maxwell_version%'=='r' goto retail


:grmpf
ECHO You should type 'r' or 'b' ... 
pause
GOTO start

:beta
junction -q -s %MAXWELL_ROOT% %Maxwell_beta_dir%
junction -q -s %Maxwell_junction_plugin_dir% %Maxwell_beta_plugin_dir%
GOTO end

:retail
junction -q -s %MAXWELL_ROOT% %Maxwell_retail_dir%
junction -q -s %Maxwell_junction_plugin_dir% %Maxwell_retail_plugin_dir%
GOTO end

:end

 

 

This batchfile will just switch between the two versions without asking anything

@echo off

rem ################### Variables to change ##################

SET Maxwell_beta_dir="x:\Maxwell_beta"
SET Maxwell_retail_dir="x:\Maxwell_retail"

SET Maxwell_junction_plugin_dir="x:\3dsMax\plugins\Maxwell"
SET Maxwell_beta_plugin_dir="x:\3dsMax\plugins\Maxwell_beta"
SET Maxwell_retail_plugin_dir="x:\3dsMax\plugins\Maxwell_retail"

rem ###########################################################

SET Maxwell_identifier=%MAXWELL_ROOT%\mxed.exe
CLS

IF exist %Maxwell_identifier% (
GOTO beta
) ELSE (
GOTO retail
)


:beta
junction -q -s %MAXWELL_ROOT% %Maxwell_beta_dir%
junction -q -s %Maxwell_junction_plugin_dir% %Maxwell_beta_plugin_dir%
GOTO end

:retail
junction -q -s %MAXWELL_ROOT% %Maxwell_retail_dir%
junction -q -s %Maxwell_junction_plugin_dir% %Maxwell_retail_plugin_dir%
GOTO end

:end

 

If I missed something ... sorry. ;o)

 

edit: added point five

 

 

 

take care

Oleg

Link to comment
Share on other sites

I forgot to say, that if your pathnames include spaces you

have to use quotation marks!

 

example:

rem ################### Variables to change ##################

SET Maxwell_beta_dir="x:\Maxwell beta"
SET Maxwell_retail_dir="x:\Maxwell retail"

SET Maxwell_junction_plugin_dir="x:\3dsMax\plugins\Maxwell"
SET Maxwell_beta_plugin_dir="x:\3dsMax\plugins\Maxwell beta"
SET Maxwell_retail_plugin_dir="x:\3dsMax\plugins\Maxwell retail"

rem ###########################################################

 

nb: I will change the first post to save some time. ;o)

 

 

take care

Oleg

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...