RetroShare/libretroshare/src
leander-256 b30056e17f This patch allows Windows users to share files and folders with "exotic" characters.
The problem was that libretroshare handles files in UTF-8 but Windows's ANSI/POSIX C functions automatically assume that the char* parameters are encoded with the system's code page. There is no way to set that code page as UTF-8. So now under Windows the code translates the file name to UTF-16 before feeding it to one of the Unicode functions (they are usually prefixed or suffixed by 'w'). Please note that it is not very efficient.

Furthermore, Windows does not provide a Unicode version of opendir/readdir/closedir, so it was necessary to use FindFirstFileW/FindNextFileW/FindClose which has a different behaviour as well as different structures. The FolderIterator class was created in order to mimic the Unix way of traversing folders contents. Hence the algorithm is unchanged and the systems differences masked.

As it was necessary to use some functions from the Windows API, <windows.h> had to be included in a few files were it didn't appear before, creating macros and #define conflicts. In order to solve them, util/rswin.h must be included first in a file (if necessary). Otherwise the preprocessor will fail on purpose to avoid the code being compiled with different _WIN32_WINNT values.

As another side-effect, rstlvutil.h and rstlvutil.cc have been removed from libretroshare.pro file. They are only used by testing units and include util/utest.h which defines a macro FAILED that already exists in <windows.h>. I don't know if unit tests are still in use and I don't plan on coding often on Windows, so I'll leave that as an exercise (hot potato?) to a motivated fellow Windows programmer.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2924 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-05-16 23:26:45 +00:00
..
dbase This patch allows Windows users to share files and folders with "exotic" characters. 2010-05-16 23:26:45 +00:00
dht Modified libretroshare to compile under MacOSX. 2010-02-16 22:25:58 +00:00
ft This patch allows Windows users to share files and folders with "exotic" characters. 2010-05-16 23:26:45 +00:00
pqi This patch allows Windows users to share files and folders with "exotic" characters. 2010-05-16 23:26:45 +00:00
rsiface added group icon support 2010-05-14 13:00:07 +00:00
rsserver New methods for calculating the count of peers and messages. It should be faster than getting all data in std::list. 2010-05-13 19:20:40 +00:00
scripts added for MSYS compile releated changes by default its disabled 2009-09-05 17:23:58 +00:00
serialiser added group icon support 2010-05-14 13:00:07 +00:00
services added group icon support 2010-05-14 13:00:07 +00:00
tcponudp This patch allows Windows users to share files and folders with "exotic" characters. 2010-05-16 23:26:45 +00:00
tests Fixed code to compile under windows. 2009-08-05 16:35:07 +00:00
turtle fixed win32 compilation pb 2010-03-13 12:24:14 +00:00
upnp suppressed uninitialized memory read 2010-04-23 13:13:36 +00:00
util This patch allows Windows users to share files and folders with "exotic" characters. 2010-05-16 23:26:45 +00:00
BUGS Created V0.3.x branch and moved the head into the trunk directory. 2007-11-15 03:18:48 +00:00
Doxyfile git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@935 b45a01b8-16f6-495d-af2f-9b41ad6348cc 2009-01-20 20:09:44 +00:00
libretroshare.pro This patch allows Windows users to share files and folders with "exotic" characters. 2010-05-16 23:26:45 +00:00
licence Created V0.3.x branch and moved the head into the trunk directory. 2007-11-15 03:18:48 +00:00
mingw32make.bat added bat script for compile libretroshare with MinGW Makefile 2009-02-27 02:06:33 +00:00
Readme.txt removed old instructions from readme 2010-03-04 11:27:34 +00:00
TODO git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@514 b45a01b8-16f6-495d-af2f-9b41ad6348cc 2008-04-24 07:03:31 +00:00
version_detail.sh add back the git part of the version script 2010-02-09 19:10:58 +00:00

=======================================================================================
README for RetroShare
=======================================================================================

RetroShare web site . . . . http://retroshare.sourceforge.net/
Documentation . . . . . . . http://retroshare.sourceforge.net/doc.html
Support . . . . . . . . . . http://retroshare.sourceforge.net/support.html
Forums  . . . . . . . . . . http://retroshare.sourceforge.net/forum/
Wiki  . . . . . . . . . . . http://retroshare.sourceforge.net/wiki/
The Developers site . . . . http://retroshare.sourceforge.net/developers.html
Project site  . . . . . . . https://sourceforge.net/projects/retroshare

Contact:  . . . . . . . . . retroshare@lunamutt.com ,defnax@users.sourceforge.net


Compiling + Running RetroShare (V0.5.xxx)
=========================================================================================
REQUIREMENTS
=========================================================================================

Libraries/Tools:
	* C/C++ Compiler. 	  	  (standard on Linux/cygwin)
	* Qt >= 4.5.x 		  	    http://qt.nokia.com/downloads/downloads#lgpl
	* OpenSSL       	      	http://www.openssl.org/source/openssl-0.9.8k.tar.gz
	* MiniUPnP           	  	http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.3.tar.gz
	* gpgme 		              ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.1.8.tar.bz2
	* libgpg-error          	ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.7.tar.bz2 

Windows only:
	* Cygwin  	          	  http://www.cygwin.com/cygwin/setup.exe (for openssl compile)
	* MinGW/Msys package  		http://sourceforge.net/projects/mingw/files/	 (for compile gpgme,libgpg-error)
	* Pthreads            		http://sourceware.org/pthreads-win32/ 
	* Zlib                		http://www.zlib.net/
	
	Latest RetroShare sources from (SVN) sourceforge.net:	
    	svn co https://retroshare.svn.sourceforge.net/svnroot/retroshare retroshare 

=========================================================================================

Build Scripts are avaible on SVN for Debian and Ubuntu:
http://retroshare.svn.sourceforge.net/viewvc/retroshare/trunk/build_scripts/

Latest stable OpenSSL is available at:
http://www.openssl.org

Latest miniupnpc-1.3 is avaible at:
http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.3.tar.gz

Latest gpgme Library is avaible at:
ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-1.1.8.tar.bz2

Latest libgpg-error Library is avaible at:
ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.7.tar.bz2

Windows only:
	pthreads: ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-8-0-release.tar.gz 
	zlib:	    http://www.zlib.net/zlib-1.2.3.tar.gz 
=========================================================================================
You can find here instrustions howto compile libretroshare and gui:
http://retroshare.sourceforge.net/wiki/index.php/Developers_Corner
	
=========================================================================================	
You can go on over to our forum when you have trouble with compiling:
http://retroshare.sourceforge.net/forum/
---------------------------------------------