BattleTorrent plug-ins: Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
m (Updated author links.)
m (Added category links.)
Line 29: Line 29:
   noerrortag:
   noerrortag:
</highlight-nsis>
</highlight-nsis>
[[{{ns:14}}:Plugins]]

Revision as of 22:10, 30 April 2005

Author: eries (talk, contrib)


Links

Source + binaries:

Zip.gif BattleTorrent-0.0.zip (4.03 MB)

Description

Combine NSISdl and the NSIS Python Plugin, and you get an NSIS installer that is capable of downloading content via BitTorrent. This was initially developed by IMVU, and released as part of the BattleTorrent project.

If you'd like to see an example in action, you can download it here.

Because BitTorrent only downloads only the chunks of files that have changed, it makes a great client updater too. And because it's peer-to-peer, it uses a lot less bandwidth than just a regular HTTP downloader.

Example Usage

  ; $R0 contains the CMDLINE plus the torrent URL
  StrCpy $R0 "$CMDLINE http://download.imvu.com/catalog/download/dist.torrent"
  ; $R1 contains the target folder
  StrCpy $R1 "$INSTDIR"
  NSISdl::execFile "$INSTDIR\bt\btdownloadnsis.py"
  IfErrors errortag 
  Pop $R2
  StrCmp $R2 "error" errortag noerrortag
  errortag:
  Abort
  noerrortag: