EDIT: I should add that this post isn't a joke, I'm serious. I may have gone about it in an indirect/comical way, but sed solves this problem just as easily as a command-line editor. I still do not see the purpose for this application, and until the source is opened I will fear it stealing my Steam blobs and/or my dog.
EDIT#2: According to my sources on IRC, some people may "need" this. However, if you have a GUI and find it hard to compile things, you could always drag the sourcefile onto spcomp.exe, or onto the compile file (compile.bat?), and then copy+paste the file.
Quote:
Originally Posted by FaTony
The name pretty much sums it up. No more command line gimmickry. You select all paths, you get smx where you wanted without need to write complicated bat's etc.
|
Default compile.sh:
PHP Code:
!/bin/bash
test -e compiled || mkdir compiled
if [[ $# -ne 0 ]]
then
for i in "$@";
do
smxfile="`echo $i | sed -e 's/\.sp$/\.smx/'`";
echo -n "Compiling $i...";
./spcomp $i -ocompiled/$smxfile
done
else
for sourcefile in *.sp
do
smxfile="`echo $sourcefile | sed -e 's/\.sp$/\.smx/'`"
echo -n "Compiling $sourcefile ..."
./spcomp $sourcefile -ocompiled/$smxfile
done
fi
So this checks for a 'compiled' directory ...
PHP Code:
test -e compiled || mkdir compiled
Then compiles to it 'compiled' ...
PHP Code:
./spcomp $i -ocompiled/$smxfile
Hrm ...
So two solutions...
Solution #1: Direct (no intermediate)
Code:
sed -ie 's/compiled/\.\.\/plugins/g' compile.sh
???
Profit?
Oh, but maybe I missed something ...
Quote:
Originally Posted by FaTony
Some clarification: it uses 2 step system mimicking original spcomp and Valve Hammer Editor. First, source file is compiled to the intermediate location. (Like scripting\compiled in compile.exe or sourcesdk_content in case of Hammer). And secondly, Intermediate file get copied to it's final location. (Usually \plugins directory).
|
Quote:
Originally Posted by FaTony
This program remembers all paths and saves it into the settings.ini on application closing.
|
So does env/screen!
Solution #2: Direct (no intermediate)
Oh, right, sorry, for some reason some of you only want to copy a file to plugins if it works (because, you know, there's some consideration that
maybe the compiler will make a file when compilation fails).
PHP Code:
sed -ie 's/\.\/spcomp \$sourcefile -ocompiled\/\$smxfile/\.\/spcomp \$sourcefile -ocompiled\/\$smxfile \&\& cp compiled\/\$smxfile \.\.\/plugins\/\$smxfile/g' compile.sh
Profit?
Quote:
Originally Posted by FaTony
Source code will be available with the first stable release.
|
Ew. Why would any run a closed-sourced Windows binary when they could run sed?
No sed on your windows install?
I have it, and so can you.