rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [rdiff-backup-users] Installed rdiff-backup on Windows using MinGW


From: Josh Nisly
Subject: Re: [rdiff-backup-users] Installed rdiff-backup on Windows using MinGW
Date: Tue, 08 Jul 2008 12:53:26 -0500
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

A cleaner approach, IMO, is to use py2exe to build a native Windows executable. This simply involves importing py2exe in setup.py and giving it the correct options.

This approach does not require python to be installed on the computer, and allows building a "single file executable", i.e a single executable without any dll dependencies.

I've attached the patch I've been using to do this. After applying, simply run "setup.py py2exe --single-file".

Thanks,
JoshN

Mico Siahaan wrote:
Hi Curtis,

the installer will make batch script under Scripts directory of your python 
installation. For example in my laptop it will create: rdiff-backup.bat in 
D:\python2.5\Scripts. Then, I add the path to PATH environment variables. So I 
can run in from command line: 'rdiff-backup MyFiles MyFilesBackup'.

Can somebody help me how to fix the batch file so it will automatically detect 
the correct path when installed?

regards,

Mico

--- On Mon, 7/7/08, Curtis Osterhoudt <address@hidden> wrote:
From: Curtis Osterhoudt <address@hidden>
Subject: Re: [rdiff-backup-users] Installed rdiff-backup on Windows using MinGW
To: address@hidden
Cc: "Dave Kempe" <address@hidden>
Date: Monday, July 7, 2008, 2:35 AM

On Saturday 05 July 2008 22:10:49 Dave Kempe wrote:
Mico Siahaan wrote:
Hi Andrew,

thanks, the current CVS version seems work well. I succeeded made
Windows distribution for CVS version of rdiff-backup. It made for
python 2.5. I also added some simple batch scripts into it.
Anyone
Hi,
this seems to work pretty well in the basic tests I have done so far.
You can download it from here:

http://solutionsfirst.com.au/~dave/backup/rdiff-backup-1.1.17-cvs.win32-py2
.5.exe

You may need to modify the rdiff-backup.bat in the scripts directory to
get the paths right (its set to d: in the installer).
You need python2.5 installed for windows, which you can get from here:
http://www.python.org/ftp/python/2.5.2/python-2.5.2.msi

thanks Mico, its seems to work well.

Dave




_______________________________________________
rdiff-backup-users mailing list at address@hidden
http://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL:
http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

Howdy, all,
   I've used rdiff-backup for a couple of years on linux, and absolutely
love it. I'd also like to use it on Windows eventually, either via Cygwin or the

recent executables I've seen mentioned in the list. However, I can't figure out how to get it to run properly. For example, I've downloaded and installed the executable mentioned above (and have Python2.5 installed), but somehow can't figure out how to run it once it's installed. "python rdiff-backup.py" (or the analogous command; I'm not at my Windows machine now) -- or, from within a python shell, "run rdiff-backup.py" -- seems to do *something* very quickly, without throwing

errors, but I can't tell what's happening. Can anyone point me to some
quick instructions on how to get it to run once it's installed? I'm comfortable with editing configuration files if that's what it's going to take. Very best wishes, Curtis O.

--- dist/setup.py       8 Apr 2008 15:46:02 -0000       1.11
+++ dist/setup.py       12 Apr 2008 19:15:04 -0000
@@ -13,6 +13,7 @@
 lflags_arg = []
 libname = ['rsync']
 incdir_list = libdir_list = None
+extra_options = {}
 
 if os.name == 'posix' or os.name == 'nt':
        LIBRSYNC_DIR = os.environ.get('LIBRSYNC_DIR', '')
@@ -40,6 +41,21 @@
                        libdir_list = [os.path.join(LIBRSYNC_DIR, 'lib')]
                if '-lrsync' in LIBS:
                        libname = []
+if os.name == 'nt':
+       try:
+               import py2exe
+       except ImportError:
+               pass
+       else:
+               extra_options = {
+                       'console': ['rdiff-backup'],
+               }
+               if '--single-file' in sys.argv[1:]:
+                       sys.argv.remove('--single-file')
+                       extra_options.update({
+                               'options': {'py2exe': {'bundle_files': 1}},
+                               'zipfile': None
+                       })
 
 setup(name="rdiff-backup",
          version=version_string,
@@ -59,5 +75,6 @@
          data_files = [('share/man/man1', ['rdiff-backup.1',
                                                                                
'rdiff-backup-statistics.1']),
                                        ('share/doc/rdiff-backup-%s' % 
(version_string,),
-                                        ['CHANGELOG', 'COPYING', 'README', 
'FAQ.html'])])
+                                        ['CHANGELOG', 'COPYING', 'README', 
'FAQ.html'])],
+         **extra_options)
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]