Category: programming

Random Quotes on Page

I’ve converted my homepage to php. This has the benefit of maintaining standard HTML interaction, while allowing me to script certain things into my page. I wrote this because I hate java and java script with a passion. I blame it on my college’s use of blackboard. Its enough to make any one think twice.


Geany Portable, Nightly Edition

So, around January, I started playing with batch scripting (I’m terrible at it still).  Anyway, I had installed MingW so that I could compile geany nightlies from source on my server.  The ones hosted at geany.org are cross compiled, unlike mine.

Anyway, I created a script that would download the svn posted on the server, extract it, compile, and then copy it into a folder and then compress it so I would have a portable version of the geany nightly, natively compiled.

The trick was to get it up to a server.  Windows (my server is Windows Server 2003), has a built-in ftp client, that can be called from the command line.  It can even be scripted.  The problem is that it didn’t work for my.  So I was stuck trying to get it to the outside world until I figured out how to ftp it to another site.

The answer is WinSCP.  WinSCP allows scripting, in a variety of forms.  I had stumbled across this at some point, it wasn’t until I created a backup script for my mother’s computer (more to come on that one) that I rehashed the script I had been using to add upload abilities.

The script itself is far from complete but I thought that by posting this, I might help someone else in a similar situation.  I’ve tried to comment it pretty well, since it sucks when someone posts something and there is no comments.

REM This script requires you to have wget either in the script folder or in your %PATH%
REM It also requires a copy of the 7Zip command line tools
REM You also need the winscp binaries

cd ........
REM Change directory to root of drive
cd nightly
REM change to nightly folder
wget http://files.uvena.de/geany/geany_svn.tar.gz
REM download the nightly tar ball generated by Geany Project from server
7za e geany_svn.tar.gz
7za x geany_svn.tar
REM extract geany via 7zip command line
MakeBuilder.exe
REM this is a custom program that changes a single line within the geany make file so that it is compatible with a stock mingw install
cd geany_svn
mingw32-make -f makefile.win32
REM go the the geany svn folder and build the binary
cd ..
REM get out of the geany_svn folder
erase C:nightlyGeanyPortableAppGeanybingeany.exe
erase geany_svn.tar
erase geany_svn.tar.gz
REM clear out unneeded stuff
copy geany_svngeany.exe C:nightlyGeanyPortableAppGeanybin
REM copy the binary over to the bin folder in Geany Portable
rmdir /s /q C:nightlyGeanyPortableDatasettings
REM delete the datasettings folder so that any of my settings are not copied to you
7za a -sfx7z.sfx GeanyPortable%date:~4,2%-%date:~-7,2%-%date:~-4,4%.exe GeanyPortable
REM create a self extracting 7-zip package with a month-data-year ending name
winscp /console /command "option batch on" "open login:password@host" "put GeanyPortable%date:~4,2%-%date:~-7,2%-%date:~-4,4%.exe /downloads/Geany/nightlies/" "exit" "close"
REM upload the file to the intellilaunch server via winscp binary
erase GeanyPortable%date:~4,2%-%date:~-7,2%-%date:~-4,4%.exe
REM erase the file from the "local" location
rmdir /s /q geany_svn
REM delete the geany_svn folder so that the directory can be extracted without needing to overwrite anything

If you are wondering where to get those Geany nightlies I mentioned, they are right over here.