Showing posts with label batch file. Show all posts
Showing posts with label batch file. Show all posts

Friday, April 18, 2008

Something for Psi Users

For those that use the old ssl certs to connect to connect to your favorite jabber server I dusted off this old batch script that creates ssl certs in the xml format required for Psi. I found it after looking around the Psi-wiki for a how to on making certificates since the main xml cert file didn't have one for the server i used at the time. I adapted it from a bash script, and this worked just fine for me. I tested it last night and it still works just like it should.

Please not that %1 is for the server name and %2 is for the port number.

ECHO ^>>%1.xml
ECHO ^>>%1.xml
ECHO ^>>%1.xml
::# Get server certificate. Convert to x509. Strip out lines
openssl s_client -connect %1:%2 | openssl x509 -outform DER | openssl enc -a -A >>%1.xml
ECHO ^<^/store^>>>%1.xml
ECHO ^<^/certificate^>>>%1.xml
ECHO ^<^/data^>>>%1.xml


This script even adds in the tags needed for the xml-ssl certificate format used by PSI.

Wednesday, January 9, 2008

Pidgin Portable, Again

I added in a few minor changes to make the process more automatic for users upgrading their copy of Pidgin.
Not only that but I made the process faster be only overwriting old files and dropped the number of exclude files.
Don't Worry I'll have some interesting info to report on PortableTor soon.

::2 point "oh snap"
::First things first. I'm in UR Echo, dumping my excludes.
Echo \perlmod\ >Exclude1
Echo \locale\ >Exclude2
Echo Pidgin.exe >>Exclude1
Echo pidgin-uninst.exe >>Exclude1
Echo perl.dll >>Exclude1
Echo tcl.dll >>Exclude1
:: Base dirs
MKDIR Programs
MKDIR Programs\Pidgin\
MKDIR Programs\GTK\
:: Pidgin Lines
MKDIR Programs\Pidgin\pixmaps\
MKDIR Programs\Pidgin\sounds\
:: Went with XCOPY instead :p
XCOPY "C:\Program Files\Pidgin\Pidgin.exe" "Programs\Pidgin\Pidgin-portable.exe" /D /H /G /Y
XCOPY "C:\Program Files\Pidgin\*.*" "Programs\Pidgin\" /D /E /H /G /EXCLUDE:Exclude1+Exclude2 /Y
:: REN Programs\Pidgin\Pidgin.exe Pidgin-portable.exe (got in the way)
:: Excluding TCL and Perl dlls
:: /Pidgin lines

:: GTK lines "C:\Program Files\Common Files\GTK\2.0"
MKDIR Programs\GTK\
MKDIR Programs\GTK\bin\
MKDIR Programs\GTK\etc\
MKDIR Programs\GTK\lib\
MKDIR Programs\GTK\share\
XCOPY "C:\Program Files\Common Files\GTK\2.0\bin\*.*" "Programs\GTK\bin\" /D /E /H /G /Y
XCOPY "C:\Program Files\Common Files\GTK\2.0\etc\*.*" "Programs\GTK\etc\" /D /E /H /G /Y
XCOPY "C:\Program Files\Common Files\GTK\2.0\lib\*.*" "Programs\GTK\lib\" /D /E /H /G /EXCLUDE:Exclude2 /Y
XCOPY "C:\Program Files\Common Files\GTK\2.0\share\*.*" "Programs\GTK\share\" /D /E /H /G /Y
:: /GTK lines
Del Exclude1
Del Exclude2

:: Plus Aspell

:: Aspell lines
MKDIR Programs\Aspell\bin
MKDIR Programs\Aspell\data
MKDIR Programs\Aspell\dict
XCOPY "C:\Program Files\Aspell\bin\Aspell-15.dll" "Programs\Aspell\bin\" /D /H /G /Y
XCOPY "C:\Program Files\Aspell\data\*.*" "Programs\Aspell\data\" /D /E /H /G /Y
XCOPY "C:\Program Files\Aspell\dict\*.*" "Programs\Aspell\dict\" /D /E /H /G /Y
:: /Aspell lines
:: Using /D for xcopy to speed things up.