[or-cvs] r13411: Update polipo nsi and makefile for win32. (tor/trunk/contrib/polipo)

phobos at seul.org phobos at seul.org
Thu Feb 7 01:41:47 UTC 2008


Author: phobos
Date: 2008-02-06 20:41:46 -0500 (Wed, 06 Feb 2008)
New Revision: 13411

Modified:
   tor/trunk/contrib/polipo/Makefile.mingw
   tor/trunk/contrib/polipo/polipo-mingw.nsi
Log:
Update polipo nsi and makefile for win32.  


Modified: tor/trunk/contrib/polipo/Makefile.mingw
===================================================================
--- tor/trunk/contrib/polipo/Makefile.mingw	2008-02-07 01:08:33 UTC (rev 13410)
+++ tor/trunk/contrib/polipo/Makefile.mingw	2008-02-07 01:41:46 UTC (rev 13411)
@@ -1,8 +1,9 @@
-PREFIX = "C:\Program Files"
+PREFIX = Polipo
 BINDIR = $(PREFIX)\bin
 MANDIR = $(PREFIX)\man
 INFODIR = $(PREFIX)\info
-LOCAL_ROOT = 
+LOCAL_ROOT = $(PREFIX)
+DISK_CACHE_ROOT = $(PREFIX)\cache
 
 # To compile with Unix CC:
 
@@ -40,7 +41,7 @@
  EXE=.exe
  LDLIBS = -lwsock32 -lregex
 
-FILE_DEFINES = -DLOCAL_ROOT=\"$(LOCAL_ROOT)/\" -DNO_DISK_CACHE -DHAVE_REGEX
+FILE_DEFINES = -DHAVE_REGEX
 
 # You may optionally also add any of the following to DEFINES:
 #
@@ -84,50 +85,6 @@
 
 all: polipo$(EXE) polipo.info html/index.html localindex.html
 
