Browse Source

Merge changes from branch sabnzbd-0.5.x Rev 3261-3311 to trunk

tags/0.6.0
shypike 15 years ago
parent
commit
47cb1c8b2e
  1. 47
      main/CHANGELOG.txt
  2. 21
      main/INSTALL.txt
  3. 54
      main/ISSUES.txt
  4. 187
      main/NSIS_Installer.nsi
  5. 4
      main/PKG-INFO
  6. 14
      main/README.txt
  7. 3
      main/SABnzbd.py
  8. 5
      main/interfaces/Classic/templates/config_switches.tmpl
  9. 7
      main/interfaces/Plush/templates/config_switches.tmpl
  10. 2
      main/interfaces/smpl/templates/config_rss.tmpl
  11. 7
      main/interfaces/smpl/templates/config_switches.tmpl
  12. 2
      main/language/de-de.txt
  13. 2
      main/language/fr-fr.txt
  14. 2
      main/language/nl-du.txt
  15. 2
      main/language/sv-se.txt
  16. 2
      main/language/us-en.txt
  17. 8
      main/package.py
  18. 1
      main/sabnzbd/__init__.py
  19. 4
      main/sabnzbd/cfg.py
  20. 5
      main/sabnzbd/codecs.py
  21. 1
      main/sabnzbd/config.py
  22. 26
      main/sabnzbd/downloader.py
  23. 38
      main/sabnzbd/interface.py
  24. 96
      main/sabnzbd/misc.py
  25. 54
      main/sabnzbd/newsunpack.py
  26. 5
      main/sabnzbd/nzbqueue.py
  27. 8
      main/sabnzbd/nzbstuff.py
  28. 4
      main/sabnzbd/postproc.py
  29. 10
      main/sabnzbd/rss.py
  30. 1
      main/sabnzbd/trylist.py
  31. 2
      main/sabnzbd/tvsort.py
  32. 26
      main/sabnzbd/urlgrabber.py
  33. BIN
      main/win/openssl/libeay32.dll
  34. BIN
      main/win/openssl/ssleay32.dll
  35. 0
      main/win/par2/COPYING
  36. BIN
      main/win/par2/MSVCP71.DLL
  37. 175
      main/win/par2/README_FIRST.txt
  38. BIN
      main/win/par2/msvcr71.dll
  39. BIN
      main/win/par2/par2.exe
  40. BIN
      main/win/par2/src/par2cmdline-0.4-tbb-20080420.tar.gz
  41. BIN
      main/win/par2/tbb.dll
  42. BIN
      main/win/par2/tbbmalloc.dll
  43. 0
      main/win/par2/x64/COPYING
  44. 175
      main/win/par2/x64/README_FIRST.txt
  45. BIN
      main/win/par2/x64/par2.exe
  46. BIN
      main/win/par2/x64/tbb.dll
  47. BIN
      main/win/par2/x64/tbbmalloc.dll

47
main/CHANGELOG.txt

@ -1,4 +1,51 @@
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
0.5.0Final by The SABnzbd-Team
-------------------------------------------------------------------------------
- Relabeled to 0.5.0
-------------------------------------------------------------------------------
0.5.0RC8 by The SABnzbd-Team
-------------------------------------------------------------------------------
- Add par2_multicore option to Config->Switches
- Windows/OSX: Replaced OpenSSL libraries
- Windows: Replaced par2-multicore by new version
-------------------------------------------------------------------------------
0.5.0RC7 by The SABnzbd-Team
-------------------------------------------------------------------------------
Fixes:
- When priority of newzbin or RSS job comes from the category, it wasn't effective.
- When unpacked file and directly download file have the same name,
the latter got lost
- Make nzbmatrix error handling robust
- When apikey is present in API call, do not require username/password
- Windows installer is now multi-language too
- Windows installer warns about queue when upgrading from 0.4.x
-------------------------------------------------------------------------------
0.5.0RC6 by The SABnzbd-Team
-------------------------------------------------------------------------------
Changes:
- Add INI-only option "par2_multicore" to enable/disable par2-multicore
Fixes:
- Prevent crash in RSS due to odd characters
- Prevent deadlock in downloader when server is blocked
- Unrar option -ai should only be used on Windows
- Prevent deletion of par files of other sets in multi-set NZBs
-------------------------------------------------------------------------------
0.5.0RC5 by The SABnzbd-Team
-------------------------------------------------------------------------------
Fixes:
- Incorrect job rename in SMPL skin on Windows
- INI-only option "no_penalties" to limit timeout penalties for
non-optional servers to 1 minute
- HTTPS certificate paths should default to admin_dir directive
- The second parameter of the user script should be the original NZB file name,
even when the job has been renamed.
- Show clear error message when RSS feed preview or force-download fails.
- Don't warn about RSS reading problems when a scheduled scan is done.
- Ignore empty "username" and "apikey" parameters in nzbmatrix.com URLs
and add stored values.
- Suppress authentication warning for API call "get_scripts".
It's used by some external utilities to determine if username/password is required.
-------------------------------------------------------------------------------
0.5.0RC4 by The SABnzbd-Team 0.5.0RC4 by The SABnzbd-Team
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Fixes: Fixes:

21
main/INSTALL.txt

@ -52,10 +52,10 @@ OR
Python-2.5.4 http://www.python.org Python-2.5.4 http://www.python.org
Windows Windows
Python-2.5.4.3 http://www.activestate.com Python-2.5.latest http://www.activestate.com
Essential modules Essential modules
cheetah-2.0.1 http://www.cheetahtemplate.org/ cheetah-2.0.1+ http://www.cheetahtemplate.org/
yenc module >= 0.3 http://sabnzbd.sourceforge.net/yenc-0.3.tar.gz yenc module >= 0.3 http://sabnzbd.sourceforge.net/yenc-0.3.tar.gz
http://sabnzbd.sourceforge.net/yenc-0.3-w32fixed.zip (Win32-only) http://sabnzbd.sourceforge.net/yenc-0.3-w32fixed.zip (Win32-only)
par2cmdline >= 0.4 http://parchive.sourceforge.net/ par2cmdline >= 0.4 http://parchive.sourceforge.net/
@ -65,15 +65,20 @@ Essential modules for python 2.4 ONLY
pysqlite3 >= 2.3.4 http://pysqlite.org (python-pysqlite2) pysqlite3 >= 2.3.4 http://pysqlite.org (python-pysqlite2)
Optional modules Optional modules
unrar >= 3.70 http://www.rarlab.com/rar_add.htm unrar >= 3.90+ http://www.rarlab.com/rar_add.htm
unzip >= 5.52 http://www.info-zip.org/ unzip >= 5.52 http://www.info-zip.org/
pyopenssl >= 0.6 http://sourceforge.net/projects/pyopenssl/
Unix/Linux/OSX (source) Optional modules Windows
openssl => v0.9.8g http://www.openssl.org/ pyopenssl >= 0.10 http://pypi.python.org/pypi/pyOpenSSL
(Binaries, including the OpenSSL libraries)
Embedded modules (no need to install) Optional modules Unix/Linux/OSX
CherryPy-3.2 rev2138 http://www.cherrypy.org pyopenssl >= 0.7 http://pypi.python.org/pypi/pyOpenSSL
openssl => v0.9.8g+ http://www.openssl.org/
Make sure the OpenSSL libraries match with PyOpenSSL
Embedded modules (only use the included version)
CherryPy-3.2 rev2138 with patches http://www.cherrypy.org
Unpack the ZIP-file containing the SABnzbd sources to any folder of your liking. Unpack the ZIP-file containing the SABnzbd sources to any folder of your liking.

54
main/ISSUES.txt

@ -1,29 +1,40 @@
List of known issues. *******************************************
*** Known issues ***
*******************************************
*** Under investigation *** - When par2 or unrar hang up, never just stop SABnzbd.
So far we have too little information to reproduce these problems. Instead use your operating system's task manager to stop the par2 or unrar program.
Please report such problems on the forum with as much information Forcing SABnzbd to quit may damage your queues.
as possibe (OS, amount of usenet servers etc.) Windows-only:
If you keep having trouble with par2 multicore you can disable it
*** (hopefully) Solved issue *** in Config->Switches.
We are investigating reports of downloads hanging in the This will force the use of the old and tried, but slower par2-classic program.
last bit of the actual download.
0.5.0 Beta5 and Beta6 and latyer attempt to fix this.
Let us hear your experience.
*** Known problems ***
- Windows cannot handle pathnames longer than 254 characters. - Windows cannot handle pathnames longer than 254 characters.
Currently, SABnzbd doesn't handle this problem gracefully. Currently, SABnzbd doesn't handle this problem gracefully.
We have added the INI-only option "folder_length_max" in which you We have added the INI-only option "folder_length_max" in which you can set
can set a maximum folder name size. a maximum folder name size.
For Windows the default is 128 and for others 256. For Windows the default is 128 and for others 256.
A quite safe value for Windows would be 64. A quite safe value for Windows would be 64.
SABnzbd will take care of overlapping names. SABnzbd will take care of overlapping names.
See: http://wiki.sabnzbd.org/configure-special
- Some Usenet servers have intermittent login (or other) problems.
For these the server blocking method is not very favourable.
There is an INI-only option that will limit blocks to 1 minute.
no_penalties = 1
See: http://wiki.sabnzbd.org/configure-special
- On OSX you will have problems running Python user scripts.
This is caused by wrong behaviour of the Python-to-app converter we use.
Currently we cannot fix this. As a work-around you need to add
the -E parameter to the first line of your Python script.
Example:
#!/bin/python -E
- On OSX you may encounter downloaded files with foreign characters. - On OSX you may encounter downloaded files with foreign characters.
The par2 repair may fail when the files were created on a Windows system. The par2 repair may fail when the files were created on a Windows system.
The problem is caused by the PAR2 utility and we cannot currently fix this. The problem is caused by the PAR2 utility and we cannot fix this now.
This does not apply to files inside RAR files. This does not apply to files inside RAR files.
- On Linux when you download files they may have the wrong character encoding. - On Linux when you download files they may have the wrong character encoding.
@ -44,7 +55,16 @@ as possibe (OS, amount of usenet servers etc.)
memory systems (eg a SAN device) a challenge. memory systems (eg a SAN device) a challenge.
- SABnzbd is not compatible with some software firewall versions. - SABnzbd is not compatible with some software firewall versions.
The Mircosoft Windows Firewall work fine. The Mircosoft Windows Firewall works fine, but remember to tell this
firewall that SABnzbd is allowed to talk to other computers.
- When SABnzbd cannot send nofication emails, check your virus scanner,
firewall or securiry suite. It may be blocking outgoing email.
- When you are using external drives or network shares on OSX or Linux
make sure that the drives are mounted.
The operating system wil simply redirect your files to alternative locations.
You may have trouble finding the files when mounting the drive later.
- Sometimes logging stops. This is a notorious bug in Python logging. SABnzbd will - Sometimes logging stops. This is a notorious bug in Python logging. SABnzbd will
function as normal. If you run from sources or use the --console option with the function as normal. If you run from sources or use the --console option with the

187
main/NSIS_Installer.nsi

