Anomos Knowledge Base
This web page aims to provide all anomos users step-by-step first-attempt-success recipes.
1.0 The Server Part: Seeding anomos atorrents to the rest of the world
1.0.1 Getting the anomos source code from the anomos.info git repository
mkdir -p ~/anomos cd ~/anomos git clone git://git.anomos.info/git/anomos.git anomos.git cd anomos.git git checkout -b testing git pull origin testing
NOTE: git status should tell you that you are on the testing branch.
1.1 CONVERTING YOUR TRACKER DOMAIN NAME SSL CERTIFICATE FROM .CRT TO .PEM
Copy your .pem for your tracker domain name(i.e. omac.darktech.org.pem) in the git default_certificates directory <code>/home/loongson/anomos/anomos.git/default_certificates</code>. It's interesting to note when you are running from the anomos.git home directory, it will copy the default certificates to the <code>~/.anomos</code> directory (i.e. <code>/home/loongson/.anomos/crypto/default_certificates.</code>)
It's a two step process to convert from .crt to .pem:
openssl x509 -in omac.darktech.org.crt -out input.der -outform DER openssl x509 -in input.der -inform DER -out omac.darktech.org.pem -outform PEM
N.B. Please note Anomos needs your SSL Domain Certificate only to facilitate your use of your own domain name as a "TRACKER ANNOUNCE URL" i.e. (https://omac.darktech.org:15000/announce). If you don't want to use your SSL Domain Certificate, you may use your ip address in the "TRACKER ANNOUNCE URL" i.e. (<code>https://216.66.135.157:15000/announce</code>).
Anomos wants everyone to speak SSL in order to keep prying eyes out, so Anomos only permits SSL TRACKER ANNOUNCE URL's i.e. https://). There needs to be the letter 's' after the word http.
Also note, Anomos speaks SSL on all the mentioned Anomos ports on the anomos.info page, the standard SIP port and the Bittorrent Ports. The recipes given below purposefully change these ports to demonstrate how any user may customize all the Anomos ports.
You may not realize this, but if you are running a web server, Anomos' SSL communication does not in any way affect any of your web server's SSL communication because they should be running on different ports.
1.2 RUNNING THE ANOMOS TRACKER
Here are the contents of runtracker.sh:
#!/bin/bash # Just run this command in a terminal #./runtracker.sh TRACKERDATA=/home/loongson/.anomos/trackerdata TRACKERPORT=15000 TRACKERSTATE=$TRACKERDATA/dstateTracker ANOMOSGITHOME=/home/loongson/anomos/anomos.git PYTHONBIN=/usr/bin/python2.6 $PYTHONBIN $ANOMOSGITHOME/anontrack.py --dfile $TRACKERSTATE --port $TRACKERPORT --data_dir $TRACKERDATA
Now just run the tracker: ./runtracker.sh
1.3 CREATING THE ATORRENT
When you create an atorrent:
- run:
cd /home/loongson/anomos.git/ python makeatorrentgui.py
- set the tracker URL to something like this https://omac.darktech.org:15000/announce
- select the file to create the atorrent with. i.e.~/anomos/jamlordsOfZomar.mp3
- click the "make" button and the gui creates something like this:~/anomos/jamlordsOfZomar.mp3.atorrent
1.3.1 Atorrent file on your web server
In order for others to download the actual .atorrent file, you need to make it available on your web server. You need to copy this .atorrent file into your web server's public_html directories. (i.e. cp blah.atorrent /var/www/public_html/blah.atorrent)
1.4 RUNNING THE SEEDER
Here is the shell script for running the seeder seeder.sh:
#!/bin/bash #./seeder.sh jamlordsOfZomar.mp3.atorrent jamlordsOfZomar.mp3_Seeder atorrent=$1 identity=$2 SEEDERDATA=/home/loongson/.anomos/seederdata SEEDERMINPORT=15001 SEEDERMAXPORT=15200 SEEDERSTATE=$SEEDERDATA/dstateSeeder ANOMOSGITHOME=/home/loongson/anomos/anomos.git PYTHONBIN=/usr/bin/python2.6 if [ $# -ne 2 ]; then echo "Usage: seeder.sh atorrentfile identity" exit 0 fi outfile="`basename $atorrent .atorrent`" $PYTHONBIN $ANOMOSGITHOME/anondownloadheadless.py $1 --save_as $outfile --identity $identity --minport $SEEDERMINPORT --maxport $SEEDERMAXPORT --data_dir $SEEDERDATA
Run the seeder: ./seeder.sh jamlordsOfZomar.mp3.atorrent jamlordsOfZomar.mp3_Seeder
1.5 RUNNING THE RELAYER
- copy the seeder.sh as relayer.sh. i.e. cp seeder.sh relayer.sh
- run the relayer. ./relayer.sh jamlordsOfZomar.mp3.torrent jamlordsOfZomar.mp3_Relayer
1.6 RUNNING THE CONSOLE TERMINAL MODE CURSES ANOMOS DOWNLOAD PEER CLIENT
Here is the code for peer.sh shell script:
#!/bin/bash #./peer.sh jamlordsOfZomar.mp3.10.atorrent jlpeer10 jamlordsOfZomar.10.mp3 216.66.142.56 torrent=$1 identity=$2 ##outfile="`basename $torrent .torrent`-peer" outfile=$3 myip=$4 PEERDATA=/home/loongson/.anomos/peerdata PEERSTATE=$PEERDATA/dstatePeer SEEDERMINPORT=15001 SEEDERMAXPORT=15200 ANOMOSGITHOME=/home/loongson/anomos/anomos.git PYTHONBIN=/usr/bin/python2.6 if [ $# -ne 4 ]; then echo "Usage: peer.sh torrentfile identity outfile externalip" exit 0 fi #python $download $1 --save_as $outfile --identity $identity --minport 6881 --maxport 6889 $PYTHONBIN $ANOMOSGITHOME/anondownloadcurses.py $1 --save_as $outfile --identity $identity --minport $SEEDERMINPORT --maxport $SEEDERMAXPORT --data_dir $PEERDATA --auto_ip 1 --ip $myip # --dfile $PEERSTATE
It's necessary to run two instances of the curses mode client in order for others at other ip addresses to access this .atorrent.
- cp /home/loongson/myWebRoot/public_html/jamlordsOfZomar.mp3.atorrent jamlordsOfZomar.mp3.9.atorrent
- ./peer.sh jamlordsOfZomar.mp3.9.atorrent jlpeer9 jamlordsOfZomar.9.mp3 216.66.142.56
- cp /home/loongson/myWebRoot/public_html/jamlordsOfZomar.mp3.atorrent jamlordsOfZomar.mp3.10.atorrent
- ./peer.sh jamlordsOfZomar.mp3.10.atorrent jlpeer10 jamlordsOfZomar.10.mp3 216.66.142.56
2.0 The Regular User's Side: The Client requesting anomos data content
2.1 RUNNING THE ANOMOS DOWNLOAD PEER CLIENT GUI
Here is where another machine may use the gui to easily get the contents represented by the .atorrent:
- cd /home/loongson/anomos/anomos.git
- python anondownloadgui.py
- click the menu->view->settings
- change the port to 15001
- click ok
- click file->open->atorrent...
- select the jamlordsOfZomar.mp3.atorrent and click ok.
- select the destination file name and click ok.
If you want an example .atorrent, you may wish to get http://omac.darktech.org:8080/nmstrntlstr/nmsdownload?filename=wax-line.atorrent
3.0 Troubleshooting
3.1 MAKE SURE YOU ARE RUNNING THE CORRECT VERSION OF PYTHON
- alias python=/usr/bin/python2.6
- Note: the anomos gui does not work with python3.0 at this time
- the curses version works with python3.0
3.2 CLEANING THE ANOMOS DOWNLOAD STATE BEFORE RUNNING
When the Anomos Gui seems to be giving you problems, and it doesn't seem to appear, do the following:
* cd /home/loongson/.anomos * rm ui_config * rm ui_socket * rm ui_state
3.3 CLEANING THE ANOMOS TRACKER STATE BEFORE RUNNING
When the anomos tracker seems to be giving you problems:
- cd /home/loongson/.anomos/trackerdata
- rm dstateTracker
3.4 TRACKER CERTIFICATE TROUBLESHOOTING
In the tracker: [WARNING ] 20:57:12 (RawServer:193) Error handling accepted connection: tlsv1 alert unknown ca In the seeder: [INFO ] 20:57:12 (Rerequester:213) Making announce to omac.darktech.org [WARNING ] 20:57:12 (Rerequester:274) Problem connecting to omac.darktech.org: certificate verify failed cp /etc/apache2/ssl/omac.darktech.org.key /home/loongson/.anomos/crypto/server-key.pem cp /home/loongson/anomos/omac.darktech.org.pem /home/loongson/.anomos/crypto/server-cert.pem
3.5 Tool Data Directories
In the scripts, the data directories are different and some problems appeared. i.e. {{{TRACKERDATA=/home/loongson/.anomos/trackerdata SEEDERDATA=/home/loongson/.anomos/seederdata
PEERDATA=/home/loongson/.anomos/peerdata }}}
It seems they must point to the same directory in order for things to work. In the interim, please harmonize the data directories for the different scripts to the same directory name: ~/.anomos i.e.
TRACKERDATA=/home/loongson/.anomos SEEDERDATA=/home/loongson/.anomos PEERDATA=/home/loongson/.anomos
An example session starting up a seeder
cd /home/loongson/anomos ./runtracker.sh ./seeder.sh wiFilmVideoProd.ogv.atorrent wiFilmVideoProd.ogv_seeder ./relayer.sh wiFilmVideoProd.ogv.atorrent wi_Relayer ./seeder.sh ChristmasDumplings140MB.ogv.atorrent ChristmasDumplings140MB.ogv_seeder ./relayer.sh ChristmasDumplings140MB.ogv.atorrent ChristmasDumplings140MB.ogv_relayer ./seeder.sh ChristmasDumplings47MB.ogv.atorrent ChristmasDumplings47MB.ogv_seeder ./relayer.sh ChristmasDumplings47MB.ogv.atorrent ChristmasDumplings47MB.ogv_relayer cd /home/loongson/anomos/tests ../peer.sh wiFilmVideoProd.ogv.atorrent pe2 wiFilmVideoProd.ogv ../peer.sh wiFilmVideoProd.ogv.atorrent peer3 wiFilmVideoProd.ogv.3
Command Line Options for Anomos Tools
Common Options
--ip <arg>
ip to report to the tracker (has no effect unless you are on the same
local network as the tracker) (defaults to '')
--forwarded_port <arg>
world-visible port number if it's different from the one the client
listens on locally (defaults to 0)
--minport <arg>
minimum port to listen on, counts up if unavailable (defaults to
5061)
--maxport <arg>
maximum port to listen on (defaults to 5069)
--bind <arg>
ip to bind to locally (defaults to '')
--display_interval <arg>
seconds between updates of displayed information (defaults to 0.5)
--rerequest_interval <arg>
minutes to wait between requesting more peers (defaults to 300)
--min_peers <arg>
minimum number of peers to not do rerequesting (defaults to 20)
--max_initiate <arg>
number of peers at which to stop initiating new connections (defaults
to 200)
--max_allow_in <arg>
maximum number of connections to allow, after this new incoming
connections will be immediately closed (defaults to 200)
--check_hashes <arg>
whether to check hashes on disk (defaults to 1)
--max_upload_rate <arg>
maximum kB/s to upload at, 0 means no limit (defaults to 100)
--min_uploads <arg>
the number of uploads to fill out to with extra optimistic unchokes
(defaults to 2)
--data_dir <arg>
directory under which variable data such as fastresume information
and GUI state is saved. Defaults to subdirectory 'data' of the
bittorrent config directory. (defaults to '')
--max_files_open <arg>
the maximum number of files in a multifile torrent to keep open at a
time, 0 means no limit. Used to avoid running out of file
descriptors. (defaults to 50)
--identity <arg>
the identity to use (basename of pub/pvt key) (defaults to 'peer')
--auto_ip <arg>
whether to automatically fetch an external ip to report to the
tracker (defaults to 0)
Options for anontrack.py
--port <arg>
Port to listen on. (defaults to 80)
--dfile <arg>
file to store recent downloader info in
--bind <arg>
ip to bind to locally (defaults to '')
--socket_timeout <arg>
timeout for closing connections (defaults to 15)
--save_dfile_interval <arg>
seconds between saving dfile (defaults to 300)
--timeout_downloaders_interval <arg>
seconds between expiring downloaders (defaults to 2700)
--reannounce_interval <arg>
seconds downloaders should wait between reannouncements (defaults to
1800)
--response_size <arg>
default number of peers to send in an info message if the client does
not specify a number (defaults to 10)
--timeout_check_interval <arg>
time to wait between checking if any connections have timed out
(defaults to 5)
--nat_check <arg>
how many times to check if a downloader is behind a NAT (0 = don't
check) (defaults to 3)
--log_nat_checks <arg>
whether to add entries to the log for nat-check results (defaults to
0)
--min_time_between_log_flushes <arg>
minimum time it must have been since the last flush to do another one
(defaults to 3.0)
--min_time_between_cache_refreshes <arg>
minimum time in seconds before a cache is considered stale and is
flushed (defaults to 600.0)
--allowed_dir <arg>
only allow downloads for .atorrents in this dir (and recursively in
subdirectories of directories that have no .atorrent files
themselves). If set, torrents in this directory show up on
infopage/scrape whether they have peers or not (defaults to
'/home/loongson/anomos/anomos.git')
--parse_dir_interval <arg>
how often to rescan the torrent directory, in seconds (defaults to
60)
--allowed_controls <arg>
allow special keys in torrents in the allowed_dir to affect tracker
access (defaults to 0)
--hupmonitor <arg>
whether to reopen the log file upon receipt of HUP signal (defaults
to 0)
--show_infopage <arg>
whether to display an info page when the tracker's root dir is loaded
(defaults to 1)
--infopage_redirect <arg>
a URL to redirect the info page to (defaults to '')
--show_names <arg>
whether to display names from allowed dir (defaults to 1)
--favicon <arg>
file containing x-icon data to return when browser requests
favicon.ico (defaults to '')
--only_local_override_ip <arg>
ignore the ip GET parameter from machines which aren't on local
network IPs (0 = never, 1 = always, 2 = ignore if NAT checking is not
enabled). HTTP proxy headers giving address of original client are
treated the same as --ip. (defaults to 2)
--logfile <arg>
file to write the tracker logs, use - for stdout (default) (defaults
to '')
--allow_get <arg>
use with allowed_dir; adds a /file?hash={hash} url that allows users
to download the torrent file (defaults to 0)
--keep_dead <arg>
keep dead torrents after they expire (so they still show up on your
/scrape and web page). Only matters if allowed_dir is not set
(defaults to 0)
--scrape_allowed <arg>
scrape access allowed (can be none, specific or full) (defaults to
'full')
--max_give <arg>
maximum number of peers to give with any one request (defaults to
200)
--data_dir <arg>
Directory in which to store cryptographic keys (defaults to '')
--max_path_len <arg>
Maximum number of hops in a circuit (defaults to 6)
Options for anondownloadheadless.py
--save_as <arg>
file name (for single-file torrents) or directory name (for batch
torrents) to save the torrent as, overriding the default name in the
torrent. See also --save_in (defaults to '')
--max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on --max_upload_rate. The
automatic values are only sensible when running one torrent at once.
(defaults to -1)
--save_in <arg>
local directory where the torrent contents will be saved. The file
(single-file torrents) or directory (batch torrents) will be created
under this directory using the default name specified in the
.atorrent file. See also --save_as. (defaults to '')
--responsefile <arg>
file the server response was stored in, alternative to url (defaults
to '')
--url <arg>
url to get file from, alternative to responsefile (defaults to '')
--ask_for_save <arg>
whether or not to ask for a location to save downloaded files in
(defaults to 1)
--spew <arg>
whether to display diagnostic info to stdout (defaults to 0)
Options for anondownloadcurses.py
--save_as <arg>
file name (for single-file torrents) or directory name (for batch
torrents) to save the torrent as, overriding the default name in the
torrent. See also --save_in (defaults to '')
--max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on --max_upload_rate. The
automatic values are only sensible when running one torrent at once.
(defaults to -1)
--save_in <arg>
local directory where the torrent contents will be saved. The file
(single-file torrents) or directory (batch torrents) will be created
under this directory using the default name specified in the
.atorrent file. See also --save_as. (defaults to '')
--responsefile <arg>
file the server response was stored in, alternative to url (defaults
to '')
--url <arg>
url to get file from, alternative to responsefile (defaults to '')
--ask_for_save <arg>
whether or not to ask for a location to save downloaded files in
(defaults to 1)
--spew <arg>
whether to display diagnostic info to stdout (defaults to 0)
Options for anondownloadgui.py
--save_as <arg>
file name (for single-file torrents) or directory name (for batch
torrents) to save the torrent as, overriding the default name in the
torrent. See also --save_in, if neither is specified the user will be
asked for save location (defaults to '')
--advanced <arg>
display advanced user interface (defaults to 0)
--next_torrent_time <arg>
the maximum number of minutes to seed a completed torrent before
stopping seeding (defaults to 99999)
--next_torrent_ratio <arg>
the minimum upload/download ratio, in percent, to achieve before
stopping seeding. 0 means no limit. (defaults to 0)
--last_torrent_ratio <arg>
the minimum upload/download ratio, in percent, to achieve before
stopping seeding the last torrent. 0 means no limit. (defaults to 0)
--pause <arg>
start downloader in paused state (defaults to 0)
--dnd_behavior <arg>
drag and drop behaviour (defaults to 'add')
--max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on --max_upload_rate. The
automatic values are only sensible when running one torrent at once.
(defaults to -1)
--save_in <arg>
local directory where the torrent contents will be saved. The file
(single-file torrents) or directory (batch torrents) will be created
under this directory using the default name specified in the
.atorrent file. See also --save_as. (defaults to '')
--responsefile <arg>
file the server response was stored in, alternative to url (defaults
to '')
--url <arg>
url to get file from, alternative to responsefile (defaults to '')
--ask_for_save <arg>
whether or not to ask for a location to save downloaded files in
(defaults to 1)
Options for anonlaunchmany.py
python anonlaunchmany.py -h Usage: anonlaunchmany [OPTIONS] [TORRENTDIRECTORY]
arguments are -
--max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on --max_upload_rate. The
automatic values are only sensible when running one torrent at once.
(defaults to 6)
--save_in <arg>
local directory where the torrents will be saved, using a name
determined by --saveas_style. If this is left empty each torrent will
be saved under the directory of the corresponding .atorrent file
(defaults to '')
--parse_dir_interval <arg>
how often to rescan the torrent directory, in seconds (defaults to
60)
--saveas_style <arg>
How to name torrent downloads (1 = rename to torrent name, 2 = save
under name in torrent, 3 = save in directory under torrent name)
(defaults to 1)
--display_path <arg>
whether to display the full path or the torrent contents for each
torrent (defaults to 1)
--torrent_dir <arg>
directory to look for .atorrent files (semi-recursive) (defaults to
'')
Options for anonlaunchmanycurses.py
python anonlaunchmanycurses.py -h Usage: anonlaunchmanycurses [OPTIONS] [TORRENTDIRECTORY]
If a non-option argument is present it's taken as the value of the torrent_dir option.
arguments are -
--max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on --max_upload_rate. The
automatic values are only sensible when running one torrent at once.
(defaults to 6)
--save_in <arg>
local directory where the torrents will be saved, using a name
determined by --saveas_style. If this is left empty each torrent will
be saved under the directory of the corresponding .atorrent file
(defaults to '')
--parse_dir_interval <arg>
how often to rescan the torrent directory, in seconds (defaults to
60)
--saveas_style <arg>
How to name torrent downloads (1 = rename to torrent name, 2 = save
under name in torrent, 3 = save in directory under torrent name)
(defaults to 1)
--display_path <arg>
whether to display the full path or the torrent contents for each
torrent (defaults to 0)
--torrent_dir <arg>
directory to look for .atorrent files (semi-recursive) (defaults to
'')
Options for makeatorrentgui.py
python makeatorrentgui.py -h Usage: makeatorrentgui
--torrent_dir <arg>
directory to look for .atorrent files (semi-recursive) (defaults to
'')
--piece_size_pow2 <arg>
which power of two to set the piece size to (defaults to 18)
--tracker_name <arg>
default tracker name (defaults to
'https://tracker.anomos.info:5555/announce')
Rare Options
--download_slice_size <arg>
how many bytes to query for per request. (defaults to 16384)
--max_message_length <arg>
maximum length prefix encoding you'll accept over the wire - larger
values get the connection dropped. (defaults to 8388608)
--socket_timeout <arg>
seconds to wait between closing sockets which nothing has been
received on (defaults to 300.0)
--timeout_check_interval <arg>
seconds to wait between checking if any connections have timed out
(defaults to 60.0)
--max_slice_length <arg>
maximum length slice to send to peers, close connection if a larger
request is received (defaults to 16384)
--max_rate_period <arg>
maximum amount of time to guess the current rate estimate represents
(defaults to 20.0)
--max_rate_period_seedtime <arg>
maximum amount of time to guess the current rate estimate represents
(defaults to 100.0)
--max_announce_retry_interval <arg>
maximum time to wait between retrying announces if they keep failing
(defaults to 1800)
--snub_time <arg>
seconds to wait for data to come in over a connection before assuming
it's semi-permanently choked (defaults to 30.0)
--rarest_first_cutoff <arg>
number of downloads at which to switch from random to rarest first
(defaults to 4)
--upload_unit_size <arg>
how many bytes to write into network buffers at once. (defaults to
1380)
--retaliate_to_garbled_data <arg>
refuse further connections from addresses with broken or
intentionally hostile peers that send incorrect data (defaults to 1)
--one_connection_per_ip <arg>
do not connect to several peers that have the same IP address
(defaults to 0)
--peer_socket_tos <arg>
if nonzero, set the TOS option for peer connections to this value
(defaults to 8)
--filesystem_encoding <arg>
character encoding used on the local filesystem. If left empty,
autodetected. Autodetection doesn't work under python versions older
than 2.3 (defaults to '')
--enable_bad_libc_workaround <arg>
enable workaround for a bug in BSD libc that makes file reads very
slow. (defaults to 0)
--tracker_proxy <arg>
address of HTTP proxy to use for tracker connections. Format:
[username:password@]host:port (defaults to '')
--anonymizer <arg>
address of an open Anomos tracker to replace the trackers found
inside un-anonymized .torrents (defaults to
'https://tracker.anomos.info:5555/announce')
running anomos from python git sources on a winxp box
1)install mingw
2)install msys,
3)go get and install the following the respective order:
python-2.6.4.msi
M2Crypto-0.19.1.win32-py2.6.exe
gtk+-bundle_2.16.6-20091215_win32.zip
pygobject-2.14.2-2.win32-py2.6.exe
pycairo-1.4.12-2.win32-py2.6.exe
pygtk-2.12.1-3.win32-py2.6.exe
venster-0.72.zip...venster needs: python setup.py install done
sampleapp.installer.exe
4.1)edit the /c/msys/1.0/home/user/.profile to have the following:
export PATH=.:/c/Python26:/c/gtk2.16.6/bin:c/gtk2.16.6/lib:/mingw/bin:/mingw/lib:/bin:/usr/local/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:"/c/Program Files/Common Files/Ahead/Lib"
export PKG_CONFIG_PATH=/c/Python26/Lib/pkgconfig:/c/gtk2.16.6/lib/pkgconfig:/c/MinGW/lib/pkgconfig[[BR]]
export LD_LIBRARY_PATH=/c/gtk2.16.6/bin:/c/gtk2.16.6/lib:/c/mingw/lib[[BR]]
export PYTHONPATH=/c/Python26/lib/site-packages
4.2)open up an msys bash shell
5)python anondownloadgui.py
That's it.
anomos++
I'm fiddling with the anomos work to port it to c++ hence the name anomos++. Slowly but surely, I'm getting to know the gtkmm,glib, gio stuff necessary for getting it done. If you want to take a peek, here is source file:anomos.cc.
I just discovered gtk 2.18 doesn't support python yet. Only gtk 2.16 does. When I downloaded the c/c++ sources below, I assumed that python would be support by the latest builds. I assumed wrong.
So the steps below only compile/run the c++ stuff with the latest gtk.
FOR JUST RUNNING PYTHON/MSYS/MINGW WITH ANOMOS.GIT SOURCES
1)DOWNLOAD THESE WINDOWS SPECIFIC BINARIES
-rw-r--r-- 1 www-data www-data 350K 2009-12-21 21:22 atk_1.28.0-1_win32.zip
-rw-r--r-- 1 www-data www-data 372K 2009-12-21 21:22 cairo_1.8.8-2_win32.zip
-rw-r--r-- 1 www-data www-data 57K 2009-12-21 21:22 expat_2.0.1-1_win32.zip
-rw-r--r-- 1 www-data www-data 127K 2009-12-21 21:22 fontconfig_2.8.0-1_win32.zip
-rw-r--r-- 1 www-data www-data 267K 2009-12-21 21:22 freetype_2.3.11-1_win32.zip
-rw-r--r-- 1 www-data www-data 4.0M 2009-12-21 21:21 gccxml-0.9.0-win32-x86.exe
-rw-r--r-- 1 www-data www-data 45K 2009-12-21 21:20 gettext-runtime-0.17-1.zip
-rw-r--r-- 1 www-data www-data 1.8M 2009-12-21 21:20 glib_2.22.3-1_win32.zip
-rw-r--r-- 1 www-data www-data 8.4M 2009-12-21 21:20 gtk+_2.18.5-1_win32.zip
-rw-r--r-- 1 www-data www-data 108K 2009-12-21 21:18 jpeg_7-1_win32.zip
-rw-r--r-- 1 www-data www-data 682K 2009-12-21 21:18 libiconv-1.9.1.bin.woe32.zip
-rw-r--r-- 1 www-data www-data 102K 2009-12-21 21:18 libpng_1.2.40-1_win32.zip
-rw-r--r-- 1 www-data www-data 1.3M 2009-12-21 21:18 libtiff_3.9.1-1_win32.zip
-rw-r--r-- 1 www-data www-data 884K 2009-12-21 21:17 M2Crypto-0.19.1.win32-py2.6.exe
-rw-r--r-- 1 www-data www-data 443K 2009-12-21 21:17 pango_1.26.1-1_win32.zip
-rw-r--r-- 1 www-data www-data 30K 2009-12-21 21:17 pkg-config_0.23-3_win32.zip
-rw-r--r-- 1 www-data www-data 18K 2009-12-21 21:17 proxy-libintl-dev_20080918_win32.zip
-rw-r--r-- 1 www-data www-data 86K 2009-12-21 21:17 pycairo-1.4.12-2.win32-py2.6.exe
-rw-r--r-- 1 www-data www-data 175K 2009-12-21 21:17 pygobject-2.14.2-2.win32-py2.6.exe
-rw-r--r-- 1 www-data www-data 2.0M 2009-12-21 21:17 pygtk-2.12.1-3.win32-py2.6.exe
-rw-r--r-- 1 www-data www-data 15M 2009-12-21 21:16 python-2.6.4.msi
-rw-r--r-- 1 www-data www-data 762K 2009-12-21 21:13 sampleapp.installer.exe
-rw-r--r-- 1 www-data www-data 389K 2009-12-21 21:13 venster-0.72.zip
-rw-r--r-- 1 www-data www-data 14K 2009-12-21 21:12 win-iconv-dll_tml-20090213_win32.zip
-rw-r--r-- 1 www-data www-data 80K 2009-12-21 21:12 zlib123-dll.zip
2)EDIT YOUR .PROFILE ~/.profile
cat .profile
CC='/mingw/bin/gcc.exe '
CFLAGS='-march=pentium3 -mtune=i586 -mthreads -O2 -fomit-frame-pointer -mms-bitfields -pipe '
CPPFLAGS='-I/mingw/include -DMINGW32 -DMINGW32 '
CXXFLAGS="${CFLAGS}"
LDFLAGS='-L/mingw/lib -Wl,--enable-auto-image-base -Wl,--enable-auto-import -Wl,--enable-runtime-pseudo-reloc '
PKG_CONFIG_PATH="C:\MinGW\lib\pkgconfig"
export CC CFLAGS CPPFLAGS CXXFLAGS LDFLAGS PKG_CONFIG_PATH
export PATH=.:/c/OpenSSL:/c/OpenSSL/bin:/c/OpenSSL/lib:/c/Venster/venster:/c/Venster:/c/gccxml:/c/Python26:/c/Python26/Lib/site-packages/M2Crypto:/c/Python26/DLLs:/c/Python26/tcl/dde1.3:/c/Python26/tcl/reg1.2:/c/Python26/tcl/tix8.4.3:/c/gtkwin/bin:c/gtkwin/lib:/c/gtkmm/bin:/c/gtkmm/lib:/c/gtkmm/redist:/mingw/bin:/bin:/usr/local/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:"/c/Program Files/Common Files/Ahead/Lib"
export PKG_CONFIG_PATH=/c/Python26/Lib/pkgconfig:/c/gtkmm/lib/pkgconfig:/c/gtkwin/lib/pkgconfig:/c/gtkwin/manifest:/c/mingw/lib/pkgconfig[[BR]]
export LD_LIBRARY_PATH=/c/gtkmm/redist:/c/gtkmm/bin:/c/gtkwin/bin:/c/gtkwin/lib:/c/mingw/lib[[BR]]
3)cd anomos.git
python anondownloadgui.py blah.atorrent
4)COMPILING C/C++ WITH GTK
We can do this no problem.
gcc -Wall -o anomos.exe pkg-config --cflags gtkmm-2.4 pangomm-1.4 anomos.cc pkg-config --libs gtkmm-2.4 pangomm-1.4 -lstdc++
1)needed to download and compile the unzip sources and adjust the
2)cflags in makefile.gcc and in my
3)/home/user/.profile
to have the following flags:
-march pentium3 -mtune i586
4)
zlib needs to be compiled before glib
5)bug in the glib configure:
checking mswsock.h usability... no
checking mswsock.h presence... yes
configure: WARNING: mswsock.h: present but cannot be compiled
configure: WARNING: mswsock.h: check for missing prerequisite headers?
configure: WARNING: mswsock.h: see the Autoconf documentation
configure: WARNING: mswsock.h: section "Present But Cannot Be Compiled"
configure: WARNING: mswsock.h: proceeding with the preprocessor's result
configure: WARNING: mswsock.h: in the future, the compiler will take precedence
configure: WARNING: ## -----------------------------------------------------
configure: WARNING: ## Report this to http://bugzilla.gnome.org/enter_bug.cg[[BR]]
i?product=glib ##
configure: WARNING: ## -----------------------------------------------------
checking for mswsock.h... yes
6)make/make install for glib succeeded.
7)libpng done
8)libjpeg-7 done
9)libtiff cd port;make;cd ../libtiff;make done
10)libfreetype done
11)libexpat done
12)libxml done
13)libfontconfig done
14)libatk done
15)libpixman done
16)libcairo
giving me issues with the configure/Makefile. I know that libpng-config exists, but I don't know how to connect it to the configure script.
I changed the respective libpng cflags and libs in the Makefile along with adding -lpng14 to the cairo libs in the Makefile to get it to compile successfully.
done
16.2)libpango done
16.3)gtk+2
changed the configure script to use png instead of png12
done
17)libcairomm
/mingw/lib/pkg-config/cairo.pc changed libpng12 to libpng
it wants libsig++
18)pycairo not done
19)rcairo not done
20)cairo-5c
./configure --prefix=/mingw --without-libjasper --with-included-loaders=yes --with-included-immodules=ime --enable-debug=no
Also to change the code page at the msys shell to UNICODE:
chcp 65001
For sure, we're going to have to have a better ability to see what's going on.
http://www.mingw.org/wiki/HOWTO_Build_MSYS
has the answers, if we rebuild msys and enable tracing when we compile.
Then we can do something like:
strace python anondownloadgui.py blah.atorrent
from the mingw/msys shell.
I noticed that the gtk's pygtk/pygobject/pycairo don't use swig to create the interface. This implies all the interfacing was hand-modified instead of using hand-modified swig .i files. I'm curious if there was ever an effort to use swig for doing all the language-independant interfacing for all the scripting languages like java/perl/python/javascript. The big observation I noticed was that the c++ libs are supported in the latest gtk 2.18 and the python is only supported in the 2.16 gtk libs. This makes it difficult to get the latest python take advantage of all the latest happenings in the gtk sources although 2.16 is considered more stable.
