AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01) (https://forums.alliedmods.net/showthread.php?t=242144)

floube 06-14-2014 18:34

[TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)

I worked on a new plugin today and was really tired of always dragging the .sp file on the compiler to get it ready, so I decided to make a tool which does that automatically for me and to share it with you!

It is made in Java 7, so you probably need Java JRE (only if you haven't installed it already).

It should work for all Windows versions since it uses some console commands, I've tested it only on Windows 8.1 though.

Since I made this in a few hours, it is kind of a pre-alpha version, so don't expect it to work perfectly!

Also don't be too shy to post your feedback & suggestions here.

Features:
  • automatically compile changed files (based on modify time)
  • automatically move compiled files to a directory
  • ability to save your configuration
  • handy output textarea
ToDo (if possible):
  • automatically upload to server (via FTP)
  • make compatible for Mac and Linux
Known bugs:
  • throws an error if cfg file is changed incorrectly
  • sometimes has problems with folders (but it doesn't destroy anything!)

Download (via GitHub)
Source Code

Screenshots:
The config/settings dialog:
http://i.imgur.com/04N0dRF.jpg

The main window:
http://i.imgur.com/6CLpaPX.jpg

Also outputs compile errors:
http://i.imgur.com/jkUd3ro.jpg

Last but not least, the succeeded compilation + file moving:
http://i.imgur.com/SCP3eeh.jpg

Mitchell 06-16-2014 09:50

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
This is awesome. I always get tired of testing that 'one thing' until it's right, and this will help with the anxiety of dragging and dropping all the damn time, especially when i run out of mouse pad :P. I also love the open source!

WildCard65 06-16-2014 11:28

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
Quote:

Originally Posted by floube (Post 2151782)
automatically compile changed files (based on modify time)

Couldn't you just use the .dat file (if the os is Windows)

floube 06-16-2014 11:57

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
Quote:

Originally Posted by Mitchell (Post 2152589)
This is awesome. I always get tired of testing that 'one thing' until it's right, and this will help with the anxiety of dragging and dropping all the damn time, especially when i run out of mouse pad :P. I also love the open source!

Lol, never actually ran out of mouse pad, but thanks for the great response :D

Quote:

Originally Posted by WildCard65 (Post 2152641)
Couldn't you just use the .dat file (if the os is Windows)

Could have, didn't think about it. But I guess there isn't much of a difference.

xf117 06-17-2014 00:58

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
Quote:

Originally Posted by Mitchell (Post 2152589)
This is awesome. I always get tired of testing that 'one thing' until it's right, and this will help with the anxiety of dragging and dropping all the damn time, especially when i run out of mouse pad :P. I also love the open source!

Isn't it would be easier and more convenient to set up your development environment to compile saved script and then on success also push it in your VCS and send result via ftp?

Mitchell 06-17-2014 14:46

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
Quote:

Originally Posted by xf117 (Post 2152918)
Isn't it would be easier and more convenient to set up your development environment to compile saved script and then on success also push it in your VCS and send result via ftp?

Well my environment was local, and im too lazy to make a batch script that will compile and replace the files in my plugins folder :P
although uploading to ftp would be nice.

Bubka3 06-17-2014 18:19

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
CTRL + B and I have it outputted to a easy accessible folder, ready for upload. Compile log shows up in the editor.

Powerlord 06-18-2014 13:58

Re: [TOOL] SourceMod: Watcher (auto-compile changed files) (Alpha 0.01)
 
Quote:

Originally Posted by xf117 (Post 2152918)
Isn't it would be easier and more convenient to set up your development environment to compile saved script and then on success also push it in your VCS and send result via ftp?

I don't push every change I do to my VCS. I'm a big fan of save early, save often and its cousin compile early, compile often.

Edit: and even using this policy, PropHunt has still had 209 commits in the master branch since I started working on it a year ago.

Edit 2: 221 commits in the 3.3 branch.

Edit 3: However, if I'm switching computers, unfinished changes will be checked in, which is why new versions are developed in branches and then merged back into master. Also because people pull from my master repo and expect a version that actually works. I will also make changes to the current version in master then merge it back to the current version branch for things like configuration file changes.


All times are GMT -4. The time now is 18:27.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.