@ -1,5 +1,6 @@
; -*- coding: latin-1 -*-
; ;
; Copyright 2008-2009 The SABnzbd-Team <team@sabnzbd.org> ; Copyright 2008-2010 The SABnzbd-Team <team@sabnzbd.org>
; ;
; This program is free software; you can redistribute it and/or ; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License ; modify it under the terms of the GNU General Public License
@ -37,7 +38,7 @@ WindowIcon on
InstallDir "$PROGRAMFILES\SABnzbd" InstallDir "$PROGRAMFILES\SABnzbd"
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" "" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\SABnzbd" ""
DirText "Select the directory to install SABnzbd+ in:" ;DirText $(MsgSelectDir)
;Vista redirects $SMPROGRAMS to all users without this ;Vista redirects $SMPROGRAMS to all users without this
RequestExecutionLevel admin RequestExecutionLevel admin
@ -54,6 +55,9 @@ DirText "Select the directory to install SABnzbd+ in:"
!define MUI_ABORTWARNING !define MUI_ABORTWARNING
;Show all languages, despite user's codepage
!define MUI_LANGDLL_ALLLANGUAGES
!define MUI_ICON "interfaces/Classic/templates/static/images/favicon.ico" !define MUI_ICON "interfaces/Classic/templates/static/images/favicon.ico"
@ -71,6 +75,10 @@ DirText "Select the directory to install SABnzbd+ in:"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\SABnzbd" !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\SABnzbd"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "SABnzbd" !define MUI_STARTMENUPAGE_DEFAULTFOLDER "SABnzbd"
;Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\SABnzbd"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
!insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER
@ -78,12 +86,12 @@ DirText "Select the directory to install SABnzbd+ in:"
!insertmacro MUI_PAGE_INSTFILES !insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
!define MUI_FINISHPAGE_RUN_TEXT "Start SABnzbd (hidden)" !define MUI_FINISHPAGE_RUN_TEXT $(MsgStartSab)
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show Release Notes" !define MUI_FINISHPAGE_SHOWREADME_TEXT $(MsgShowRelNote)
;!define MUI_FINISHPAGE_LINK "View the SABnzbdPlus Wiki" ;!define MUI_FINISHPAGE_LINK "View the SABnzbdPlus Wiki"
;!define MUI_FINISHPAGE_LINK_LOCATION "http://sabnzbd.wikidot.com/" ;!define MUI_FINISHPAGE_LINK_LOCATION "http://wiki.sabnzbd.org/"
!define MUI_FINISHPAGE_LINK "Support the project, Donate!" !define MUI_FINISHPAGE_LINK $(MsgSupportUs)
!define MUI_FINISHPAGE_LINK_LOCATION "http://www.sabnzbd.org/contribute/" !define MUI_FINISHPAGE_LINK_LOCATION "http://www.sabnzbd.org/contribute/"
!insertmacro MUI_PAGE_FINISH !insertmacro MUI_PAGE_FINISH
@ -93,42 +101,55 @@ DirText "Select the directory to install SABnzbd+ in:"
!insertmacro MUI_UNPAGE_COMPONENTS !insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_INSTFILES !insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
; Set supported languages
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
!insertmacro MUI_LANGUAGE "French"
!insertmacro MUI_LANGUAGE "German"
!insertmacro MUI_LANGUAGE "Dutch"
!insertmacro MUI_LANGUAGE "Swedish"
;--------------------------------
;Reserve Files
;If you are using solid compression, files that are required before
;the actual installation should be stored first in the data block,
;because this will make your installer start faster.
!insertmacro MUI_RESERVEFILE_LANGDLL
Function LaunchLink Function LaunchLink
ExecShell "" "$INSTDIR\SABnzbd.exe" ExecShell "" "$INSTDIR\SABnzbd.exe"
FunctionEnd FunctionEnd
;--------------------------------
Function .onInit Function .onInit
;make sure sabnzbd.exe isnt running..if so abort !insertmacro MUI_LANGDLL_DISPLAY
;make sure sabnzbd.exe isnt running..if so abort
loop: loop:
StrCpy $0 "SABnzbd.exe" StrCpy $0 "SABnzbd.exe"
KillProc::FindProcesses KillProc::FindProcesses
StrCmp $0 "0" endcheck StrCmp $0 "0" endcheck
MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Please close "SABnzbd.exe" first' IDOK loop IDCANCEL exitinstall MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgCloseSab) IDOK loop IDCANCEL exitinstall
exitinstall: exitinstall:
Abort Abort
endcheck: endcheck:
FunctionEnd FunctionEnd
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
Section "SABnzbd" SecDummy Section "SABnzbd" SecDummy
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
;IfFileExists $INSTDIR\sabnzbd.exe 0 endWarnExist IfFileExists $INSTDIR\sabnzbd.exe 0 endWarnExist
; MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Warning: overwriting an existing installation is not recommended' IDOK endWarnExist IDCANCEL 0 IfFileExists $INSTDIR\language\us-en.txt endWarnExist 0
; Abort MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(MsgOldQueue) IDOK endWarnExist IDCANCEL 0
;endWarnExist: Abort
endWarnExist:
;IfFileExists "$LOCALAPPDATA\sabnzbd\cache\queue.sab" 0 endWarnCache
; IfFileExists "$LOCALAPPDATA\sabnzbd\cache\queue7.sab" endWarnCache 0
; MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION 'Warning: do not re-use an older download queue' IDOK endWarnCache IDCANCEL 0
; Abort
;endWarnCache:
; add files / whatever that need to be installed here. ; add files / whatever that need to be installed here.
File /r "dist\*" File /r "dist\*"
@ -147,7 +168,7 @@ WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd - SafeMode.lnk" "$INSTDIR\SABnzbd-console.exe" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd - SafeMode.lnk" "$INSTDIR\SABnzbd-console.exe"
WriteINIStr "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd - Documentation.url" "InternetShortcut" "URL" "http://sabnzbd.wikidot.com/" WriteINIStr "$SMPROGRAMS\$STARTMENU_FOLDER\SABnzbd - Documentation.url" "InternetShortcut" "URL" "http://wiki.sabnzbd.org/"
CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe" CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
@ -157,23 +178,23 @@ WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd ; end of default section SectionEnd ; end of default section
Section /o "Run at startup" startup Section /o $(MsgRunAtStart) startup
CreateShortCut "$SMPROGRAMS\Startup\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe" "-b0" CreateShortCut "$SMPROGRAMS\Startup\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe" "-b0"
SectionEnd ; SectionEnd ;
Section "Desktop Icon" desktop Section $(MsgIcon) desktop
CreateShortCut "$DESKTOP\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe" CreateShortCut "$DESKTOP\SABnzbd.lnk" "$INSTDIR\SABnzbd.exe"
SectionEnd ; end of desktop icon section SectionEnd ; end of desktop icon section
Section /o "NZB File association" assoc Section /o $(MsgAssoc) assoc
${registerExtension} "$INSTDIR\nzb.ico" "$INSTDIR\SABnzbd.exe" ".nzb" "NZB File" ${registerExtension} "$INSTDIR\nzb.ico" "$INSTDIR\SABnzbd.exe" ".nzb" "NZB File"
;${registerExtension} "$INSTDIR\SABnzbd.exe" ".nzb" "NZB File" ;${registerExtension} "$INSTDIR\SABnzbd.exe" ".nzb" "NZB File"
SectionEnd ; end of file association section SectionEnd ; end of file association section
; begin uninstall settings/section ; begin uninstall settings/section
UninstallText "This will uninstall SABnzbd+ from your system" UninstallText $(MsgUninstall)
Section Uninstall Section "un.$(MsgDelProgram)" Uninstall
;make sure sabnzbd.exe isnt running..if so shut it down ;make sure sabnzbd.exe isnt running..if so shut it down
StrCpy $0 "sabnzbd.exe" StrCpy $0 "sabnzbd.exe"
@ -208,11 +229,16 @@ Section Uninstall
; Delete installation files are carefully as possible ; Delete installation files are carefully as possible
; Using just rmdir /r "$instdir" is considered unsafe! ; Using just rmdir /r "$instdir" is considered unsafe!
RMDir /r "$INSTDIR\language\*de-de.t*" Delete "$INSTDIR\language\email-de-de.tmpl"
RMDir /r "$INSTDIR\language\*us-en.t*" Delete "$INSTDIR\language\email-us-en.tmpl"
RMDir /r "$INSTDIR\language\*nl-du.t*" Delete "$INSTDIR\language\email-nl-du.tmpl"
RMDir /r "$INSTDIR\language\*fr-fr.t*" Delete "$INSTDIR\language\email-fr-fr.tmpl"
RMDir /r "$INSTDIR\language\*sv-se.t*" Delete "$INSTDIR\language\email-sv-se.tmpl"
Delete "$INSTDIR\language\de-de.txt"
Delete "$INSTDIR\language\us-en.txt"
Delete "$INSTDIR\language\nl-du.txt"
Delete "$INSTDIR\language\fr-fr.txt"
Delete "$INSTDIR\language\sv-se.txt"
RMDir "$INSTDIR\language" RMDir "$INSTDIR\language"
RMDir /r "$INSTDIR\interfaces\Classic" RMDir /r "$INSTDIR\interfaces\Classic"
RMDir /r "$INSTDIR\interfaces\Plush" RMDir /r "$INSTDIR\interfaces\Plush"
@ -246,6 +272,7 @@ Section Uninstall
Delete "$INSTDIR\nzb.ico" Delete "$INSTDIR\nzb.ico"
Delete "$INSTDIR\PKG-INFO" Delete "$INSTDIR\PKG-INFO"
Delete "$INSTDIR\python25.dll" Delete "$INSTDIR\python25.dll"
Delete "$INSTDIR\python26.dll"
Delete "$INSTDIR\README.txt" Delete "$INSTDIR\README.txt"
Delete "$INSTDIR\SABnzbd-console.exe" Delete "$INSTDIR\SABnzbd-console.exe"
Delete "$INSTDIR\SABnzbd.exe" Delete "$INSTDIR\SABnzbd.exe"
@ -273,21 +300,105 @@ Section Uninstall
SectionEnd ; end of uninstall section SectionEnd ; end of uninstall section
Section "un.Delete Settings" DelSettings Section "un.$(MsgDelSettings)" DelSettings
Delete "$LOCALAPPDATA\sabnzbd\sabnzbd.ini" Delete "$LOCALAPPDATA\sabnzbd\sabnzbd.ini"
RMDir /r "$LOCALAPPDATA\sabnzbd\admin" RMDir /r "$LOCALAPPDATA\sabnzbd\admin"
SectionEnd SectionEnd
Section "un.Delete Logs" DelLogs Section "un.$(MsgDelLogs)" DelLogs
RMDir /r "$LOCALAPPDATA\sabnzbd\logs" RMDir /r "$LOCALAPPDATA\sabnzbd\logs"
SectionEnd SectionEnd
Section "un.Delete Cache" DelCache Section "un.$(MsgDelCache)" DelCache
RMDir /r "$LOCALAPPDATA\sabnzbd\cache" RMDir /r "$LOCALAPPDATA\sabnzbd\cache"
RMDir "$LOCALAPPDATA\sabnzbd" RMDir "$LOCALAPPDATA\sabnzbd"
SectionEnd SectionEnd
; eof ; eof
;
;--------------------------------
;Language strings
; MsgWarnRunning 'Please close "SABnzbd.exe" first'
LangString MsgStartSab ${LANG_ENGLISH} "Start SABnzbd (hidden)"
LangString MsgStartSab ${LANG_DUTCH} "Start SABnzbd (verborgen)"
LangString MsgStartSab ${LANG_FRENCH} "Lancer SABnzbd (caché)"
LangString MsgStartSab ${LANG_GERMAN} "SABnzbd starten (unsichtbar)"
LangString MsgStartSab ${LANG_SWEDISH} "Starta SABnzbd (dold)"
LangString MsgShowRelNote ${LANG_ENGLISH} "Show Release Notes"
LangString MsgShowRelNote ${LANG_DUTCH} "Toon Vrijgave Bericht (Engels)"
LangString MsgShowRelNote ${LANG_FRENCH} "Afficher les notes de version"
LangString MsgShowRelNote ${LANG_GERMAN} "Versionshinweise anzeigen"
LangString MsgShowRelNote ${LANG_SWEDISH} "Visa release noteringar"
LangString MsgSupportUs ${LANG_ENGLISH} "Support the project, Donate!"
LangString MsgSupportUs ${LANG_DUTCH} "Steun het project, Doneer!"
LangString MsgSupportUs ${LANG_FRENCH} "Supportez le projet, faites un don !"
LangString MsgSupportUs ${LANG_GERMAN} "Bitte unterstützen Sie das Projekt durch eine Spende!"
LangString MsgSupportUs ${LANG_SWEDISH} "Donera och stöd detta projekt!"
LangString MsgCloseSab ${LANG_ENGLISH} "Please close $\"SABnzbd.exe$\" first"
LangString MsgCloseSab ${LANG_DUTCH} "Sluit $\"SABnzbd.exe$\" eerst af"
LangString MsgCloseSab ${LANG_FRENCH} "Quittez $\"SABnzbd.exe$\" avant l\'installation, SVP"
LangString MsgCloseSab ${LANG_GERMAN} "Schliessen Sie bitte zuerst $\"SABnzbd.exe$\"."
LangString MsgCloseSab ${LANG_SWEDISH} "Var vänlig stäng $\"SABnzbd.exe$\" först"
LangString MsgOldQueue ${LANG_ENGLISH} " >>>> WARNING <<<<$\r$\n$\r$\nIf not empty, download your current queue with the old program.$\r$\nThe new program will ignore your current queue!"
LangString MsgOldQueue ${LANG_DUTCH} " >>>> WAARSCHUWING <<<<$\r$\n$\r$\nIndien niet leeg, download eerst de gehele huidige wachtrij met het oude programma.$\r$\nHet nieuwe programma zal je huidige wachtrij negeren!"
LangString MsgOldQueue ${LANG_FRENCH} " >>>> ATTENTION <<<<$\r$\n$\r$\nsi votre file d'attente de téléchargement n'est pas vide, terminez la avec la version précédente du programme.$\r$\nLa nouvelle version l'ignorera!"
LangString MsgOldQueue ${LANG_GERMAN} " >>>> ACHTUNG <<<<$\r$\n$\r$\nWarten Sie, bis das alte Programm alle Downloads fertiggestellt hat.$\r$\nDas neue Programm wird die noch ausstehenden Downloads ignorieren!"
LangString MsgOldQueue ${LANG_SWEDISH} " >>>> VARNING <<<<$\r$\n$\r$\nOm kön inte är tom, hämta din nuvarande kö med det gamla programmet.$\r$\nDet nya programmet kommer att ignorera din nuvarande kö!"
LangString MsgUninstall ${LANG_ENGLISH} "This will uninstall SABnzbd from your system"
LangString MsgUninstall ${LANG_DUTCH} "Dit verwijdert SABnzbd van je systeem"
LangString MsgUninstall ${LANG_FRENCH} "Ceci désinstallera SABnzbd de votre système"
LangString MsgUninstall ${LANG_GERMAN} "Dies entfernt SABnzbd von Ihrem System"
LangString MsgUninstall ${LANG_SWEDISH} "Detta kommer att avinstallera SABnzbd från systemet"
LangString MsgRunAtStart ${LANG_ENGLISH} "Run at startup"
LangString MsgRunAtStart ${LANG_DUTCH} "Opstarten bij systeem start"
LangString MsgRunAtStart ${LANG_FRENCH} "Lancer au démarrage"
LangString MsgRunAtStart ${LANG_GERMAN} "Beim Systemstart ausführen"
LangString MsgRunAtStart ${LANG_SWEDISH} "Kör vid uppstart"
LangString MsgIcon ${LANG_ENGLISH} "Desktop Icon"
LangString MsgIcon ${LANG_DUTCH} "Pictogram op bureaublad"
LangString MsgIcon ${LANG_FRENCH} "Icône sur le Bureau"
LangString MsgIcon ${LANG_GERMAN} "Desktop-Symbol"
LangString MsgIcon ${LANG_SWEDISH} "Skrivbordsikon"
LangString MsgAssoc ${LANG_ENGLISH} "NZB File association"
LangString MsgAssoc ${LANG_DUTCH} "NZB bestanden koppelen aan SABnzbd"
LangString MsgAssoc ${LANG_FRENCH} "Association des fichiers NZB"
LangString MsgAssoc ${LANG_GERMAN} "Mit NZB-Dateien verknüpfen"
LangString MsgAssoc ${LANG_SWEDISH} "NZB Filassosication"
LangString MsgDelProgram ${LANG_ENGLISH} "Delete Program"
LangString MsgDelProgram ${LANG_DUTCH} "Verwijder programma"
LangString MsgDelProgram ${LANG_FRENCH} "Supprimer le programme"
LangString MsgDelProgram ${LANG_GERMAN} "Programm löschen"
LangString MsgDelProgram ${LANG_SWEDISH} "Ta bort programmet"
LangString MsgDelSettings ${LANG_ENGLISH} "Delete Settings"
LangString MsgDelSettings ${LANG_DUTCH} "Verwijder instellingen"
LangString MsgDelSettings ${LANG_FRENCH} "Supprimer Paramètres"
LangString MsgDelSettings ${LANG_GERMAN} "Einstellungen löschen"
LangString MsgDelSettings ${LANG_SWEDISH} "Ta bort inställningar"
LangString MsgDelLogs ${LANG_ENGLISH} "Delete Logs"
LangString MsgDelLogs ${LANG_DUTCH} "Verwijder logging"
LangString MsgDelLogs ${LANG_FRENCH} "Supprimer les logs"
LangString MsgDelLogs ${LANG_GERMAN} "Protokoll löschen"
LangString MsgDelLogs ${LANG_SWEDISH} "Ta bort logg"
LangString MsgDelCache ${LANG_ENGLISH} "Delete Cache"
LangString MsgDelCache ${LANG_DUTCH} "Verwijder Cache"
LangString MsgDelCache ${LANG_FRENCH} "Supprimer le cache"
LangString MsgDelCache ${LANG_GERMAN} "Cache löschen"
LangString MsgDelCache ${LANG_SWEDISH} "Ta bort temporär-mapp"
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd

