Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Friday, 11 November 2011

Windows Installer for NAnt

In the OpenPetra project, we completely depend on NAnt, which works out very well for us.
But we have had now several problems with permissions for executing nant on Windows, from the Program Files directory. Also the creation of the nant.bat was not trivial, and could cause problems with permissions.

The easy solution was to create a small InnoSetup Installer.
You can download it from our files section at SourceForge: http://sourceforge.net/projects/openpetraorg/files/openpetraorg/Tools/NAnt-Setup-0.91.exe/download

The script file for InnoSetup looks like this:

[Setup]
AppName=NAnt
AppVerName=NAnt 0.91
DefaultDirName={pf}\NAnt
DefaultGroupName=NAnt
LicenseFile=nant-0.91\COPYING.txt
OutputBaseFilename=NAnt-Setup-0.91
[Files]
Source: nant-0.91\*.*; DestDir: {app}; Flags: recursesubdirs createallsubdirs
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
begin
  if CurStep=ssPostInstall then
  begin
    SaveStringToFile(ExpandConstant('{win}/nant.bat'), ExpandConstant('@"{app}\bin\NAnt.exe" %*'), False);
  end;
end;
If you have trouble with your old NAnt installation, you should delete the folder first from the Program Files, before you run the installer!

Saturday, 17 November 2007

VPN between 2 networks with same IP address scheme (Windows)

Problem is, the routing does not work. Solution is: On DOS command prompt, type
route add 192.168.1.84 MASK 255.255.255.255 192.168.1.160
...1.84 is the number of the computer you want to contact in the other network, ...1.160 is the client IP address of the VPN network connection.
To prevent your traffic into the Internet to go through the VPN, use:
route change 0.0.0.0 mask 0.0.0.0 192.168.1.250 metric 20
(.250 is the local network gateway into the internet)
If it gives the error: "The route addition failed: The parameter is incorrect." or "Hinzufügen der Route fehlgeschlagen: Falscher Parameter.", try using another local IP address. I found, the local IP address should not be too distant from the VPN client IP address.

Another annoying error I had, was that after some time of a working connection, I could not reconnect the VPN:
Error 619 came up, german: "Fehler 619 Ein unbekannter Fehler ist aufgetreten" nach "Benutzername und Passwort werden verifiziert".
My solution was, to set my LAN connection on a new IP address. Other people solved it by reinstalling their NIC card.

GIMP, Gaim, GTK

Install gimp 2.0 and gaim 0.79 on Windows, problems with GTK 2.4:
according to the gimpwin-users list, do this:
Install Gaim's GTK+- 2.2.4, then Gaim, then uninstall Gaim's GTK+-, and install GTK+- 2.4.1 and Gimp. Gaim should still work with GTK+- 2.4.1.
You also need to copy the file Program Files\Common Files\GTK\2.0\bin\zlib1.dll to zlib-1.dll.

Download websites with dynamically generated content (question mark in URL)

You should use the Windows version of wget, because that converts the ? nicely to the @ character.
wget http://www.somewebpage.org --recursive \
--level=5 --relative --tries=1 --convert-links