OSDN Git Service

BuildScript: Cleanup, build and copy Unicode version of heksedit dll (hekseditU.dll).
authorKimmo Varis <kimmov@gmail.com>
Wed, 17 Dec 2008 23:28:46 +0000 (23:28 +0000)
committerKimmo Varis <kimmov@gmail.com>
Wed, 17 Dec 2008 23:28:46 +0000 (23:28 +0000)
Tools/Scripts/create_release.py

index 8893318..d5254bb 100644 (file)
@@ -42,6 +42,7 @@
 # - create installer to correct folder
 # - make installer compile less verbose
 # - make building exes and dlls also less verbose
+# - builds libraries twice: as independent project and from executable project (by prelink.bat)
 
 # Tools needed:
 # - Python 2.5 :)
@@ -135,8 +136,13 @@ def cleanup_build():
         if os.path.exists('build/scew'):
             shutil.rmtree('build/scew', True)
 
+        print 'Remove heksedit files'
         if os.path.exists('build/heksedit'):
             shutil.rmtree('build/heksedit', True)
+        if os.path.exists('build/mergerelease/heksedit.dll'):
+            os.remove('build/mergerelease/heksedit.dll')
+        if os.path.exists('build/mergerelease/hekseditU.dll'):
+            os.remove('build/mergerelease/hekseditU.dll')
 
         if os.path.exists('build/Manual'):
             shutil.rmtree('build/Manual',True)
@@ -238,6 +244,7 @@ def build_libraries():
     print 'Build heksedit library...'
     solution_path = os.path.join(cur_path, 'Externals/heksedit/heksedit.vcproj')
     call([vs_cmd, solution_path, '/rebuild', 'Release'], shell=True)
+    call([vs_cmd, solution_path, '/rebuild', 'UnicodeRelease'], shell=True)
 
 def build_targets():
     """Builds all WinMerge targets."""
@@ -336,6 +343,7 @@ def create_bin_folders(bin_folder, dist_src_folder):
     shutil.copy('build/pcre/pcre.dll', bin_folder)
     shutil.copy('build/expat/libexpat.dll', bin_folder)
     shutil.copy('build/heksedit/heksedit.dll', bin_folder)
+    shutil.copy('build/heksedit/hekseditU.dll', bin_folder)
 
     copy_po_files(lang_folder)
     filter_orig = os.path.join(dist_src_folder, 'Filters')