4
main/PKG-INFO

@ -1,7 +1,7 @@
Metadata-Version: 1.0 Metadata-Version: 1.0
Name: SABnzbd Name: SABnzbd
Version: 0.5.0RC4 Version: 0.6.0
Summary: SABnzbd-0.5.0RC4 Summary: SABnzbd-0.6.0
Home-page: http://sourceforge.net/projects/sabnzbdplus Home-page: http://sourceforge.net/projects/sabnzbdplus
Author: The SABnzbd Team Author: The SABnzbd Team
Author-email: team@sabnzbd.org Author-email: team@sabnzbd.org

14
main/README.txt

@ -1,5 +1,5 @@
******************************************* *******************************************
*** This is SABnzbd 0.5.0 RC4 *** *** This is SABnzbd 0.6.0 Trunk ***
******************************************* *******************************************
SABnzbd is an open-source cross-platform binary newsreader. SABnzbd is an open-source cross-platform binary newsreader.
It simplifies the process of downloading from Usenet dramatically, It simplifies the process of downloading from Usenet dramatically,
@ -14,20 +14,12 @@ http://wiki.sabnzbd.org/
>>> PLEASE ALSO READ THE FILE "ISSUES.txt" <<< >>> PLEASE ALSO READ THE FILE "ISSUES.txt" <<<
******************************************* *******************************************
*** Release Candidate Software *** *** Upgrading from 0.4.x ***
******************************************* *******************************************
This is RC software, it´s almost the real thing.
You are invited to file problem reports on our forum:
http://forums.sabnzbd.org
Board = "Beta Releases"
>>>>> PLEASE DOWNLOAD YOUR CURRENT QUEUE BEFORE UPGRADING <<<<<<
*******************************************
*** Upgrading from 0.4.x ***
*******************************************
When upgrading from a 0.4.x release such as 0.4.12 your old settings will be kept. When upgrading from a 0.4.x release such as 0.4.12 your old settings will be kept.
You will however be given a fresh queue and history. If you have items in your queue You will however be given a fresh queue and history. If you have items in your queue
from the older version of SABnzbd, you can either re-import the nzb files if you kept from the older version of SABnzbd, you can either re-import the nzb files if you kept

3
main/SABnzbd.py

@ -890,6 +890,9 @@ def main():
panic(msg, 'Specify a correct file or delete this file.') panic(msg, 'Specify a correct file or delete this file.')
exit_sab(1) exit_sab(1)
# Set root folders for HTTPS server file paths
sabnzbd.cfg.set_root_folders2()
# Determine web host address # Determine web host address
cherryhost, cherryport, browserhost, https_port = get_webhost(cherryhost, cherryport, https_port) cherryhost, cherryport, browserhost, https_port = get_webhost(cherryhost, cherryport, https_port)
enable_https = sabnzbd.cfg.ENABLE_HTTPS() enable_https = sabnzbd.cfg.ENABLE_HTTPS()

5
main/interfaces/Classic/templates/config_switches.tmpl

@ -72,6 +72,11 @@
</select> </select>
<br> <br>
<br> <br>
<!--#if $nt#-->
<label><input type="checkbox" name="par2_multicore" value="1" <!--#if $par2_multicore > 0 then "checked=1" else ""#--> /> <strong>$T('opt-par2_multicore')</strong></label><br>
$T('explain-par2_multicore')<br>
<br>
<!--#end if#-->
<strong>$T('opt-par_option'):</strong><br/> <strong>$T('opt-par_option'):</strong><br/>
$T('explain-par_option')<br/> $T('explain-par_option')<br/>
<input type="text" name="par_option" value="$par_option"/> <input type="text" name="par_option" value="$par_option"/>

7
main/interfaces/Plush/templates/config_switches.tmpl

@ -61,6 +61,13 @@
<td valign=top><input type="checkbox" name="top_only" value="1" <!--#if $top_only > 0 then "checked=1" else ""#--> /></td> <td valign=top><input type="checkbox" name="top_only" value="1" <!--#if $top_only > 0 then "checked=1" else ""#--> /></td>
<td><small>$T('explain-top_only')</small></td> <td><small>$T('explain-top_only')</small></td>
</tr> </tr>
<!--#if $nt#-->
<tr>
<td class=alignRight><div class="tucker">$T('opt-par2_multicore'):</div></td>
<td><input type="checkbox" name="par2_multicore" value="1" <!--#if $par2_multicore > 0 then "checked=1" else ""#--> /></td>
<td><small>$T('explain-par2_multicore')</small></td>
</tr>
<!--#end if#-->
</table> </table>
<hr/> <hr/>

2
main/interfaces/smpl/templates/config_rss.tmpl

@ -60,7 +60,7 @@ MochiKit.DOM.addLoadEvent(location = "../../#config-rss");
<optgroup label="$T('priority')"> <optgroup label="$T('priority')">
<option value="-100" <!--#if $rss[$feed]['priority'] == -100 then 'selected' else ''#-->>$T('default')</option> <option value="-100" <!--#if $rss[$feed]['priority'] == -100 then 'selected' else ''#-->>$T('default')</option>
<option value="2" <!--#if $rss[$feed]['priority'] == 2 then 'selected' else ''#-->>$T('pr-force')</option> <option value="2" <!--#if $rss[$feed]['priority'] == 2 then 'selected' else ''#-->>$T('pr-force')</option>
<option value="1" <!--#if $rss[$feed]['priority'] == 1 then 'selected' else ''#-->>$T('pr-normal')</option> <option value="1" <!--#if $rss[$feed]['priority'] == 1 then 'selected' else ''#-->>$T('pr-high')</option>
<option value="0" <!--#if $rss[$feed]['priority'] == 0 then 'selected' else ''#-->>$T('pr-normal')</option> <option value="0" <!--#if $rss[$feed]['priority'] == 0 then 'selected' else ''#-->>$T('pr-normal')</option>
<option value="-1" <!--#if $rss[$feed]['priority'] == -1 then 'selected' else ''#-->>$T('pr-low')</option>> <option value="-1" <!--#if $rss[$feed]['priority'] == -1 then 'selected' else ''#-->>$T('pr-low')</option>>
</optgroup> </optgroup>

7
main/interfaces/smpl/templates/config_switches.tmpl

@ -87,6 +87,13 @@
<span class="tips">$T('explain-dirscan_priority')</span> <span class="tips">$T('explain-dirscan_priority')</span>
<br class="clear" /> <br class="clear" />
<!--#if $nt#-->
<label><span class="label">$T('opt-par2_multicore'):</span>
<input class="radio" type="checkbox" name="par2_multicore" value="1" <!--#if $par2_multicore > 0 then 'checked="1"' else ""#--> />
<span class="tips">$T('explain-par2_multicore')</span></label>
<br class="clear" />
<!--#end if#-->
<span class="label">$T('opt-par_option'):</span> <span class="label">$T('opt-par_option'):</span>
<input type="text" name="par_option" value="$par_option"/> <input type="text" name="par_option" value="$par_option"/>
<span class="tips">$T('explain-par_option')</span></label> <span class="tips">$T('explain-par_option')</span></label>

2
main/language/de-de.txt

@ -333,6 +333,8 @@ explain-dirscan_priority Wird verwendet, wenn die Kategorie keine Priorität\
vorschreibt. vorschreibt.
opt-par_option Zusätzliche PAR2-Parameter opt-par_option Zusätzliche PAR2-Parameter
explain-par_option Lesen Sie dazu die Hilfe im Wiki! explain-par_option Lesen Sie dazu die Hilfe im Wiki!
opt-par2_multicore MultiCore Par2 aktivieren
explain-par2_multicore Lesen Sie dazu die Hilfe im Wiki!
opt-nice Nice-Parameter opt-nice Nice-Parameter
explain-nice Lesen Sie dazu die Hilfe im Wiki! explain-nice Lesen Sie dazu die Hilfe im Wiki!
opt-ionice IONice-Parameter opt-ionice IONice-Parameter

2
main/language/fr-fr.txt

@ -305,6 +305,8 @@ opt-dirscan_script Script utilisateur par d
explain-dirscan_script Utilisé quand la catégorie de précise pas de choix. explain-dirscan_script Utilisé quand la catégorie de précise pas de choix.
opt-dirscan_priority Priorité par défaut opt-dirscan_priority Priorité par défaut
explain-dirscan_priority Utilisé quand la catégorie de précise pas de choix. explain-dirscan_priority Utilisé quand la catégorie de précise pas de choix.
opt-par2_multicore Utilisé MultiCore Par2
explain-par2_multicore Consultez le Wiki pour plus d'info à ce sujet (en anglais) !
opt-par_option Paramètres PAR2 supplémentaires opt-par_option Paramètres PAR2 supplémentaires
explain-par_option Consultez le Wiki pour plus d'info à ce sujet (en anglais) ! explain-par_option Consultez le Wiki pour plus d'info à ce sujet (en anglais) !
opt-nice Paramètres Nice opt-nice Paramètres Nice

2
main/language/nl-du.txt

@ -298,6 +298,8 @@ opt-dirscan_script Standaard script
explain-dirscan_script Wordt gebruikt wanneer de categorie geen script opgeeft. explain-dirscan_script Wordt gebruikt wanneer de categorie geen script opgeeft.
opt-dirscan_priority Standaard prioriteit opt-dirscan_priority Standaard prioriteit
explain-dirscan_priority Wordt gebruikt wanneer de categorie geen prioriteit opgeeft. explain-dirscan_priority Wordt gebruikt wanneer de categorie geen prioriteit opgeeft.
opt-par2_multicore MultiCore Par2 toestaan
explain-par2_multicore Lees hier voor de Wiki pagina!
opt-par_option Extra PAR2 parameters: opt-par_option Extra PAR2 parameters:
explain-par_option Lees hier voor de Wiki pagina! explain-par_option Lees hier voor de Wiki pagina!
opt-nice "Nice" parameters opt-nice "Nice" parameters

2
main/language/sv-se.txt

@ -305,6 +305,8 @@ opt-dirscan_priority Standard prioritet
explain-dirscan_priority Använd när ingen prioritet är bestämd av kategori. explain-dirscan_priority Använd när ingen prioritet är bestämd av kategori.
opt-par_option Extra PAR2 parametrar opt-par_option Extra PAR2 parametrar
explain-par_option Läs Wiki Help för detta! explain-par_option Läs Wiki Help för detta!
opt-par2_multicore Aktivera MultiCore Par2
explain-par2_multicore Läs Wiki Help för detta!
opt-nice Bra parametrar opt-nice Bra parametrar
explain-nice Läs Wiki Help för detta! explain-nice Läs Wiki Help för detta!
opt-ionice IONice parametrar opt-ionice IONice parametrar

2
main/language/us-en.txt

@ -302,6 +302,8 @@ opt-dirscan_script Default User Script
explain-dirscan_script Used when no user script is defined by the category. explain-dirscan_script Used when no user script is defined by the category.
opt-dirscan_priority Default Priority opt-dirscan_priority Default Priority
explain-dirscan_priority Used when no priority is defined by the category. explain-dirscan_priority Used when no priority is defined by the category.
opt-par2_multicore Enable MultiCore Par2
explain-par2_multicore Read the Wiki Help on this!
opt-par_option Extra PAR2 Parameters opt-par_option Extra PAR2 Parameters
explain-par_option Read the Wiki Help on this! explain-par_option Read the Wiki Help on this!
opt-nice Nice Parameters opt-nice Nice Parameters

