This CMD (batch) file allows you save a time if:
- you are developing plugins
- you need upload the same plugin on server again and again (after each local modification)
Purpose:
It automatically compile and upload smx file to FTP (using CURL or Putty) as soon as its timestamp is changed.
When you edit your
.sp file press
Ctrl + S and it will be compiled (in background) and uploaded in a second.
Alternatively, you can set to track only smx (compiled files).
Versions:
There are 2 version of uploader:
- 1.2 (for ftp only, using curl.exe)
- 1.3 (for both sftp and ftp, using pscp.exe (putty command line tool)).
Preparation:
1) (optional) Using
Plugin-autoreload is highly recommended. See attached
autoreload.zip (it is an optimized fork of
original).
Compile it and place in server .../addons/sourcemod/plugins/ folder.
2) Download one of attached
sm_upload_*.zip archive. Unpack.
3) Dependency:
- (for v.1.2 only) Download and place
CURL.exe in the same folder.
- (for v.1.3 only) Install
Putty
- Download local compiler:
from here. Unzip it.
4) Edit "
sm_upload.cmd" file (open in notepad: right mouse click => Edit).
Set correct path and settings here:
Code:
:: path to spcomp.exe of local compiler
set compiler=d:\dev\SourceMod\addons\sourcemod\scripting\spcomp.exe
:: server settings (in v.1.3)
set server=5.x.x.x
set port=22
set user=l4dserver
set pass=xxx
set servpath=/home/l4dserver/serverfiles/left4dead/
:: or this line (in v.1.2)
set ftp=ftp://user:[email protected]/left4dead/
:: Specify true if you want to upload source files (.sp) as well
set upload_source=false
Save.
How to use:
1) Edit "plugins.txt" file: add full paths to plugins (smx or sp) you want to track.
2) Run "sm_upload.cmd" file and minimize its window to tray every time you need uploader to work.
Alternatively:
You can add files for tracking by context menu (Right Button Mouse Click on any.sp or any.smx file => SendTo => "SM - Track for upload").
To install such menu:
- create shortcut to "SM - Track for upload.cmd" file.
- place that shortcut in SendTo folder. To find that folder: press Win + R and enter Shell:SendTo than press OK and paste shortcut there.
You are ready.
Good luck.
Compatibility: Windows Vista+.
Update
Now *.phrases.txt files are also supported.