-install: install.binary install.man
-
-install.binary: all
-	mkdir -p $(TARGET)$(BINDIR)
-	mkdir -p $(TARGET)$(LOCAL_ROOT)
-	mkdir -p $(TARGET)$(LOCAL_ROOT)/doc
-	rm -f $(TARGET)$(BINDIR)/polipo
-	cp -f polipo $(TARGET)$(BINDIR)/
-	cp -f html/* $(TARGET)$(LOCAL_ROOT)/doc
-	cp -f localindex.html $(TARGET)$(LOCAL_ROOT)/index.html
-
-install.man: all
-	mkdir -p $(TARGET)$(MANDIR)/man1
-	mkdir -p $(TARGET)$(INFODIR)
-	cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1
-	cp polipo.info $(TARGET)$(INFODIR)/
-	install-info --info-dir=$(TARGET)$(INFODIR) polipo.info
-
-
-polipo.info: polipo.texi
-	makeinfo polipo.texi
-
-html/index.html: polipo.texi
-	mkdir -p html
-	makeinfo --html -o html polipo.texi
-
-polipo.html: polipo.texi
-	makeinfo --html --no-split --no-headers -o polipo.html polipo.texi
-
-polipo.pdf: polipo.texi
-	texi2pdf polipo.texi
-
-polipo.ps.gz: polipo.ps
-	gzip -c polipo.ps > polipo.ps.gz
-
-polipo.ps: polipo.dvi
-	dvips -Pwww -o polipo.ps polipo.dvi
-
-polipo.dvi: polipo.texi
-	texi2dvi polipo.texi
-
-polipo.man.html: polipo.man
-	groff -man -Thtml polipo.man > polipo.man.html
-
 TAGS: $(SRCS)
 	etags $(SRCS)
 

Modified: tor/trunk/contrib/polipo/polipo-mingw.nsi
===================================================================
--- tor/trunk/contrib/polipo/polipo-mingw.nsi	2008-02-07 01:08:33 UTC (rev 13410)
+++ tor/trunk/contrib/polipo/polipo-mingw.nsi	2008-02-07 01:41:46 UTC (rev 13411)
@@ -1,20 +1,20 @@
 ;polipo-mingw.nsi - A basic win32 installer for Polipo
 ; Originally written by J Doe.
 ; Modified by Andrew Lewman
-; See the Tor LICENSE for licencing information
+; See LICENSE for licencing information
 ;-----------------------------------------
 ;
 !include "MUI.nsh"
 
-!define VERSION "1.0.4.0"
+!define VERSION "1.0.4.0-forbidden-1"
 !define INSTALLER "polipo-${VERSION}-win32.exe"
 !define WEBSITE "http://www.pps.jussieu.fr/~jch/software/polipo/"
 
 !define LICENSE "COPYING"
-!define BIN "." ;BIN is where it expects to find polipo.exe
+;BIN is where it expects to find polipo.exe
+!define BIN "."
 
-SetCompressor /SOLID LZMA ;Tighter compression
-RequestExecutionLevel user ;Updated for Vista compatibility
+SetCompressor lzma
 OutFile ${INSTALLER}
 InstallDir $PROGRAMFILES\Polipo
 SetOverWrite ifnewer
@@ -32,7 +32,7 @@
 VIAddVersionKey "FileDescription" "Polipo is a caching web proxy."
 VIAddVersionKey "FileVersion" "${VERSION}"
 
-!define MUI_WELCOMEPAGE_TITLE "Welcome to the Polipo Setup Wizard"
+!define MUI_WELCOMEPAGE_TITLE "Welcome to the Polipo ${VERSION} Setup Wizard"
 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of Polipo ${VERSION}.\r\n\r\nIf you have previously installed Polipo and it is currently running, please exit Polipo first before continuing this installation.\r\n\r\n$_CLICK"
 !define MUI_ABORTWARNING
 !define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
@@ -44,9 +44,6 @@
 !define MUI_FINISHPAGE_LINK_LOCATION ${WEBSITE}
 
 !insertmacro MUI_PAGE_WELCOME
-; There's no point in having a clickthrough license: Our license adds
-; certain rights, but doesn't remove them.
-; !insertmacro MUI_PAGE_LICENSE "${LICENSE}"
 !insertmacro MUI_PAGE_COMPONENTS
 !insertmacro MUI_PAGE_DIRECTORY
 !insertmacro MUI_PAGE_INSTFILES
@@ -58,6 +55,7 @@
 !insertmacro MUI_LANGUAGE "English"
 
 Var configfile
+Var forbiddenfile
 
 ;Sections
 ;--------
@@ -73,9 +71,11 @@
    File "${BIN}\config.sample"
    File "${BIN}\forbidden.sample"
    File "${BIN}\README.Windows"
+   File "${BIN}\libgnurx-0.dll"
    WriteIniStr "$INSTDIR\Polipo Website.url" "InternetShortcut" "URL" ${WEBSITE}
 
    StrCpy $configfile "config"
+   StrCpy $forbiddenfile "forbidden"
    SetOutPath $INSTDIR
    ;If there's already a polipo config file, ask if they want to
    ;overwrite it with the new one.
@@ -87,10 +87,20 @@
       StrCpy $configfile ".\config.sample"
    endifconfig:
    File /oname=$configfile ".\config.sample"
-   IfFileExists "$INSTDIR\www\*.*" "" endifwebroot
-	CreateDirectory "$INSTDIR\www"
-   endifwebroot:
-   CopyFiles "${BIN}\localindex.html" $INSTDIR\www\index.html
+   ;If there's already a polipo forbidden file, ask if they want to
+   ;overwrite it with the new one.
+   IfFileExists "$INSTDIR\forbidden" "" endifforbidden
+      MessageBox MB_ICONQUESTION|MB_YESNO "You already have a Polipo forbidden file.$\r$\nDo you want to overwrite it with the default sample forbidden file?" IDNO forbidyesreplace
+      Delete $INSTDIR\forbidden
+      Goto endifforbidden
+     forbidyesreplace:
+      StrCpy $forbiddenfile ".\forbidden.sample"
+   endifforbidden:
+   File /oname=$forbiddenfile ".\forbidden.sample"
+   IfFileExists "$INSTDIR\bin\*.*" "" endifbinroot
+	CreateDirectory "$INSTDIR\bin"
+   endifbinroot:
+   CopyFiles "${BIN}\localindex.html" $INSTDIR\index.html
    IfFileExists "$INSTDIR\cache\*.*" "" endifcache
 	CreateDirectory "$INSTDIR\cache"
    endifcache:
@@ -117,7 +127,7 @@
 
 Section /o "Run at startup" Startup
    SetOutPath $INSTDIR
-   CreateShortCut "$SMSTARTUP\Polipo.lnk" "$INSTDIR\polipo.exe" "-c config" "" "" "" SW_SHOWMINIMIZED
+   CreateShortCut "$SMSTARTUP\Polipo.lnk" "$INSTDIR\polipo.exe" "-c config -f forbidden" "" "" "" SW_SHOWMINIMIZED
 SectionEnd
 
 SubSectionEnd
@@ -128,6 +138,11 @@
    Delete "$INSTDIR\Polipo Website.url"
    Delete "$INSTDIR\config"
    Delete "$INSTDIR\config.sample"
+   Delete "$INSTDIR\forbidden.sample"
+   Delete "$INSTDIR\libgnurx-0.dll"
+   Delete "$INSTDIR\COPYING"
+   Delete "$INSTDIR\CHANGES"
+   Delete "$INSTDIR\README.Windows"
    StrCmp $INSTDIR $INSTDIR +2 ""
       RMDir /r $INSTDIR
    Delete "$INSTDIR\Uninstall.exe"



More information about the tor-commits mailing list