8
main/package.py

@ -1,6 +1,6 @@
#!/usr/bin/env python -OO #!/usr/bin/env python -OO
# #
# Copyright 2008-2009 The SABnzbd-Team <team@sabnzbd.org> # Copyright 2008-2010 The SABnzbd-Team <team@sabnzbd.org>
# #
# This program is free software; you can redistribute it and/or # This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License # modify it under the terms of the GNU General Public License
@ -444,12 +444,6 @@ elif target in ('binary', 'installer'):
DeleteFiles('*.ini') DeleteFiles('*.ini')
if sys.version_info < (2,6):
# Copy the proper OpenSSL files into the dist folder
shutil.copy2('win/openssl/libeay32.dll', 'dist/lib')
shutil.copy2('win/openssl/ssleay32.dll', 'dist/lib')
############################ ############################
# Generate the windowed-app # Generate the windowed-app
options['windows'] = program options['windows'] = program

1
main/sabnzbd/__init__.py

@ -759,6 +759,7 @@ def check_all_tasks():
if not sabnzbd.scheduler.sched_check(): if not sabnzbd.scheduler.sched_check():
logging.info('Restarting crashed scheduler') logging.info('Restarting crashed scheduler')
sabnzbd.scheduler.init() sabnzbd.scheduler.init()
sabnzbd.downloader.unblock_all()
# Check one-shot pause # Check one-shot pause
sabnzbd.scheduler.pause_check() sabnzbd.scheduler.pause_check()

4
main/sabnzbd/cfg.py

@ -90,6 +90,7 @@ par_option = OptionStr('misc', 'par_option', '', validation=no_nonsense)
nice = OptionStr('misc', 'nice', '', validation=no_nonsense) nice = OptionStr('misc', 'nice', '', validation=no_nonsense)
ionice = OptionStr('misc', 'ionice', '', validation=no_nonsense) ionice = OptionStr('misc', 'ionice', '', validation=no_nonsense)
ignore_wrong_unrar = OptionBool('misc', 'ignore_wrong_unrar', False) ignore_wrong_unrar = OptionBool('misc', 'ignore_wrong_unrar', False)
par2_multicore = OptionBool('misc', 'par2_multicore', True)
USERNAME_NEWZBIN = OptionStr('newzbin', 'username') USERNAME_NEWZBIN = OptionStr('newzbin', 'username')
PASSWORD_NEWZBIN = OptionPassword('newzbin', 'password') PASSWORD_NEWZBIN = OptionPassword('newzbin', 'password')
@ -182,6 +183,7 @@ ENABLE_HTTPS = OptionBool('misc', 'enable_https', False)
LANGUAGE = OptionStr('misc', 'language', 'us-en') LANGUAGE = OptionStr('misc', 'language', 'us-en')
SSL_TYPE = OptionStr('misc', 'ssl_type', 'v23') SSL_TYPE = OptionStr('misc', 'ssl_type', 'v23')
UNPACK_CHECK = OptionBool('misc', 'unpack_check', True) UNPACK_CHECK = OptionBool('misc', 'unpack_check', True)
NO_PENALTIES = OptionBool('misc', 'no_penalties', False)
# Internal options, not saved in INI file # Internal options, not saved in INI file
DEBUG_DELAY = OptionNumber('misc', 'debug_delay', 0, add=False) DEBUG_DELAY = OptionNumber('misc', 'debug_delay', 0, add=False)
@ -202,5 +204,7 @@ def set_root_folders(home, lcldata, prog, interf):
ADMIN_DIR.set_root(lcldata) ADMIN_DIR.set_root(lcldata)
DIRSCAN_DIR.set_root(home) DIRSCAN_DIR.set_root(home)
LOG_DIR.set_root(lcldata) LOG_DIR.set_root(lcldata)
def set_root_folders2():
HTTPS_CERT.set_root(ADMIN_DIR.get_path()) HTTPS_CERT.set_root(ADMIN_DIR.get_path())
HTTPS_KEY.set_root(ADMIN_DIR.get_path()) HTTPS_KEY.set_root(ADMIN_DIR.get_path())

5
main/sabnzbd/codecs.py

@ -52,7 +52,10 @@ def special_fixer(p):
receives a latin-1 encoded name. receives a latin-1 encoded name.
""" """
if sabnzbd.WIN32: if sabnzbd.WIN32:
return p try:
return p.decode('utf-8').encode('latin-1')
except:
return p
else: else:
if gUTF or sabnzbd.DARWIN: if gUTF or sabnzbd.DARWIN:
try: try:

1
main/sabnzbd/config.py

@ -901,6 +901,7 @@ def create_api_key():
_FIXES = \ _FIXES = \
( (
('bandwith_limit', 'bandwidth_limit'), ('bandwith_limit', 'bandwidth_limit'),
('enable_par_multicore', 'par2_multicore')
) )
def compatibility_fix(cf): def compatibility_fix(cf):

26
main/sabnzbd/downloader.py

@ -42,12 +42,13 @@ from sabnzbd.lang import T, Ta
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Timeout penalty in minutes for each cause # Timeout penalty in minutes for each cause
_PENALTY_UNKNOWN = 3 _PENALTY_UNKNOWN = 3 # Unknown cause
_PENALTY_502 = 5 _PENALTY_502 = 5 # Unknown 502
_PENALTY_TIMEOUT = 10 _PENALTY_TIMEOUT = 10 # Server doesn't give an answer (multiple times)
_PENALTY_SHARE = 15 _PENALTY_SHARE = 10 # Account sharing detected
_PENALTY_TOOMANY = 10 _PENALTY_TOOMANY = 10 # Too many connections
_PENALTY_PERM = 30 _PENALTY_PERM = 10 # Permanent error, like bad username/password
_PENALTY_SHORT = 1 # Minimal penalty when no_penalties is set
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Wrapper functions # Wrapper functions
@ -157,6 +158,11 @@ def unblock(server):
if __DOWNLOADER: return __DOWNLOADER.unblock(server) if __DOWNLOADER: return __DOWNLOADER.unblock(server)
@synchronized_CV @synchronized_CV
def unblock_all():
global __DOWNLOADER
if __DOWNLOADER: __DOWNLOADER.unblock_all()
@synchronized_CV
def wakeup(): def wakeup():
# Just let the decorator rattle the semaphore # Just let the decorator rattle the semaphore
pass pass
@ -415,7 +421,7 @@ class Downloader(Thread):
if not server.idle_threads or server.restart or self.is_paused() or self.shutdown or self.delayed or self.postproc: if not server.idle_threads or server.restart or self.is_paused() or self.shutdown or self.delayed or self.postproc:
continue continue
if not sabnzbd.nzbqueue.has_articles_for(server): if not (server.active and sabnzbd.nzbqueue.has_articles_for(server)):
continue continue
for nw in server.idle_threads[:]: for nw in server.idle_threads[:]:
@ -620,6 +626,8 @@ class Downloader(Thread):
if block or (penalty and server.optional): if block or (penalty and server.optional):
if server.active: if server.active:
server.active = False server.active = False
if (not server.optional) and cfg.NO_PENALTIES.get():
penalty = _PENALTY_SHORT
if penalty and (block or server.optional): if penalty and (block or server.optional):
logging.info('Server %s ignored for %s minutes', server.id, penalty) logging.info('Server %s ignored for %s minutes', server.id, penalty)
self.plan_server(server.id, penalty) self.plan_server(server.id, penalty)
@ -798,6 +806,10 @@ class Downloader(Thread):
self.init_server(server_id, server_id) self.init_server(server_id, server_id)
break break
def unblock_all(self):
for server_id in self._timers.keys():
self.unblock(server_id)
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
def clues_login(text): def clues_login(text):

38
main/sabnzbd/interface.py

