Fucking excellent.
+rep.
Perhaps add a bit so that it'll launch garry's mod after updating?
ADDING AN ICON TO UPDATE WIRE TO YOUR DESKTOP
So I have heard a lot of people ask on the forums on a way to create an icon that will update wire (mainly noobs, no offense). There is a way to create such, and I will show you how.
Part 1: Requirements
Part 2: Creation
- TortoiseSVN
- Windows (No Macs!)
- You might need admin rights to change the file extension
Let's break that code down...
- Create a blank text file on your desktop. This will be your program, name it whatever you want.
- Open it in your favorite text editor (I prefer n++)
- Type in the following code:
Code:@echo off echo Updating gmod SVN repositories... TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\Adv Duplicator" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire model pack 1" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire-e" /closeonend:1 cls echo Update complete. pause exit- Replace "[STEAM ACCOUNT NAME HERE]" with the name your account had when you first joined Steam.
- Replace "C:\Program Files(x86)\Steam\" with the path of your Steam folder.
Part 3: Editing and Running
- The "@echo off" line turns off all responses from the program we're making
- The "echo" line sends messages to your screen
- The "TortoiseProc.exe" lines are the lines which tell TortoiseSVN what to update
- The "cls", "pause", and "exit" lines are the last screen that says the update is finished.
Now is when we turn our simple text file into a program. Follow these carefully:
Part 4: Adding addons
- Make sure you saved your file on your desktop
- Right-click on the file, select "Rename"
- Remove the ".txt" from the name, and replace it with ".bat"
- If you don't see a ".txt" in the file name, follow these instructions
- Go to Control Panel>Folder Options
- Click on the "View" tab
- In the "Advanced Settings" panel, make sure that "Hide extensions for known file types" is unchecked
- Click Apply (You may need the admin password, or admin rights at this time)
- Close, attempt to rename the file now.
- Windows should throw you a message, saying something along the lines of "If you change a file extension, the file may become unusable". Ignore that, click yes.
- The icon should have changed to something else. It is now a program. You can now run it, and you should get the TortoiseSVN windows poping up, updating your files.
If you have used gmod for a while, chances are you have more addons that you want to update as well. Here is how you add those:
You've just learnt a taste of hidden TortoiseSVN stuff, and a bit of Batch!
- Right-click on the file, select "Edit"
- Add the following line to the code for each of the addons
Once again, [STEAM NAME] is your original Steam name, and [ADDON NAME] is the name of the folder of your addon.Code:TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM NAME]\garrysmod\garrysmod\addons\[ADDON NAME]" /closeonend:1
NOTE: You can not do this for any old addon. The addon must have downloaded via SVN (If you do not know, the folder should have a little green check on it, or a hidden ".svn" folder inside of it)- Save the file.
- Your program should now update those addons
- I added wire-e to the original program. If you do not have wire-e, remove the line that contains wire-e in it.
Thanks for reading!
NOTE: This tutorial was made for Windowsx64 on Batch, running Vista Home Premium. If you have a different version of Windows, you will have to go on your own for some of it, as some of the text is different.
They were here. Here: that's where they were. And they are watching you at this very second, poised to attack.
Who are they?
Where are they?
How many ninja stars do they have pointed at me?
(\__/) <- Put this bunny in your sig and help him to rule the world!
(='.'=) Click here for the story of the bunny!
(")_(") "Only in garrys mod is welding something to an explosive barrel a good idea" - Foszor
Do you own games by EA? Do you hate the fact that they put on DRM? DRM-BE-GONE!!!!!
Fucking excellent.
+rep.
Perhaps add a bit so that it'll launch garry's mod after updating?
It opens tortoise SVN just fine for me, but returns an error about the repository having moved temporarily, and something about stargate.
No matter how many Z's you put after Plz, you still spell as well as a piece of cheese.
http://somone77.net
.bat file to set it to start gmod after.
Code:@echo off echo Updating gmod SVN repositories... echo Updating Wire TortoiseProc.exe /command:update /path:"c:\Program\Steam\steamapps\[Steamname]\garrysmod\garrysmod\addons\wire" /notempfile /closeonend:1 echo Updating Wire model pack TortoiseProc.exe /command:update /path:"c:\Program\Steam\steamapps\[Steamname]\garrysmod\garrysmod\addons\wire model pack 1" /notempfile /closeonend:1 echo Updating Advance Duplicator TortoiseProc.exe /command:update /path:"c:\Program\Steam\steamapps\[Steamname]\garrysmod\garrysmod\addons\Adv Duplicator" /notempfile /closeonend:1 echo Updating PHX TortoiseProc.exe /command:update /path:"c:\Program\Steam\steamapps\[Steamname]\garrysmod\garrysmod\addons\phx3" /notempfile /closeonend:1 echo Updating Wire extras TortoiseProc.exe /command:update /path:"c:\Program\Steam\steamapps\[Steamname]\garrysmod\garrysmod\addons\wire extras" /notempfile /closeonend:1 echo Update done! echo Do you want to start Garrysmod? (Y/N) set/p "cho=>" if %cho%==Y goto START if %cho%==y goto START if %cho%==n goto END if %cho%==N goto END :START start "mm" "C:\Program Files\Steam\steamapps\[Steamname]\garrysmod\hl2.exe" -game garrysmod +exec "gameinfo.txt" -console :END exit
Last edited by Donkie; 01-13-2010 at 03:04 AM.
Get out. Seriously, do it.
Just thought I'd add this, if you add "start" before each updating line, it will update them all at the same time, for eg:
Code:@echo off echo Updating gmod SVN repositories... start TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\Adv Duplicator" /closeonend:1 start TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire" /closeonend:1 start TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire model pack 1" /closeonend:1 start TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire-e" /closeonend:1 cls echo Update complete. pause exit
~ I R <3 E2 ~
What is the wire-e folder?
Im running windows 7. The cmd window requires me to "press any key to continue" before it exits, how do I stop this?
Also, how do I make it run gmod, and only update beforehand if it hasn't updated in the previous 24hrs?
Will require a lot more to check if last update was 24 hours ago. You might need to develop your own program to do that, since there are limits in batch scripts' functionality.Code:@echo off echo Updating gmod SVN repositories... TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\Adv Duplicator" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire model pack 1" /closeonend:1 TortoiseProc.exe /command:update /path:"C:\Program Files (x86)\Steam\steamapps\[STEAM ACCOUNT NAME HERE]\garrysmod\garrysmod\addons\wire-e" /closeonend:1 cls echo Update complete. start "mm" "C:\Program Files\Steam\steamapps\[Steamname]\garrysmod\hl2.exe" -game garrysmod +exec "gameinfo.txt" -console exit
- Some people got brains.
Thanks, yeah i thought that might be the case.
Is it not possible to look at the folders you are updating and get the date last modified from them, then do a comparison with the current date and then use an if goto function?
Bookmarks