You are here

help needed for nsis script and portabletor

1 post / 0 new
Zalica
Offline
Last seen: 9 years 10 months ago
Joined: 2009-10-21 23:33
help needed for nsis script and portabletor

As portabletor(http://sourceforge.net/project/showfiles.php?group_id=194105) is not updating recently,I tried to compile portabltor using its source code. I worked fine except when I enabled the "help censored users reach the Tor network." or relay traffic for the tor network.

If I enable to option, it shows in the log as follow:

"Failed to open GEOIP file C:\Documents and Settings\myusername\Application Data\tor\geoip. We've been configured to see which countries can access us as a bridge, and we need GEOIP information to tell which countries clients are in."

I only know very little of coding,fixing this is beyond my ability.so anybody help please.And thank you very much.
And sorry for my English,I'm not a native speaker.

this is the nsis script I use to compile the program:

# PortableTor

OutFile "Vidalia Portable.exe"
Icon "AppIcon2.ico"
SilentInstall Silent
VIProductVersion "1.1.1.1"
VIAddVersionKey /LANG=2057 FileDescription "Portable Vidalia Bundle"
VIAddVersionKey /LANG=2057 LegalCopyright "Illegal"
VIAddVersionKey /LANG=2057 CompanyName "Nameless"
VIAddVersionKey /LANG=2057 ProductName "Vidalia Portable"
VIAddVersionKey /LANG=2057 ProductVersion "1.1.1.1"
VIAddVersionKey /LANG=2057 FileVersion "1.1.1.1"
RequestExecutionLevel "user"
Caption "Vidalia Portable - Portable Vidalia Bundle"

Section

Preparations:
SetOutPath $EXEDIR

IfFileExists "$EXEDIR\App\Vidalia\mingwm10.dll" +1 FilesMissing
IfFileExists "$EXEDIR\App\Vidalia\QtCore4.dll" +1 FilesMissing
IfFileExists "$EXEDIR\App\Vidalia\QtGui4.dll" +1 FilesMissing
IfFileExists "$EXEDIR\App\Vidalia\QtNetwork4.dll" +1 FilesMissing
IfFileExists "$EXEDIR\App\Vidalia\QtXml4.dll" +1 FilesMissing
IfFileExists "$EXEDIR\App\Vidalia\tor.exe" +1 FilesMissing
IfFileExists "$EXEDIR\App\Vidalia\vidalia.exe" +1 FilesMissing

IfFileExists "$EXEDIR\Data\*.*" +1 DefaultData
IfFileExists "$EXEDIR\Data\Tor\torrc" +1 TorSettings
IfFileExists "$EXEDIR\Data\Vidalia.conf" +1 VidaliaSettings

Goto LaunchApp

FilesMissing:
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION 'Some important files are missing. Check the App folder, or consider redownloading.' IDRETRY Preparations
Abort

DefaultData:
CreateDirectory "$EXEDIR\Data"
CopyFiles /Silent "$EXEDIR\App\DefaultData\*.*" "$EXEDIR\Data\"
IfErrors ErrorHandle Preparations

TorSettings:
FileOpen $R2 "$EXEDIR\Data\Tor\torrc" w
FileWrite $R2 "AvoidDiskWrites 1"
FileWriteByte $R1 13
FileWriteByte $R1 13
FileWrite $R2 "SocksListenAddress 127.0.0.1"
FileClose $R2
IfErrors ErrorHandle Preparations

VidaliaSettings:
WriteINIStr "$EXEDIR\Data\Vidalia.conf" "MessageLog" "LogFile" ".\\Data\\Tor-Log.log"
WriteINIStr "$EXEDIR\Data\Vidalia.conf" "Tor" "DataDirectory" ".\\Data\\Tor"
WriteINIStr "$EXEDIR\Data\Vidalia.conf" "Tor" "TorExecutable" ".\\App\\Vidalia\\Tor.exe"
WriteINIStr "$EXEDIR\Data\Vidalia.conf" "Tor" "Torrc" ".\\Data\\Tor\\torrc"
IfErrors ErrorHandle Preparations

ErrorHandle:
MessageBox MB_OK|MB_ICONSTOP 'An error occured while trying to write the required files. Check if the Data directory is read-only (running from a CD-ROM?)'
Abort

LaunchApp:
ExecShell open '.\App\Vidalia\Vidalia' '-datadir .\Data'

SectionEnd