[Closed] Updating custom scripts over a network
Ok,
What i’ve done is created a few general purpose scripts like cleaning the material editor, optimising the scene etc. etc. Now for everyone at my workplace to use them, i’ve arranged them (the scripts) in a new custom made menu, created script installers redirecting to the .ms files in my machine. I’ve asked every one to copy the script installers to their default max …/stdplugs/stdscripts folder and then load the new .mnu, custom menu file.
Two questions :
-
Is this procedure allright ???
-
I want to create automatic updates for all the users. Which means clicking on the update button in the new custom menu should automatically add the new menu sub item for a new script and also load it’s installer.
Hope i’ve laid down my query properly,
Thanks,
Vikram.
some one did somthing really fancy and posted it here but what I did for years was to have a batch file on the server that uploaded all the scripts on the server to the correct Max folders each time they logged in. On each of the users machines was a shortcut to the batch file and it was in the windows start folder so that it was launched each time the user logged in.
All I needed to do was make sure that the folders on the server where correct. For the menu I had a dynamic one that rebuilt itself each time Max was launched using an INI file that I created. This way I could also control what tools the users could see.
Eventualy I did this all with perl scripts but the batch files worked in production for years without problems.
Thanks Pen for the reply,
The problem is that i am still very new to programming compared to you and the other gurus around. I exactly got what you said, but i cannot implement it since i do not know how to use Perl. I am planning to start with it though.
Thanks a lot anyways,
Vikram,
hi Vikram,
have a look a this script: aearon setup
i’ve set it up at work and it works like a charm. you’ll have to make minor changes (add 4 lines) to them, but it’s worth it. there is also an option to update the scripts.
I had a simular issue at my work. I am constantly some custom scripted utilities and I didn’t want to have my co-workers to have to constantly copy the updated scripts to there machines. My solution was to copy all of the scripts to a folder on the network. Next I created a simple loading script like this.
–loading script
global ScriptPath = “O:\3ds max scripts\”
filein (ScriptPath + “max-utility.ms”)
I had my coworkers copy this script into the scripts\startup folder.
list file points to max-utility.ms. This script loads in the serveral scripted utilites that I created. The script looks like this.
–load rollout utilities
filein (ScriptPath + “max-plugins.ms”)
filein (ScriptPath + “max-utility-01.ms”)
filein (ScriptPath + “max-utility-02.ms”)
–load utility to utilities panel
filein (ScriptPath + “max-utility-UI.ms”)
openUtility maxUtility
max create mode
–load settings
filein (ScriptPath + “max-startup-settings.ms”)
The are a few advantages to organizing it this way.
First, if the scripts need to be moved to a different location all I need to do is update the
ScriptPath variable with the new path location in the loading script and copy the new script my co-workers computers.
Second, unless the path to the scripts changes my co-workers never need install the scripts again, since the loading script simply loads in max-utility.ms file. I can make changes to the existing scripts by simply updating the existing ones, or add new scripts by adding an additional fileIn commands to the max-utility.ms file.
It has been two years and I have not had to manually install any scripts on my co-workers machines, even though I have made alot of updates and added a lot of content. I just have a second loading script that I install on my machine that points to scripts on my local machine so I can edit the utility on my machine and then just copy the updated scripts to the network drive once I know they are working. Any changes I make to the scripts are automatically loaded when max is started. There may be better ways of doing this, but this method has worked well for me.
The problem with this is if you filein mcr files it will create mcr files for you in the macroScript folder. If you have many macros in one file to keep them organized max will create a new script for each. This can be a complete mess when you want to remove scripts from the system.
We have all the scripts on the file server and add a path to the folder in the External Plugins tab on the User Paths dialog… Scripts get run and updated each time max loads.
I’m currently using an application installer as per Jeff hannas tutorial on scriptspot. If i change it, i just re-compile the installer with a new version number and get everyone to run the new install. I’d ideally like a better way of updating without relying on everyone to run the installer. Perhaps a startup script that checks an ini file located on the server for the version number? i dunno. I know Polyboost and Orionflame do this sort of thing with the interweb.
Normal conversation in the office – “Hey Pete, you know that script you told me about three months ago that would save me loads of time? i’d like it now” etc,etc,etc…
Thanks a lot guys,
This is great! Thanks Pokoy for the Aearon Setup. I’ll check it up. I’m just checking and shall get back after trying bnvm’s idea too. But as Paul said, removing scripts since they add them as macroscripts to the local max, is there a way unneeded scripts can be removed???
And hey Pete, colud you give me a link to that Jeff hannas tutorial on scriptspot
Thanks a lot all you guys for the help,
Vikram.
I dont’ know if the others handle it but this is where the batch file came in. It was stored on the server so I could add any lines to it that I wanted.