File: README.win32

package info (click to toggle)
pacparser 1.3.6-1.2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 1,300 kB
  • sloc: ansic: 1,085; python: 225; makefile: 159; sh: 149
file content (75 lines) | stat: -rw-r--r-- 2,672 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
This file is about the instructions to build (and use) pacparser on Windows.
For general information on pacparser, please have a look at README in the same
directory.

Building pacparser on Windows:
-----------------------------
For compiling pacparser on Windows, you'll need MinGW (www.mingw.org) tools.

Detailed Instructions:
----------------------

Set up tools:

1.  Install MinGW. Download the automated installer from here:
    http://sourceforge.net/projects/mingw/files/
    Running this installer lets you select what component you want to install.
    Default options (C-compiler and MinGW Development Toolkit) should work
    fine.

2.  Rename mingw32-make.exe to make.exe.
      rename C:\MinGW\bin\mingw32-make.exe C:\MinGW\bin\make.exe

3.  Add your MinGW directory's bin (C:\MinGW\bin) to your system path variable.

4.  Install 7-zip to extract .tar.gz files, if you don't have an equivalent
    program already.
    http://www.7-zip.org/download.html

5.  Install latest python. You'll need it to build python module.
    http://www.python.org/getit/

======== Done setting up tools ==========

6.  Now download pacparser source code tarball from
    https://github.com/pacparser/pacparser/releases and extract it somewhere,
    say C:\workspace.

7.  Now extract the spidermonekey source tarball, js-*.tar.gz, located at
    src\spidermonkey\js-*.tar.gz inside the pacparser source directory.

8.  Compile pacparser and create ditribution.
      cd C:\workspace\pacparser-*
      make -C src -f Makefile.win32 dist

9. Compile pacparser python module and copy required files to a directory
    (dist).
      make -C src -f Makefile.win32 pymod

Using pacparser on Windows:
--------------------------
* In C programs:

Make sure that you have pacparser.dll in the sytem path somewhere
(current directory would do just fine for testing purpose).
  Change to your program's directory:
  =>  cd c:\workspace\pacparser-1.2.1\examples
  Copy pacparser.dll here and compile your program:
  => gcc -o pactest pactest.c -lpacparser -L.
  Run your program:
  => pactest wpad.dat http://www.google.com www.google.com
  'PROXY proxy1.manugarg.com:3128; PROXY proxy2.manugarg.com:3128; DIRECT'

* In python programs:

Install pacparser python module by running install.py in the distribution
folder. You'll then be able to use pacparser python module in the following
manner:

  => C:\python25\python
  >>> import pacparser
  >>> pacparser.init()
  >>> pacparser.parse_pac('examples/wpad.dat')
  >>> pacparser.find_proxy('http://www.google.com', 'www.google.com')
  'PROXY proxy1.manugarg.com:3128; PROXY proxy2.manugarg.com:3128; DIRECT'
  >>> pacparser.cleanup()