init commit that compiles
Commit the original Caesium 1.7.0 codebase with some adjustment. You can also get the original source at: https://sourceforge.net/projects/caesium/files/1.7.0/ Since the file names listed in the Qt resource file have encoding issue which can cause compile failure, these files get removed. Adjustments: + .gitignore M icons.qrc - *.pro.user(.*) - icons/language/*.png
This commit is contained in:
		
							
								
								
									
										1494
									
								
								tools/caesium.ui
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1494
									
								
								tools/caesium.ui
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										42
									
								
								tools/exif_copy.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								tools/exif_copy.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,42 @@
 | 
			
		||||
# ******************************************************************************
 | 
			
		||||
#
 | 
			
		||||
# Copyright (C) 2010-2011 Matteo Paonessa <matteo.paonessa@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
# This file is part of the Caesium distribution.
 | 
			
		||||
#
 | 
			
		||||
# Caesium is free software; you can redistribute it and/or
 | 
			
		||||
# modify it under the terms of the GNU General Public License
 | 
			
		||||
# as published by the Free Software Foundation; either version 2
 | 
			
		||||
# of the License, or (at your option) any later version.
 | 
			
		||||
#
 | 
			
		||||
# Caesium is distributed in the hope that it will be useful,
 | 
			
		||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
#
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with Caesium; if not, write to the Free Software
 | 
			
		||||
# Foundation, Inc., 51 Franklin Street, 5th Floor, Boston, MA 02110-1301 USA.
 | 
			
		||||
#
 | 
			
		||||
# Author: Matteo Paonessa <matteo.paonessa@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
# ******************************************************************************
 | 
			
		||||
 | 
			
		||||
import pyexiv2
 | 
			
		||||
import sys
 | 
			
		||||
import win32_unicode_argv
 | 
			
		||||
 | 
			
		||||
source_image = pyexiv2.ImageMetadata(sys.argv[1])
 | 
			
		||||
source_image.read()
 | 
			
		||||
dest_image = pyexiv2.ImageMetadata(sys.argv[2])
 | 
			
		||||
dest_image.read()
 | 
			
		||||
 | 
			
		||||
for key in source_image.exif_keys:
 | 
			
		||||
    try:
 | 
			
		||||
        value = source_image[key].value
 | 
			
		||||
        dest_image[key] = value
 | 
			
		||||
    except:
 | 
			
		||||
        pass
 | 
			
		||||
 | 
			
		||||
dest_image.write()
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										4
									
								
								tools/setup.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								tools/setup.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
from distutils.core import setup
 | 
			
		||||
import py2exe
 | 
			
		||||
 | 
			
		||||
setup(console=['exif_copy.py'])
 | 
			
		||||
							
								
								
									
										46
									
								
								tools/win32_unicode_argv.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								tools/win32_unicode_argv.py
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,46 @@
 | 
			
		||||
"""
 | 
			
		||||
win32_unicode_argv.py
 | 
			
		||||
 | 
			
		||||
Importing this will replace sys.argv with a full Unicode form.
 | 
			
		||||
Windows only.
 | 
			
		||||
 | 
			
		||||
From this site, with adaptations:
 | 
			
		||||
      http://code.activestate.com/recipes/572200/
 | 
			
		||||
 | 
			
		||||
Usage: simply import this module into a script. sys.argv is changed to
 | 
			
		||||
be a list of Unicode strings.
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import sys
 | 
			
		||||
 | 
			
		||||
def win32_unicode_argv():
 | 
			
		||||
    """Uses shell32.GetCommandLineArgvW to get sys.argv as a list of Unicode
 | 
			
		||||
    strings.
 | 
			
		||||
 | 
			
		||||
    Versions 2.x of Python don't support Unicode in sys.argv on
 | 
			
		||||
    Windows, with the underlying Windows API instead replacing multi-byte
 | 
			
		||||
    characters with '?'.
 | 
			
		||||
    """
 | 
			
		||||
 | 
			
		||||
    from ctypes import POINTER, byref, cdll, c_int, windll
 | 
			
		||||
    from ctypes.wintypes import LPCWSTR, LPWSTR
 | 
			
		||||
 | 
			
		||||
    GetCommandLineW = cdll.kernel32.GetCommandLineW
 | 
			
		||||
    GetCommandLineW.argtypes = []
 | 
			
		||||
    GetCommandLineW.restype = LPCWSTR
 | 
			
		||||
 | 
			
		||||
    CommandLineToArgvW = windll.shell32.CommandLineToArgvW
 | 
			
		||||
    CommandLineToArgvW.argtypes = [LPCWSTR, POINTER(c_int)]
 | 
			
		||||
    CommandLineToArgvW.restype = POINTER(LPWSTR)
 | 
			
		||||
 | 
			
		||||
    cmd = GetCommandLineW()
 | 
			
		||||
    argc = c_int(0)
 | 
			
		||||
    argv = CommandLineToArgvW(cmd, byref(argc))
 | 
			
		||||
    if argc.value > 0:
 | 
			
		||||
        # Remove Python executable and commands if present
 | 
			
		||||
        start = argc.value - len(sys.argv)
 | 
			
		||||
        return [argv[i] for i in
 | 
			
		||||
                xrange(start, argc.value)]
 | 
			
		||||
 | 
			
		||||
sys.argv = win32_unicode_argv()
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								tools/win32_unicode_argv.pyc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								tools/win32_unicode_argv.pyc
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user