@ -204,14 +204,18 @@ def check_session(kwargs):
def check_apikey(kwargs, nokey=False): def check_apikey(kwargs, nokey=False):
""" Check api key """ """ Check api key """
output = kwargs.get('output') output = kwargs.get('output')
mode = kwargs.get('mode', '')
if cfg.DISABLE_KEY() or nokey:
return None
else:
key = kwargs.get('apikey')
# Don't give a visible warning: these commands are used by some
# external utilities to detect if username/password is required
special = mode in ('get_scripts', 'qstatus')
# First check APIKEY, if OK that's sufficient
if not (cfg.DISABLE_KEY() or nokey):
key = kwargs.get('apikey')
if not key: if not key:
logging.warning(Ta('warn-apikeyNone')) if not special:
logging.warning(Ta('warn-apikeyNone'))
return report(output, 'API Key Required') return report(output, 'API Key Required')
elif key != cfg.API_KEY(): elif key != cfg.API_KEY():
logging.warning(Ta('warn-apikeyBad')) logging.warning(Ta('warn-apikeyBad'))
@ -219,6 +223,16 @@ def check_apikey(kwargs, nokey=False):
else: else:
return None return None
# No active APIKEY, check web credentials instead
if cfg.USERNAME() and cfg.PASSWORD():
if kwargs.get('ma_username') == cfg.USERNAME() and kwargs.get('ma_password') == cfg.PASSWORD():
pass
else:
if not special:
logging.warning(Ta('warn-authMissing'))
return report(output, 'Missing authentication')
return None
def del_from_section(kwargs): def del_from_section(kwargs):
""" Remove keyword in section """ """ Remove keyword in section """
@ -497,7 +511,7 @@ class MainPage:
def api(self, **kwargs): def api(self, **kwargs):
"""Handler for API over http, with explicit authentication parameters """Handler for API over http, with explicit authentication parameters
""" """
if kwargs.get('mode', '') != 'version': if kwargs.get('mode', '') not in ('version', 'auth'):
msg = check_apikey(kwargs) msg = check_apikey(kwargs)
if msg: return msg if msg: return msg
return self.api_handler(kwargs) return self.api_handler(kwargs)
@ -856,6 +870,14 @@ class MainPage:
if mode == 'version': if mode == 'version':
return report(output, keyword='version', data=sabnzbd.__version__) return report(output, keyword='version', data=sabnzbd.__version__)
if mode == 'auth':
auth = 'None'
if cfg.USERNAME.get() and cfg.PASSWORD.get():
auth = 'login'
if not cfg.DISABLE_KEY.get():
auth = 'apikey'
return report(output, keyword='auth', data=auth)
if mode == 'newzbin': if mode == 'newzbin':
if name == 'get_bookmarks': if name == 'get_bookmarks':
newzbin.getBookmarksNow() newzbin.getBookmarksNow()
@ -1532,7 +1554,7 @@ class ConfigDirectories:
SWITCH_LIST = \ SWITCH_LIST = \
('par_option', 'enable_unrar', 'enable_unzip', 'enable_filejoin', ('par2_multicore', 'par_option', 'enable_unrar', 'enable_unzip', 'enable_filejoin',
'enable_tsjoin', 'send_group', 'fail_on_crc', 'top_only', 'enable_tsjoin', 'send_group', 'fail_on_crc', 'top_only',
'dirscan_opts', 'enable_par_cleanup', 'auto_sort', 'check_new_rel', 'auto_disconnect', 'dirscan_opts', 'enable_par_cleanup', 'auto_sort', 'check_new_rel', 'auto_disconnect',
'safe_postproc', 'no_dupes', 'replace_spaces', 'replace_illegal', 'auto_browser', 'safe_postproc', 'no_dupes', 'replace_spaces', 'replace_illegal', 'auto_browser',

96
main/sabnzbd/misc.py

@ -169,32 +169,27 @@ def cat_convert(cat):
################################################################################ ################################################################################
# sanitize_filename # # sanitize_filename #
################################################################################ ################################################################################
_FILE_CH_MAPPER = { if sabnzbd.WIN32:
'\\' : '+', CH_ILLEGAL = r'\/<>?*:|"'
'/' : '+', CH_LEGAL = r'++{}!@-#`'
'<' : '{', else:
'>' : '}', CH_ILLEGAL = r'/'
'?' : '!', CH_LEGAL = r'+'
'*' : '@',
':' : '-',
'|' : '#',
'"' : '`'
}
_FOLDER_REMOVER = ''.join(_FILE_CH_MAPPER.keys())
if not sabnzbd.WIN32:
_FILE_CH_MAPPER = {
'/' : '+'
}
def sanitize_filename(name): def sanitize_filename(name):
""" Return filename with illegal chars converted to legal ones """ Return filename with illegal chars converted to legal ones
and with the par2 extension always in lowercase and with the par2 extension always in lowercase
""" """
name = name.strip() illegal = CH_ILLEGAL
name = ''.join([_FILE_CH_MAPPER.get(ch, ch) for ch in name]) legal = CH_LEGAL
lst = []
for ch in name.strip():
if ch in illegal:
ch = legal[illegal.find(ch)]
lst.append(ch)
name = ''.join(lst)
if not name: if not name:
name = 'unknown' name = 'unknown'
@ -204,21 +199,38 @@ def sanitize_filename(name):
ext = lowext ext = lowext
return name + ext return name + ext
FL_ILLEGAL = CH_ILLEGAL + '\x92'
FL_LEGAL = CH_LEGAL + "'"
uFL_ILLEGAL = FL_ILLEGAL.decode('latin-1')
uFL_LEGAL = FL_LEGAL.decode('latin-1')
def sanitize_foldername(name): def sanitize_foldername(name):
""" Return foldername with dodgy chars converted to safe ones """ Return foldername with dodgy chars converted to safe ones
Remove any leading and trailing dot and space characters Remove any leading and trailing dot and space characters
""" """
#global _FOLDER_REMOVER if isinstance(name, unicode):
name = name.strip('. ') illegal = uFL_ILLEGAL
if cfg.REPLACE_ILLEGAL(): legal = uFL_LEGAL
name = ''.join([_FILE_CH_MAPPER.get(ch, ch) for ch in name])
else: else:
name = ''.join([ch for ch in name if ch not in _FOLDER_REMOVER]) illegal = FL_ILLEGAL
legal = FL_LEGAL
repl = cfg.REPLACE_ILLEGAL.get()
lst = []
for ch in name.strip():
if ch in illegal:
if repl:
ch = legal[illegal.find(ch)]
lst.append(ch)
else:
lst.append(ch)
name = ''.join(lst)
name = name.strip('. ')
if not name: if not name:
name = 'unknown' name = 'unknown'
maxlen = cfg.folder_max_length()
maxlen = cfg.folder_max_length.get()
if len(name) > maxlen: if len(name) > maxlen:
name = name[:maxlen] name = name[:maxlen]
@ -820,25 +832,17 @@ def get_unique_path(dirpath, n=0, create_dir=True):
return get_unique_path(dirpath, n=n+1, create_dir=create_dir) return get_unique_path(dirpath, n=n+1, create_dir=create_dir)
@synchronized(DIR_LOCK) @synchronized(DIR_LOCK)
def get_unique_filename(path, new_path, i=1): def get_unique_filename(path):
#path = existing path of the file, new_path = destination """ Check if path is unique. If not, add number like: "/path/name.NUM.ext".
if os.path.exists(new_path): """
p, fn = os.path.split(path) num = 1
name, ext = os.path.splitext(fn) while os.path.exists(path):
uniq_name = "%s.%s%s" % (name,i,ext) path, fname = os.path.split(path)
uniq_path = new_path.replace(fn,uniq_name) name, ext = os.path.splitext(fname)
if os.path.exists(uniq_path): fname = "%s.%d%s" % (name, num, ext)
path, uniq_path = get_unique_filename(path, new_path, i=i+1) num += 1
else: path = os.path.join(path, fname)
try: return path
renamer(path, uniq_path)
path = path.replace(fn, uniq_name)
except:
return path, new_path
return path, uniq_path
else:
return path, new_path
@synchronized(DIR_LOCK) @synchronized(DIR_LOCK)

54
main/sabnzbd/newsunpack.py

@ -40,7 +40,13 @@ if sabnzbd.WIN32:
from win32process import STARTF_USESHOWWINDOW, IDLE_PRIORITY_CLASS from win32process import STARTF_USESHOWWINDOW, IDLE_PRIORITY_CLASS
except ImportError: except ImportError:
pass pass
else:
# Define dummy WindowsError for non-Windows
class WindowsError(Exception):
def __init__(self, value):
self.parameter = value
def __str__(self):
return repr(self.parameter)
# Regex globals # Regex globals
RAR_RE = re.compile(r'\.(?P<ext>part\d*\.rar|rar|s\d\d|r\d\d|\d\d\d)$', re.I) RAR_RE = re.compile(r'\.(?P<ext>part\d*\.rar|rar|s\d\d|r\d\d|\d\d\d)$', re.I)
@ -125,6 +131,7 @@ def external_processing(extern_proc, complete_dir, filename, msgid, nicename, ca
stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
startupinfo=stup, creationflags=creationflags) startupinfo=stup, creationflags=creationflags)
except: except:
logging.debug("Failed script %s, Traceback: ", extern_proc, exc_info = True)
return "Cannot run script %s\r\n" % extern_proc, -1 return "Cannot run script %s\r\n" % extern_proc, -1
output = p.stdout.read() output = p.stdout.read()
@ -456,8 +463,12 @@ def RAR_Extract(rarfile, numrars, nzo, setname, extraction_path):
############################################################################ ############################################################################
command = ['%s' % RAR_COMMAND, 'x', '-idp', '-o-', '-or', password, if sabnzbd.WIN32:
'%s' % rarfile, '%s/' % extraction_path] command = ['%s' % RAR_COMMAND, 'x', '-idp', '-o-', '-or', '-ai', password,
'%s' % rarfile, '%s/' % extraction_path]
else:
command = ['%s' % RAR_COMMAND, 'x', '-idp', '-o-', '-or', password,
'%s' % rarfile, '%s/' % extraction_path]
stup, need_shell, command, creationflags = build_command(command) stup, need_shell, command, creationflags = build_command(command)
@ -654,20 +665,19 @@ def par2_repair(parfile_nzf, nzo, workdir, setname):
old_dir_content = os.listdir(workdir) old_dir_content = os.listdir(workdir)
used_joinables = joinables = [] used_joinables = joinables = []
setpars = pars_of_set(workdir, setname)
nzo.set_status('QuickCheck') result = readd = False
nzo.set_action_line(T('msg-repair'), T('msg-QuickChecking'))
if QuickCheck(setname, nzo): if cfg.QUICK_CHECK.get():
logging.info("Quick-check for %s is OK, skipping repair", setname) nzo.set_status('QuickCheck')
nzo.set_unpack_info('Repair', T('msg-QuickOK@1') % unicoder(setname), set=setname) nzo.set_action_line(T('msg-repair'), T('msg-QuickChecking'))
readd = False result = QuickCheck(setname, nzo)
result = True if result:
# Poor man's list of other pars, should not be needed logging.info("Quick-check for %s is OK, skipping repair", setname)
# but sometimes too many are downloaded nzo.set_unpack_info('Repair', T('msg-QuickOK@1') % unicoder(setname), set=setname)
pars = pars_of_set(workdir, setname) pars = setpars
else: if not result:
nzo.set_status('Repairing') nzo.set_status('Repairing')
result = False result = False
readd = False readd = False
@ -739,7 +749,10 @@ def par2_repair(parfile_nzf, nzo, workdir, setname):
except OSError: except OSError:
logging.warning(Ta('warn-delFailed@1'), parfile) logging.warning(Ta('warn-delFailed@1'), parfile)
deletables = [ os.path.join(workdir, f) for f in pars ] deletables = []
for f in pars:
if f in setpars:
deletables.append(os.path.join(workdir, f))
deletables.extend(used_joinables) deletables.extend(used_joinables)
for filepath in deletables: for filepath in deletables:
if filepath in joinables: if filepath in joinables:
@ -766,6 +779,9 @@ def PAR_Verify(parfile, parfile_nzf, nzo, setname, joinables, classic=False):
nzo.set_status('Verifying') nzo.set_status('Verifying')
start = time() start = time()
classic = classic or not cfg.par2_multicore.get()
logging.debug('Par2-classic = %s', classic)
if (is_new_partype(nzo, setname) and not classic) or not PAR2C_COMMAND: if (is_new_partype(nzo, setname) and not classic) or not PAR2C_COMMAND:
if cfg.par_option(): if cfg.par_option():
command = [str(PAR2_COMMAND), 'r', str(cfg.par_option().strip()), parfile] command = [str(PAR2_COMMAND), 'r', str(cfg.par_option().strip()), parfile]
@ -1146,7 +1162,7 @@ def QuickCheck(set, nzo):
def pars_of_set(wdir, setname): def pars_of_set(wdir, setname):
""" Return list of par2 files matching the set """ """ Return list of par2 files (pathless) matching the set """
list = [] list = []
for file in os.listdir(wdir): for file in os.listdir(wdir):
m = FULLVOLPAR2_RE.search(file) m = FULLVOLPAR2_RE.search(file)

5
main/sabnzbd/nzbqueue.py

@ -131,6 +131,9 @@ class NzbQueue(TryList):
categ = cat categ = cat
categ, pp, script, priority = cat_to_opts(categ, pp, script, priority) categ, pp, script, priority = cat_to_opts(categ, pp, script, priority)
# Remember old priority
old_prio = future.get_priority()
try: try:
future.__init__(filename, msgid, pp, scr, nzb=data, futuretype=False, cat=categ, priority=priority, nzbname=nzbname, nzo_info=nzo_info) future.__init__(filename, msgid, pp, scr, nzb=data, futuretype=False, cat=categ, priority=priority, nzbname=nzbname, nzo_info=nzo_info)
future.nzo_id = nzo_id future.nzo_id = nzo_id
@ -141,6 +144,8 @@ class NzbQueue(TryList):
self.remove(nzo_id, False) self.remove(nzo_id, False)
# Make sure the priority is changed now that we know the category # Make sure the priority is changed now that we know the category
if old_prio != priority:
future.set_priority(None)
self.set_priority(future.nzo_id, priority) self.set_priority(future.nzo_id, priority)
if self.__auto_sort: if self.__auto_sort:

8
main/sabnzbd/nzbstuff.py

@ -221,6 +221,11 @@ class NzbFile(TryList):
self.add_to_try_list(server) self.add_to_try_list(server)
def reset_all_try_lists(self):
for art in self.__articles:
art.reset_try_list()
self.reset_try_list()
def bytes(self): def bytes(self):
return self.__bytes return self.__bytes
@ -620,8 +625,7 @@ class NzbObject(TryList):
def reset_all_try_lists(self): def reset_all_try_lists(self):
for nzf in self.__files: for nzf in self.__files:
# nzf.reset_all_try_lists() nzf.reset_all_try_lists()
nzf.reset_try_list()
self.reset_try_list() self.reset_try_list()
def remove_article(self, article): def remove_article(self, article):

4
main/sabnzbd/postproc.py

@ -349,7 +349,7 @@ class PostProcessor(Thread):
for _file in files: for _file in files:
path = os.path.join(root, _file) path = os.path.join(root, _file)
new_path = path.replace(workdir, tmp_workdir_complete) new_path = path.replace(workdir, tmp_workdir_complete)
path, new_path = get_unique_filename(path,new_path) new_path = get_unique_filename(new_path)
move_to_path(path, new_path, unique=False) move_to_path(path, new_path, unique=False)
## Remove download folder ## Remove download folder
@ -413,7 +413,7 @@ class PostProcessor(Thread):
nzo.set_status('Running') nzo.set_status('Running')
nzo.set_action_line(T('msg-running'), unicoder(script)) nzo.set_action_line(T('msg-running'), unicoder(script))
nzo.set_unpack_info('Script', T('msg-runScript@1') % unicoder(script), unique=True) nzo.set_unpack_info('Script', T('msg-runScript@1') % unicoder(script), unique=True)
script_log, script_ret = external_processing(script_path, workdir_complete, filename, msgid, dirname, cat, group, jobResult) script_log, script_ret = external_processing(script_path, workdir_complete, nzo.get_filename(), msgid, dirname, cat, group, jobResult)
script_line = get_last_line(script_log) script_line = get_last_line(script_log)
if script_log: if script_log:
fname = nzo.get_nzo_id() fname = nzo.get_nzo_id()

10
main/sabnzbd/rss.py

@ -31,6 +31,7 @@ import sabnzbd.config as config
import sabnzbd.cfg as cfg import sabnzbd.cfg as cfg
from sabnzbd.misc import cat_convert, sanitize_foldername, wildcard_to_re from sabnzbd.misc import cat_convert, sanitize_foldername, wildcard_to_re
import sabnzbd.emailer as emailer import sabnzbd.emailer as emailer
from sabnzbd.codecs import latin1, unicoder
import sabnzbd.utils.feedparser as feedparser import sabnzbd.utils.feedparser as feedparser
from sabnzbd.lang import T, Ta from sabnzbd.lang import T, Ta
@ -270,11 +271,14 @@ class RSSQueue:
# Make sure there are no spaces in the URL # Make sure there are no spaces in the URL
link = link.replace(' ','') link = link.replace(' ','')
title = entry.title # Make sure only latin-1 encodable characters occur
atitle = latin1(entry.title)
title = unicoder(atitle)
newlinks.append(link) newlinks.append(link)
if cfg.NO_DUPES() and dup_title(feed, title): if cfg.NO_DUPES() and dup_title(feed, title):
logging.info("Ignoring duplicate job %s", title) logging.info("Ignoring duplicate job %s", atitle)
continue continue
myCat = defCat myCat = defCat
@ -284,7 +288,7 @@ class RSSQueue:
if (link not in jobs) or (jobs[link]['status'] in ('G', 'B', 'G*', 'B*')): if (link not in jobs) or (jobs[link]['status'] in ('G', 'B', 'G*', 'B*')):
# Match this title against all filters # Match this title against all filters
logging.debug('Trying title %s', title) logging.debug('Trying title %s', atitle)
result = False result = False
for n in xrange(regcount): for n in xrange(regcount):
if category and reTypes[n]=='C': if category and reTypes[n]=='C':

1
main/sabnzbd/trylist.py

@ -56,5 +56,4 @@ class TryList:
def reset_try_list(self): def reset_try_list(self):
""" Clean the list """ """ Clean the list """
if self.__try_list: if self.__try_list:
logging.debug("Reseting %s.__try_list", self)
self.__try_list = [] self.__try_list = []

2
main/sabnzbd/tvsort.py

@ -80,7 +80,7 @@ def move_to_parent_folder(workdir):
for _file in files: for _file in files:
path = os.path.join(root, _file) path = os.path.join(root, _file)
new_path = path.replace(workdir, path1) new_path = path.replace(workdir, path1)
path, new_path = get_unique_filename(path,new_path) new_path = get_unique_filename(new_path)
move_to_path(path, new_path, False) move_to_path(path, new_path, False)
cleanup_empty_directories(workdir) cleanup_empty_directories(workdir)

26
main/sabnzbd/urlgrabber.py

@ -212,6 +212,7 @@ def _matrix_url(url):
return url, matrix_id return url, matrix_id
_RE_MATRIX_ERR = re.compile(r'please_wait[_ ]+(\d+)', re.I)
def _analyse_matrix(fn, matrix_id): def _analyse_matrix(fn, matrix_id):
""" Analyse respons of nzbmatrix """ Analyse respons of nzbmatrix
@ -220,23 +221,26 @@ def _analyse_matrix(fn, matrix_id):
if not fn: if not fn:
# No response, just retry # No response, just retry
return (None, msg) return (None, msg)
try:
f = open(fn, 'r') f = open(fn, 'r')
data = f.read(40) data = f.read(40)
f.close() f.close()
except:
return (None, msg)
# Check for an error response # Check for an error response
if data.startswith('error'): if data and data.startswith('error'):
# Check if we are required to wait - if so sleep the urlgrabber # Check if we are required to wait - if so sleep the urlgrabber
if 'please_wait' in data[6:]: m = _RE_MATRIX_ERR.search(data)
# must wait x amount of seconds if m:
wait = data[18:] wait = int(m.group(1))
if wait.isdigit(): if wait:
time.sleep(int(wait)) logging.debug('Sleeping URL grabber %s sec', wait)
time.sleep(min(wait, 60))
# Return, but tell the urlgrabber to retry # Return, but tell the urlgrabber to retry
return (None, msg) return (None, msg)
else: else:
msg = Ta('warn-matrixFail@1') % data[6:] msg = Ta('warn-matrixFail@1') % data
return (None, msg) return (None, msg)
if data.startswith("<!DOCTYPE"): if data.startswith("<!DOCTYPE"):

BIN
main/win/openssl/libeay32.dll

Binary file not shown.

BIN
main/win/openssl/ssleay32.dll

Binary file not shown.

0
main/win/par2/COPYING

BIN
main/win/par2/MSVCP71.DLL

Binary file not shown.

175
main/win/par2/README_FIRST.txt

@ -36,14 +36,14 @@ http://sourceforge.net/projects/parchive
This version has been modified to utilise the Intel Threading Building Blocks This version has been modified to utilise the Intel Threading Building Blocks
2.1 library, which enables it to process files concurrently instead of the library, which enables it to process files concurrently instead of the
original version's serial processing. Computers with more than one CPU or core original version's serial processing. Computers with more than one CPU or core
such as those using Intel Core Duo, Intel Core Duo 2, or AMD Athlon X2 CPUs such as those using Intel Core Duo, Intel Core Duo 2, or AMD Athlon X2 CPUs
can now create or repair par2 archives much quicker than the original version. can now create or repair par2 archives much quicker than the original version.
For example, dual core machines can achieve near-double performance when For example, dual core machines can achieve near-double performance when
creating or repairing. creating or repairing.
The Intel Threading Building Blocks 2.1 library is obtained from: The Intel Threading Building Blocks library is obtained from:
http://osstbb.intel.com/ http://osstbb.intel.com/
@ -172,8 +172,8 @@ Building:
Mac OS X: Mac OS X:
- 10.5.2 or later - 10.5.2 or later
- Xcode 3.0 or 3.1 installed - Xcode 3.0 or later installed
- TBB 2.1 installed - TBB 2.1 or later installed
- NVIDIA CUDA 2.0 toolkit installed, including the driver by performing a custom install. - NVIDIA CUDA 2.0 toolkit installed, including the driver by performing a custom install.
The following assumes it is installed into "/usr/local/cuda". The following assumes it is installed into "/usr/local/cuda".
- NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into "/Developer/CUDA". - NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into "/Developer/CUDA".
@ -182,7 +182,7 @@ Building:
- XPSP2 or later - XPSP2 or later
- Visual C++ Express 2005 installed - Visual C++ Express 2005 installed
- Visual C++ Express 2008 installed - Visual C++ Express 2008 installed
- TBB 2.1 installed - TBB 2.1 or later installed
- NVIDIA CUDA 2.0 toolkit installed. The following assumes it is installed into "C:\CUDA". - NVIDIA CUDA 2.0 toolkit installed. The following assumes it is installed into "C:\CUDA".
- NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into - NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into
"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK" . "C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK" .
@ -227,39 +227,32 @@ Building:
*** Just to repeat, the NVIDIA CUDA version should be considered experimental. *** *** Just to repeat, the NVIDIA CUDA version should be considered experimental. ***
--- Installing the pre-built Windows (32-bit) version --- --- Installing the pre-built Windows version (32-bit or 64-bit) ---
The Windows version is a 32-bit Windows build of the concurrent version of
par2cmdline 0.4. It is distributed as an executable (par2.exe) along
with the required Intel Threading Building Blocks 2.1 library (tbb.dll)
which comes from the tbb21_009oss_win.tar.gz distribution.
The par2.exe and tbb.dll files included in this distribution require The Windows version is distributed as an executable (par2.exe) which has
version 7.1 of the Microsoft C runtime libraries, which are probably built into it (i.e., statically linked) the Intel Threading Building Blocks
already on your PC if it is running Windows 2000, Windows XP or 2.2 library, built from the tbb22_20090809oss_src.tar.gz distribution. The
Windows Vista. The Microsoft C runtime libraries are named MSVCP71.DLL Windows version no longer requires a specific version of the C runtime
and MSVCR71.DLL and are most likely to be in the C:\Windows\system32 library because the par2.exe executable is now built by statically linking
folder. with the C runtime library.
To install, place the par2.exe and tbb.dll files in a folder and To install, copy the par2.exe file and then invoke it from the command line.
invoke them from the command line.
To uninstall, delete the par2.exe and tbb.dll files along with any To uninstall, delete the par2.exe file along with any files from the
files from the distribution folder. distribution folder.
--- Installing the pre-built Mac OS X version --- --- Installing the pre-built Mac OS X version ---
The Mac version is a "fat" universal build of the concurrent version The Mac version is an universal build of the concurrent version
of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit
binaries). In other words, the par2 executable file contains both a 32-bit binaries). In other words, the par2 executable file contains both a 32-bit
x86/PowerPC and a 64-bit x86_64/PowerPC-64-bit build of the par2 sources. x86 and a 64-bit x86_64 build of the par2 sources.
It is distributed as an executable (par2) along with the required Intel It is distributed as an executable (par2) along with the required Intel
Threading Building Blocks 2.1 library (libtbb.dylib). The libtbb.dylib file Threading Building Blocks 2.2 library (libtbb.dylib). The libtbb.dylib file
is also "fat" universal (32-bit and 64-bit versions for x86/ppc/x86_64/ppc64 is also universal (32-bit and 64-bit versions for x86/x86_64 are inside it).
are contained inside it).
To install, place the par2 and libtbb.dylib files in a folder and To install, place the par2 and libtbb.dylib files in a folder and
invoke them from the command line. invoke them from the command line.
@ -274,14 +267,15 @@ files from the distribution folder.
The Linux versions are a 32-bit i386 and 64-bit x86_64 build of the The Linux versions are a 32-bit i386 and 64-bit x86_64 build of the
concurrent version of par2cmdline 0.4 for GNU/Linux kernel version 2.6 concurrent version of par2cmdline 0.4 for GNU/Linux kernel version 2.6
with GCC 4. It is distributed as an executable (par2) along with the with GCC 4. It is distributed as an executable (par2) along with the
required Intel Threading Building Blocks 2.1 library (libtbb.so). There required Intel Threading Building Blocks 2.2 library (libtbb.so and
are separate distributions for the 32-bit and 64-bit versions. libtbb.so.2). There are separate distributions for the 32-bit and
64-bit versions.
To install, place the par2 and libtbb.so files in a folder and To install, place the par2, libtbb.so and libtbb.so.2 files in a
invoke them from the command line. folder and invoke them from the command line.
To uninstall, delete the par2 and libtbb.so files along with any To uninstall, delete the par2, libtbb.so and libtbb.so.2 files along
files from the distribution folder. with any files from the distribution folder.
--- Installing the pre-built FreeBSD version --- --- Installing the pre-built FreeBSD version ---
@ -289,7 +283,7 @@ files from the distribution folder.
Both the 32-bit and 64-bit binaries were built using RELEASE 7.0 of FreeBSD. Both the 32-bit and 64-bit binaries were built using RELEASE 7.0 of FreeBSD.
It is distributed as an executable (par2) along with the required Intel It is distributed as an executable (par2) along with the required Intel
Threading Building Blocks 2.1 library (libtbb.so). There are separate Threading Building Blocks 2.2 library (libtbb.so). There are separate
distributions for the 32-bit and 64-bit versions. distributions for the 32-bit and 64-bit versions.
To install: copy libtbb.so to /usr/local/lib, copy par2 to a convenient To install: copy libtbb.so to /usr/local/lib, copy par2 to a convenient
@ -307,7 +301,7 @@ For UNIX or similar systems, the included configure script should be used to
generate a makefile which is then built with a Make utility. Before using generate a makefile which is then built with a Make utility. Before using
them however, you may need to modify the configure scripts as detailed below. them however, you may need to modify the configure scripts as detailed below.
Because this version depends on the Intel Threading Building Blocks 2.1 library, Because this version depends on the Intel Threading Building Blocks library,
you will need to tell the build system where the headers and libraries are in you will need to tell the build system where the headers and libraries are in
order to compile and link the program. There are 2 ways to do this: use the order to compile and link the program. There are 2 ways to do this: use the
tbbvars.sh script included in TBB to add the appropriate environment variables, tbbvars.sh script included in TBB to add the appropriate environment variables,
@ -317,11 +311,11 @@ Makefile:
In `Makefile.am', for Darwin/Mac OS X, change the AM_CXXFLAGS line to: In `Makefile.am', for Darwin/Mac OS X, change the AM_CXXFLAGS line to:
AM_CXXFLAGS = -Wall -I../tbb21_009oss/include -gfull -O3 -fvisibility=hidden -fvisibility-inlines-hidden AM_CXXFLAGS = -Wall -I../tbb22_20090809oss_src/include -gfull -O3 -fvisibility=hidden -fvisibility-inlines-hidden
or for other POSIX systems, change the AM_CXXFLAGS line to: or for other POSIX systems, change the AM_CXXFLAGS line to:
AM_CXXFLAGS = -Wall -I../tbb21_009oss/include AM_CXXFLAGS = -Wall -I../tbb22_20090809oss_src/include
and modify the path to wherever your extracted Intel TBB files are. Note that it and modify the path to wherever your extracted Intel TBB files are. Note that it
should point at the `include' directory inside the main tbb directory. should point at the `include' directory inside the main tbb directory.
@ -354,14 +348,13 @@ for the dynamic library (by passing the "-R $ORIGIN" option to the linker).
--- Building and installing on Mac OS X systems --- --- Building and installing on Mac OS X systems ---
The Mac version is a "fat" universal build of the concurrent version The Mac version is an universal build of the concurrent version
of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit
binaries). In other words, the par2 executable file contains both a 32-bit binaries). In other words, the par2 executable file contains both a 32-bit
x86/PowerPC and a 64-bit x86_64/PowerPC-64-bit build of the par2 sources. x86 and a 64-bit x86_64 build of the par2 sources.
It is distributed as an executable (par2) along with the required Intel It is distributed as an executable (par2) along with the required Intel
Threading Building Blocks 2.1 library (libtbb.dylib). The libtbb.dylib file Threading Building Blocks 2.2 library (libtbb.dylib). The libtbb.dylib file
is also "fat" universal (32-bit and 64-bit versions for x86/ppc/x86_64/ppc64 is also universal (32-bit and 64-bit versions for x86/x86_64 are inside it).
are contained inside it).
The par2 32-bit executable is built for 10.4, and the 64-bit executable is The par2 32-bit executable is built for 10.4, and the 64-bit executable is
built for 10.5, which are then symbol stripped and combined using the lipo built for 10.5, which are then symbol stripped and combined using the lipo
@ -372,8 +365,8 @@ par2 files when those files resided on a SMB server (ie, a shared folder on
a Windows computer). Combining the mixed-OS executables solves both of these a Windows computer). Combining the mixed-OS executables solves both of these
problems (see the 20080116 version release notes below for details). problems (see the 20080116 version release notes below for details).
The libtbb.dylib file is built from the TBB 2.1 tbb21_009oss_src.tar.gz The libtbb.dylib file is built from the TBB 2.2 tbb22_20090809oss_src.tar.gz
distribution. It was built for the x86, ppc, x86_64 and ppc64 architectures distribution. It was built for the x86 and x86_64 architectures
and will therefore run on all Macs that support 10.4 or 10.5. and will therefore run on all Macs that support 10.4 or 10.5.
Normally, the libtbb.dylib file is built so that for a client program to use Normally, the libtbb.dylib file is built so that for a client program to use
@ -383,8 +376,31 @@ version included in this distribution does not require that it be installed,
and is therefore usable "out of the box". To implement this change, the and is therefore usable "out of the box". To implement this change, the
macos.gcc.inc file was modified with this line: macos.gcc.inc file was modified with this line:
LIB_LINK_FLAGS = -dynamiclib -Wl,-exported_symbols_list,$(TBB.DEF) -Wl,-install_name,@executable_path/$@ LIB_LINK_FLAGS = -dynamiclib -Wl,-install_name,@executable_path/$@
Other required changes are:
ifeq (intel64,$(arch))
CPLUS_FLAGS += -m64 -arch x86_64 -mmacosx-version-min=10.5
LINK_FLAGS += -m64 -arch x86_64 -mmacosx-version-min=10.5
LIB_LINK_FLAGS += -m64 -arch x86_64 -mmacosx-version-min=10.5
endif
ifeq (ia32,$(arch))
CPLUS = g++-4.0
C_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386
CPLUS_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386
LINK_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386
LIB_LINK_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386
endif
To build the executables, configure needs to be invoked in a particular manner for both x86 and x64 builds:
cd <par2_tbb_root>/build
../configure --build=i686-apple-darwin10.2.0 --host=i686-apple-darwin10.2.0 CXX=g++-4.0 && sed -e 's/CXXFLAGS = -g -O2/CXXFLAGS = #-g -O2/' Makefile > Makefile.tmp && mv Makefile.tmp Makefile && make && strip par2 && mv par2 par2-x86 && make clean
../configure --build=i686-apple-darwin10.2.0 --host=x86_64-apple-darwin10.2.0 && sed -e 's/CXXFLAGS = -g -O2/CXXFLAGS = #-g -O2/' Makefile > Makefile.tmp && mv Makefile.tmp Makefile && make && strip par2 && mv par2 par2-x86_64 && make clean
The par2 executable has been symbol stripped (using the 'strip' command line The par2 executable has been symbol stripped (using the 'strip' command line
tool). tool).
@ -394,47 +410,34 @@ tool).
This modified version has been built and tested on Windows XP SP2 using Visual This modified version has been built and tested on Windows XP SP2 using Visual
C++ Express 2008. Studio/C++ 2010 beta 2. It statically links with both the TBB and the C runtime
library and the included project and makefiles are set up for that.
For Windows, the project file for Visual Studio 2008 has been included. Open For Windows, the project file for Visual Studio 2010 has been included. Open
the project file in Visual Studio and go to the project properties window. the project file in Visual Studio and go to the project properties window.
For the C/C++ include paths, make sure the path to where you extracted the For the C/C++ include paths, make sure the path to where you extracted the
Intel TBB files is correct. Similarly for the linker paths. Intel TBB files is correct. Similarly for the linker paths.
To run the built binary, make sure the Intel TBB dynamic link library is in To build the 32-bit version, download the source tarball from the website and
the library path - typically the tbb.dll file will be placed in either open the sln/vcproj project files in the win32 directory with Visual C++ 2010.
%WINDIR%\System32 or in the directory that the par2.exe file is in. You will also need to build the TBB in a modified manner so that it statically
links against the C runtime library and it itself is linked as a static library,
The Windows distribution of this project is built with Visual C++ 2008 Express instead of as a DLL. To do this, use the modified TBB makefiles in the
Edition but the executable is linked against the Visual Studio .NET 2003's C windows-tbb directory. To use the TBB makefile, you'll need to use GNU make,
runtime library to avoid having to distribute the Visual C++ 2008's C runtime which can be built from its source tarsal.
library.
To build the 64-bit version, install the "Windows 2003 Server R2" version
To build this version, download the source tarball from the website and use the
included vcproj with Visual C++ Express 2008. You will need to ensure that
the include and library paths that point to the PSDK are *above* the ones
that point to Visual C++'s folders so that the Microsoft C Runtime that is
used to build the program are from the older version 7.1 library and not
the version 9.0 library that comes with Visual C++ Express 2008.
In order to get things to link, the project has been modified according to
the instructions in the "Using VS2005 to ship legacy code for XP and
Windows 2000.html" file which is located in the "Using VS2005 to ship
legacy code for XP and Windows 2000" folder. You will also need to copy
the CxxFrameHandler3_to_CxxFrameHandler.obj file to your
par2cmdline-0.4-tbb-<version> folder.
To build the 64-bit executable, install the "Windows 2003 Server R2" version
of the platform SDK and open a command line window for a 64-bit Windows XP of the platform SDK and open a command line window for a 64-bit Windows XP
build environment (in the Platform SDK program group in the Start Menu). build environment (in the Platform SDK program group in the Start Menu). You
can also use any non-Express version of Visual C++.
Change the directory to the par2cmdline-0.4-tbb-<version> directory. Move or Change the directory to the par2cmdline-0.4-tbb-<version> directory. Move or
copy the Makefile in the win64-prebuilt directory to its parent (ie, to the copy the Makefile in the win64 directory to its parent (ie, to the
par2cmdline-0.4-tbb-<version> directory). Then invoke the 'nmake' command to par2cmdline-0.4-tbb-<version> directory). Then invoke the 'nmake' command to
build the binary. The result should be an executable file named build the binary. The result should be an executable file named
par2_win64.exe in the par2cmdline-0.4-tbb-<version> directory. This can par2_win64.exe in the par2cmdline-0.4-tbb-<version> directory. This can
then be renamed to par2.exe if so desired. You should link the executable then be renamed to par2.exe if so desired. As for the 32-bit version, you
with the tbb20_20080408oss release of the TBB because the 2.1 releases don't will need to build the TBB in a modified manner. More details are in the
support the VC7.1 runtime libraries. win64 Makefile.
@ -556,6 +559,20 @@ enough memory to not be I/O bound when creating or repairing parity/data files.
--- Version History --- --- Version History ---
The changes in the 20100203 version are:
- modified Makefile.am to use "ARCH_SCALAR" instead of "ARCH" to avoid a FreeBSD name clash
- fixed a 64-bit-only bug in reedsolomon-x86_64-mmx.s where a size of 8 bytes caused a segfault
(forgot to test for zero like the reedsolomon-i686-mmx.s file does); this bug only manifests in
the 64-bit Mac, 64-bit Linux and 64-bit FreeBSD versions; reproduced by creating/repairing a
file of exactly 16384 bytes
- updated to Intel TBB 2.2 (tbb22_20090809oss)
- the Mac build no longer includes the PowerPC variants (I don't use a PowerPC Mac anymore)
- the 32-bit and 64-bit Windows builds of both par2 and the TBB library are now statically
linked against the C runtime library to avoid the problem of requiring the installation of
the correct CRT library (DLL). As well, par2 is statically linked against the TBB library
to allow just one executable file to be installed (i.e., just par2.exe).
The changes in the 20090203 version are: The changes in the 20090203 version are:
- fixed a bug which affected the Linux and Mac versions whereby repairs would fail if - fixed a bug which affected the Linux and Mac versions whereby repairs would fail if
@ -889,12 +906,12 @@ The changes in the 20070831 version are:
Vincent Tan. Vincent Tan.
February 03, 2009. February 03, 2010.
// //
// Modifications for concurrent processing, Unicode support, and hierarchial // Modifications for concurrent processing, Unicode support, and hierarchial
// directory support are Copyright (c) 2007-2008 Vincent Tan. // directory support are Copyright (c) 2007-2010 Vincent Tan.
// Search for "#if WANT_CONCURRENT" for concurrent code. // Search for "#if WANT_CONCURRENT" for concurrent code.
// Concurrent processing utilises Intel Thread Building Blocks 2.0, // Concurrent processing utilises Intel Thread Building Blocks 2.2,
// Copyright (c) 2007 Intel Corp. // Copyright (c) 2007-2009 Intel Corp.
// //

BIN
main/win/par2/msvcr71.dll

Binary file not shown.

BIN
main/win/par2/par2.exe

Binary file not shown.

BIN
main/win/par2/src/par2cmdline-0.4-tbb-20080420.tar.gz

Binary file not shown.

BIN
main/win/par2/tbb.dll

Binary file not shown.

BIN
main/win/par2/tbbmalloc.dll

Binary file not shown.

0
main/win/par2/x64/COPYING

175
main/win/par2/x64/README_FIRST.txt

@ -36,14 +36,14 @@ http://sourceforge.net/projects/parchive
This version has been modified to utilise the Intel Threading Building Blocks This version has been modified to utilise the Intel Threading Building Blocks
2.1 library, which enables it to process files concurrently instead of the library, which enables it to process files concurrently instead of the
original version's serial processing. Computers with more than one CPU or core original version's serial processing. Computers with more than one CPU or core
such as those using Intel Core Duo, Intel Core Duo 2, or AMD Athlon X2 CPUs such as those using Intel Core Duo, Intel Core Duo 2, or AMD Athlon X2 CPUs
can now create or repair par2 archives much quicker than the original version. can now create or repair par2 archives much quicker than the original version.
For example, dual core machines can achieve near-double performance when For example, dual core machines can achieve near-double performance when
creating or repairing. creating or repairing.
The Intel Threading Building Blocks 2.1 library is obtained from: The Intel Threading Building Blocks library is obtained from:
http://osstbb.intel.com/ http://osstbb.intel.com/
@ -172,8 +172,8 @@ Building:
Mac OS X: Mac OS X:
- 10.5.2 or later - 10.5.2 or later
- Xcode 3.0 or 3.1 installed - Xcode 3.0 or later installed
- TBB 2.1 installed - TBB 2.1 or later installed
- NVIDIA CUDA 2.0 toolkit installed, including the driver by performing a custom install. - NVIDIA CUDA 2.0 toolkit installed, including the driver by performing a custom install.
The following assumes it is installed into "/usr/local/cuda". The following assumes it is installed into "/usr/local/cuda".
- NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into "/Developer/CUDA". - NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into "/Developer/CUDA".
@ -182,7 +182,7 @@ Building:
- XPSP2 or later - XPSP2 or later
- Visual C++ Express 2005 installed - Visual C++ Express 2005 installed
- Visual C++ Express 2008 installed - Visual C++ Express 2008 installed
- TBB 2.1 installed - TBB 2.1 or later installed
- NVIDIA CUDA 2.0 toolkit installed. The following assumes it is installed into "C:\CUDA". - NVIDIA CUDA 2.0 toolkit installed. The following assumes it is installed into "C:\CUDA".
- NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into - NVIDIA CUDA 2.0 SDK installed. The following assumes it is installed into
"C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK" . "C:\Program Files\NVIDIA Corporation\NVIDIA CUDA SDK" .
@ -227,39 +227,32 @@ Building:
*** Just to repeat, the NVIDIA CUDA version should be considered experimental. *** *** Just to repeat, the NVIDIA CUDA version should be considered experimental. ***
--- Installing the pre-built Windows (32-bit) version --- --- Installing the pre-built Windows version (32-bit or 64-bit) ---
The Windows version is a 32-bit Windows build of the concurrent version of
par2cmdline 0.4. It is distributed as an executable (par2.exe) along
with the required Intel Threading Building Blocks 2.1 library (tbb.dll)
which comes from the tbb21_009oss_win.tar.gz distribution.
The par2.exe and tbb.dll files included in this distribution require The Windows version is distributed as an executable (par2.exe) which has
version 7.1 of the Microsoft C runtime libraries, which are probably built into it (i.e., statically linked) the Intel Threading Building Blocks
already on your PC if it is running Windows 2000, Windows XP or 2.2 library, built from the tbb22_20090809oss_src.tar.gz distribution. The
Windows Vista. The Microsoft C runtime libraries are named MSVCP71.DLL Windows version no longer requires a specific version of the C runtime
and MSVCR71.DLL and are most likely to be in the C:\Windows\system32 library because the par2.exe executable is now built by statically linking
folder. with the C runtime library.
To install, place the par2.exe and tbb.dll files in a folder and To install, copy the par2.exe file and then invoke it from the command line.
invoke them from the command line.
To uninstall, delete the par2.exe and tbb.dll files along with any To uninstall, delete the par2.exe file along with any files from the
files from the distribution folder. distribution folder.
--- Installing the pre-built Mac OS X version --- --- Installing the pre-built Mac OS X version ---
The Mac version is a "fat" universal build of the concurrent version The Mac version is an universal build of the concurrent version
of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit
binaries). In other words, the par2 executable file contains both a 32-bit binaries). In other words, the par2 executable file contains both a 32-bit
x86/PowerPC and a 64-bit x86_64/PowerPC-64-bit build of the par2 sources. x86 and a 64-bit x86_64 build of the par2 sources.
It is distributed as an executable (par2) along with the required Intel It is distributed as an executable (par2) along with the required Intel
Threading Building Blocks 2.1 library (libtbb.dylib). The libtbb.dylib file Threading Building Blocks 2.2 library (libtbb.dylib). The libtbb.dylib file
is also "fat" universal (32-bit and 64-bit versions for x86/ppc/x86_64/ppc64 is also universal (32-bit and 64-bit versions for x86/x86_64 are inside it).
are contained inside it).
To install, place the par2 and libtbb.dylib files in a folder and To install, place the par2 and libtbb.dylib files in a folder and
invoke them from the command line. invoke them from the command line.
@ -274,14 +267,15 @@ files from the distribution folder.
The Linux versions are a 32-bit i386 and 64-bit x86_64 build of the The Linux versions are a 32-bit i386 and 64-bit x86_64 build of the
concurrent version of par2cmdline 0.4 for GNU/Linux kernel version 2.6 concurrent version of par2cmdline 0.4 for GNU/Linux kernel version 2.6
with GCC 4. It is distributed as an executable (par2) along with the with GCC 4. It is distributed as an executable (par2) along with the
required Intel Threading Building Blocks 2.1 library (libtbb.so). There required Intel Threading Building Blocks 2.2 library (libtbb.so and
are separate distributions for the 32-bit and 64-bit versions. libtbb.so.2). There are separate distributions for the 32-bit and
64-bit versions.
To install, place the par2 and libtbb.so files in a folder and To install, place the par2, libtbb.so and libtbb.so.2 files in a
invoke them from the command line. folder and invoke them from the command line.
To uninstall, delete the par2 and libtbb.so files along with any To uninstall, delete the par2, libtbb.so and libtbb.so.2 files along
files from the distribution folder. with any files from the distribution folder.
--- Installing the pre-built FreeBSD version --- --- Installing the pre-built FreeBSD version ---
@ -289,7 +283,7 @@ files from the distribution folder.
Both the 32-bit and 64-bit binaries were built using RELEASE 7.0 of FreeBSD. Both the 32-bit and 64-bit binaries were built using RELEASE 7.0 of FreeBSD.
It is distributed as an executable (par2) along with the required Intel It is distributed as an executable (par2) along with the required Intel
Threading Building Blocks 2.1 library (libtbb.so). There are separate Threading Building Blocks 2.2 library (libtbb.so). There are separate
distributions for the 32-bit and 64-bit versions. distributions for the 32-bit and 64-bit versions.
To install: copy libtbb.so to /usr/local/lib, copy par2 to a convenient To install: copy libtbb.so to /usr/local/lib, copy par2 to a convenient
@ -307,7 +301,7 @@ For UNIX or similar systems, the included configure script should be used to
generate a makefile which is then built with a Make utility. Before using generate a makefile which is then built with a Make utility. Before using
them however, you may need to modify the configure scripts as detailed below. them however, you may need to modify the configure scripts as detailed below.
Because this version depends on the Intel Threading Building Blocks 2.1 library, Because this version depends on the Intel Threading Building Blocks library,
you will need to tell the build system where the headers and libraries are in you will need to tell the build system where the headers and libraries are in
order to compile and link the program. There are 2 ways to do this: use the order to compile and link the program. There are 2 ways to do this: use the
tbbvars.sh script included in TBB to add the appropriate environment variables, tbbvars.sh script included in TBB to add the appropriate environment variables,
@ -317,11 +311,11 @@ Makefile:
In `Makefile.am', for Darwin/Mac OS X, change the AM_CXXFLAGS line to: In `Makefile.am', for Darwin/Mac OS X, change the AM_CXXFLAGS line to:
AM_CXXFLAGS = -Wall -I../tbb21_009oss/include -gfull -O3 -fvisibility=hidden -fvisibility-inlines-hidden AM_CXXFLAGS = -Wall -I../tbb22_20090809oss_src/include -gfull -O3 -fvisibility=hidden -fvisibility-inlines-hidden
or for other POSIX systems, change the AM_CXXFLAGS line to: or for other POSIX systems, change the AM_CXXFLAGS line to:
AM_CXXFLAGS = -Wall -I../tbb21_009oss/include AM_CXXFLAGS = -Wall -I../tbb22_20090809oss_src/include
and modify the path to wherever your extracted Intel TBB files are. Note that it and modify the path to wherever your extracted Intel TBB files are. Note that it
should point at the `include' directory inside the main tbb directory. should point at the `include' directory inside the main tbb directory.
@ -354,14 +348,13 @@ for the dynamic library (by passing the "-R $ORIGIN" option to the linker).
--- Building and installing on Mac OS X systems --- --- Building and installing on Mac OS X systems ---
The Mac version is a "fat" universal build of the concurrent version The Mac version is an universal build of the concurrent version
of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit of par2cmdline 0.4 for Mac OS X 10.4 (32-bit binaries) and 10.5 (64-bit
binaries). In other words, the par2 executable file contains both a 32-bit binaries). In other words, the par2 executable file contains both a 32-bit
x86/PowerPC and a 64-bit x86_64/PowerPC-64-bit build of the par2 sources. x86 and a 64-bit x86_64 build of the par2 sources.
It is distributed as an executable (par2) along with the required Intel It is distributed as an executable (par2) along with the required Intel
Threading Building Blocks 2.1 library (libtbb.dylib). The libtbb.dylib file Threading Building Blocks 2.2 library (libtbb.dylib). The libtbb.dylib file
is also "fat" universal (32-bit and 64-bit versions for x86/ppc/x86_64/ppc64 is also universal (32-bit and 64-bit versions for x86/x86_64 are inside it).
are contained inside it).
The par2 32-bit executable is built for 10.4, and the 64-bit executable is The par2 32-bit executable is built for 10.4, and the 64-bit executable is
built for 10.5, which are then symbol stripped and combined using the lipo built for 10.5, which are then symbol stripped and combined using the lipo
@ -372,8 +365,8 @@ par2 files when those files resided on a SMB server (ie, a shared folder on
a Windows computer). Combining the mixed-OS executables solves both of these a Windows computer). Combining the mixed-OS executables solves both of these
problems (see the 20080116 version release notes below for details). problems (see the 20080116 version release notes below for details).
The libtbb.dylib file is built from the TBB 2.1 tbb21_009oss_src.tar.gz The libtbb.dylib file is built from the TBB 2.2 tbb22_20090809oss_src.tar.gz
distribution. It was built for the x86, ppc, x86_64 and ppc64 architectures distribution. It was built for the x86 and x86_64 architectures
and will therefore run on all Macs that support 10.4 or 10.5. and will therefore run on all Macs that support 10.4 or 10.5.
Normally, the libtbb.dylib file is built so that for a client program to use Normally, the libtbb.dylib file is built so that for a client program to use
@ -383,8 +376,31 @@ version included in this distribution does not require that it be installed,
and is therefore usable "out of the box". To implement this change, the and is therefore usable "out of the box". To implement this change, the
macos.gcc.inc file was modified with this line: macos.gcc.inc file was modified with this line:
LIB_LINK_FLAGS = -dynamiclib -Wl,-exported_symbols_list,$(TBB.DEF) -Wl,-install_name,@executable_path/$@ LIB_LINK_FLAGS = -dynamiclib -Wl,-install_name,@executable_path/$@
Other required changes are:
ifeq (intel64,$(arch))
CPLUS_FLAGS += -m64 -arch x86_64 -mmacosx-version-min=10.5
LINK_FLAGS += -m64 -arch x86_64 -mmacosx-version-min=10.5
LIB_LINK_FLAGS += -m64 -arch x86_64 -mmacosx-version-min=10.5
endif
ifeq (ia32,$(arch))
CPLUS = g++-4.0
C_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386
CPLUS_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386
LINK_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386
LIB_LINK_FLAGS += -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch i386
endif
To build the executables, configure needs to be invoked in a particular manner for both x86 and x64 builds:
cd <par2_tbb_root>/build
../configure --build=i686-apple-darwin10.2.0 --host=i686-apple-darwin10.2.0 CXX=g++-4.0 && sed -e 's/CXXFLAGS = -g -O2/CXXFLAGS = #-g -O2/' Makefile > Makefile.tmp && mv Makefile.tmp Makefile && make && strip par2 && mv par2 par2-x86 && make clean
../configure --build=i686-apple-darwin10.2.0 --host=x86_64-apple-darwin10.2.0 && sed -e 's/CXXFLAGS = -g -O2/CXXFLAGS = #-g -O2/' Makefile > Makefile.tmp && mv Makefile.tmp Makefile && make && strip par2 && mv par2 par2-x86_64 && make clean
The par2 executable has been symbol stripped (using the 'strip' command line The par2 executable has been symbol stripped (using the 'strip' command line
tool). tool).
@ -394,47 +410,34 @@ tool).
This modified version has been built and tested on Windows XP SP2 using Visual This modified version has been built and tested on Windows XP SP2 using Visual
C++ Express 2008. Studio/C++ 2010 beta 2. It statically links with both the TBB and the C runtime
library and the included project and makefiles are set up for that.
For Windows, the project file for Visual Studio 2008 has been included. Open For Windows, the project file for Visual Studio 2010 has been included. Open
the project file in Visual Studio and go to the project properties window. the project file in Visual Studio and go to the project properties window.
For the C/C++ include paths, make sure the path to where you extracted the For the C/C++ include paths, make sure the path to where you extracted the
Intel TBB files is correct. Similarly for the linker paths. Intel TBB files is correct. Similarly for the linker paths.
To run the built binary, make sure the Intel TBB dynamic link library is in To build the 32-bit version, download the source tarball from the website and
the library path - typically the tbb.dll file will be placed in either open the sln/vcproj project files in the win32 directory with Visual C++ 2010.
%WINDIR%\System32 or in the directory that the par2.exe file is in. You will also need to build the TBB in a modified manner so that it statically
links against the C runtime library and it itself is linked as a static library,
The Windows distribution of this project is built with Visual C++ 2008 Express instead of as a DLL. To do this, use the modified TBB makefiles in the
Edition but the executable is linked against the Visual Studio .NET 2003's C windows-tbb directory. To use the TBB makefile, you'll need to use GNU make,
runtime library to avoid having to distribute the Visual C++ 2008's C runtime which can be built from its source tarsal.
library.
To build the 64-bit version, install the "Windows 2003 Server R2" version
To build this version, download the source tarball from the website and use the
included vcproj with Visual C++ Express 2008. You will need to ensure that
the include and library paths that point to the PSDK are *above* the ones
that point to Visual C++'s folders so that the Microsoft C Runtime that is
used to build the program are from the older version 7.1 library and not
the version 9.0 library that comes with Visual C++ Express 2008.
In order to get things to link, the project has been modified according to
the instructions in the "Using VS2005 to ship legacy code for XP and
Windows 2000.html" file which is located in the "Using VS2005 to ship
legacy code for XP and Windows 2000" folder. You will also need to copy
the CxxFrameHandler3_to_CxxFrameHandler.obj file to your
par2cmdline-0.4-tbb-<version> folder.
To build the 64-bit executable, install the "Windows 2003 Server R2" version
of the platform SDK and open a command line window for a 64-bit Windows XP of the platform SDK and open a command line window for a 64-bit Windows XP
build environment (in the Platform SDK program group in the Start Menu). build environment (in the Platform SDK program group in the Start Menu). You
can also use any non-Express version of Visual C++.
Change the directory to the par2cmdline-0.4-tbb-<version> directory. Move or Change the directory to the par2cmdline-0.4-tbb-<version> directory. Move or
copy the Makefile in the win64-prebuilt directory to its parent (ie, to the copy the Makefile in the win64 directory to its parent (ie, to the
par2cmdline-0.4-tbb-<version> directory). Then invoke the 'nmake' command to par2cmdline-0.4-tbb-<version> directory). Then invoke the 'nmake' command to
build the binary. The result should be an executable file named build the binary. The result should be an executable file named
par2_win64.exe in the par2cmdline-0.4-tbb-<version> directory. This can par2_win64.exe in the par2cmdline-0.4-tbb-<version> directory. This can
then be renamed to par2.exe if so desired. You should link the executable then be renamed to par2.exe if so desired. As for the 32-bit version, you
with the tbb20_20080408oss release of the TBB because the 2.1 releases don't will need to build the TBB in a modified manner. More details are in the
support the VC7.1 runtime libraries. win64 Makefile.
@ -556,6 +559,20 @@ enough memory to not be I/O bound when creating or repairing parity/data files.
--- Version History --- --- Version History ---
The changes in the 20100203 version are:
- modified Makefile.am to use "ARCH_SCALAR" instead of "ARCH" to avoid a FreeBSD name clash
- fixed a 64-bit-only bug in reedsolomon-x86_64-mmx.s where a size of 8 bytes caused a segfault
(forgot to test for zero like the reedsolomon-i686-mmx.s file does); this bug only manifests in
the 64-bit Mac, 64-bit Linux and 64-bit FreeBSD versions; reproduced by creating/repairing a
file of exactly 16384 bytes
- updated to Intel TBB 2.2 (tbb22_20090809oss)
- the Mac build no longer includes the PowerPC variants (I don't use a PowerPC Mac anymore)
- the 32-bit and 64-bit Windows builds of both par2 and the TBB library are now statically
linked against the C runtime library to avoid the problem of requiring the installation of
the correct CRT library (DLL). As well, par2 is statically linked against the TBB library
to allow just one executable file to be installed (i.e., just par2.exe).
The changes in the 20090203 version are: The changes in the 20090203 version are:
- fixed a bug which affected the Linux and Mac versions whereby repairs would fail if - fixed a bug which affected the Linux and Mac versions whereby repairs would fail if
@ -889,12 +906,12 @@ The changes in the 20070831 version are:
Vincent Tan. Vincent Tan.
February 03, 2009. February 03, 2010.
// //
// Modifications for concurrent processing, Unicode support, and hierarchial // Modifications for concurrent processing, Unicode support, and hierarchial
// directory support are Copyright (c) 2007-2008 Vincent Tan. // directory support are Copyright (c) 2007-2010 Vincent Tan.
// Search for "#if WANT_CONCURRENT" for concurrent code. // Search for "#if WANT_CONCURRENT" for concurrent code.
// Concurrent processing utilises Intel Thread Building Blocks 2.0, // Concurrent processing utilises Intel Thread Building Blocks 2.2,
// Copyright (c) 2007 Intel Corp. // Copyright (c) 2007-2009 Intel Corp.
// //

BIN
main/win/par2/x64/par2.exe

Binary file not shown.

BIN
main/win/par2/x64/tbb.dll

Binary file not shown.

BIN
main/win/par2/x64/tbbmalloc.dll

Binary file not shown.
Loading…
Cancel
Save