put build environment support tools in makelib
authorDiane Trout <diane@caltech.edu>
Fri, 7 Apr 2006 02:09:28 +0000 (02:09 +0000)
committerDiane Trout <diane@caltech.edu>
Fri, 7 Apr 2006 02:09:28 +0000 (02:09 +0000)
CMakeLists.txt
FindBoost.cmake [deleted file]
makelib/FindBoost.cmake [new file with mode: 0644]
makelib/osxdist.py [new file with mode: 0644]
makelib/wininst.iss [new file with mode: 0644]
osxdist.py [deleted file]
wininst.iss [deleted file]

index 529e66a0619836d5110401bbcaf4d1b655dc3463..3a1331561becc4b2399286232629b0232904ecc8 100644 (file)
@@ -2,7 +2,10 @@ PROJECT(mussa)
 
 ENABLE_TESTING()
 # try to include our cmake modules
-SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR})
+SET (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/makelib)
+
+# debug it!
+SET (CXX_FLAGS "-g")
 
 # all of our source files al relative to the root of our project
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
diff --git a/FindBoost.cmake b/FindBoost.cmake
deleted file mode 100644 (file)
index 5e71bc6..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-# - Find Boost libraries
-# Go hunting for boost compoments
-# Defines:
-#  BOOST_INCLUDE
-
-FIND_PATH(BOOST_INCLUDE_DIR weak_ptr.hpp /usr/include /usr/local/include )
-
-FIND_LIBRARY( BOOST_UNIT_TEST_LIB NAMES boost_unit_test_framework 
-              PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
-FIND_LIBRARY( BOOST_PROGRAM_OPTIONS_LIB NAMES boost_program_options
-              PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
-FIND_LIBRARY( BOOST_FILESYSTEM_LIB NAMES boost_filesystem
-              PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
-
-IF (BOOST_INCLUDE_DIR)
-  SET(BOOST_FOUND TRUE)
-ENDIF (BOOST_INCLUDE_DIR)
-
-IF (BOOST_FOUND)
-  IF (NOT Boost_FIND_QUIETLY)
-     MESSAGE(STATUS "Found Boost: ${BOOST_INCLUDE_DIR}")
-  ENDIF (NOT Boost_FIND_QUIETLY)
-ELSE(BOOST_FOUND)
-  IF (Boost_FIND_REQUIRED)
-     MESSAGE(FATAL_ERROR "Could not find Boost")
-  ENDIF (Boost_FIND_REQUIRED)
-ENDIF (BOOST_FOUND)
-
diff --git a/makelib/FindBoost.cmake b/makelib/FindBoost.cmake
new file mode 100644 (file)
index 0000000..5e71bc6
--- /dev/null
@@ -0,0 +1,28 @@
+# - Find Boost libraries
+# Go hunting for boost compoments
+# Defines:
+#  BOOST_INCLUDE
+
+FIND_PATH(BOOST_INCLUDE_DIR weak_ptr.hpp /usr/include /usr/local/include )
+
+FIND_LIBRARY( BOOST_UNIT_TEST_LIB NAMES boost_unit_test_framework 
+              PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
+FIND_LIBRARY( BOOST_PROGRAM_OPTIONS_LIB NAMES boost_program_options
+              PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
+FIND_LIBRARY( BOOST_FILESYSTEM_LIB NAMES boost_filesystem
+              PATHS /usr/lib /usr/local/lib C:\\Boost\\lib )
+
+IF (BOOST_INCLUDE_DIR)
+  SET(BOOST_FOUND TRUE)
+ENDIF (BOOST_INCLUDE_DIR)
+
+IF (BOOST_FOUND)
+  IF (NOT Boost_FIND_QUIETLY)
+     MESSAGE(STATUS "Found Boost: ${BOOST_INCLUDE_DIR}")
+  ENDIF (NOT Boost_FIND_QUIETLY)
+ELSE(BOOST_FOUND)
+  IF (Boost_FIND_REQUIRED)
+     MESSAGE(FATAL_ERROR "Could not find Boost")
+  ENDIF (Boost_FIND_REQUIRED)
+ENDIF (BOOST_FOUND)
+
diff --git a/makelib/osxdist.py b/makelib/osxdist.py
new file mode 100644 (file)
index 0000000..500cdd5
--- /dev/null
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+
+import os
+import sys
+from shutil import copy, copytree
+
+def system(cmdline):
+  #print >>sys.stderr, cmdline
+  return os.system(cmdline)
+
+def mkdir(path):
+  path_list = []
+  head, tail = os.path.split(path)
+  path_list.insert(0, tail)
+  while len(head) > 0:
+    head, tail = os.path.split(head)
+    path_list.insert(0, tail)
+  created_path = ""
+  for path_element in path_list:
+    created_path = os.path.join(created_path, path_element)
+    if not os.path.exists(created_path):
+      os.mkdir(created_path)
+    
+# useful information about building dmgs
+# http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix
+# http://developer.apple.com/documentation/developertools/Conceptual/SoftwareDistribution/Concepts/sd_disk_images.html
+
+def makedmg(dirlist, volname):
+  # need to detect what the real volume name is
+  mussa_mount = '/Volumes/%s' %(volname)
+  mussarw_dmg = '%sw.dmg' %(volname)
+  mussa_dmg = '%s.dmg' %(volname)
+  system('hdiutil detach '+mussa_mount)
+  if os.path.exists(mussa_mount):
+    print >>sys.stderr, "Something is in", mussa_mount
+    return 
+  if os.path.exists(mussarw_dmg):
+    os.unlink(mussarw_dmg)
+  if os.path.exists(mussa_dmg):
+    os.unlink(mussa_dmg)
+  system('hdiutil create -size 64m -fs HFS+ -volname "%s" %s'%(volname, mussarw_dmg))
+  system('hdiutil attach '+mussarw_dmg)
+  # copy files
+  for d in dirlist:
+    copytree(d, os.path.join(mussa_mount, d))
+
+  system('hdiutil detach '+mussa_mount)
+  system('hdiutil convert '+mussarw_dmg +' -format UDZO -o '+mussa_dmg)
+  #system('hdiutil internet-enable -yes '+mussa_dmg)
+
+def main(args):
+  framework_subpath = os.path.join("%(framework)s.framework", "Versions", "4.0", "%(framework)s")
+  frameworks = ['QtCore', 'QtGui', 'QtOpenGL']
+
+  qt_lib_dir="/usr/local/qt-4.1.1/lib"
+  qt_framework=os.path.join(qt_lib_dir, framework_subpath)
+
+  app_name="mussagl"
+  app_dir=app_name+".app"
+  app_binary=app_dir+"/Contents/MacOS/"+app_name
+  app_framework=os.path.join(app_dir, "Contents", "Frameworks", framework_subpath)
+  if not os.path.exists(app_dir):
+    print >>sys.stderr, "please build mussagl first"
+    return 1
+
+  # install frameworks and update binary
+  for frame in frameworks:
+    qtframe = qt_framework % ({'framework': frame})
+    appframe = app_framework % ({'framework': frame})
+    exe_path = "@executable_path/../Frameworks/" + framework_subpath
+    exe_path %= ({'framework': frame})
+    mkdir(os.path.split(appframe)[0])
+    # update binary
+    copy(qtframe, appframe)
+    system("install_name_tool -id "+exe_path+" "+appframe)
+    system("install_name_tool -change "+qtframe+" "+exe_path+" "+app_binary)
+    # now that everything is in place change the frameworks 
+    # references
+    for frame2 in frameworks:
+      qtframe2 = qt_framework % ({'framework': frame2})
+      contents_exe_path = "@executable_path/../Frameworks/" + framework_subpath
+      contents_exe_path %= ({'framework': frame2})
+      system("install_name_tool -change "+qtframe2+" "+contents_exe_path+" "+
+             appframe)
+  makedmg([app_dir], 'mussa')
+
+if __name__ == "__main__":
+  main(sys.argv[1:])
diff --git a/makelib/wininst.iss b/makelib/wininst.iss
new file mode 100644 (file)
index 0000000..79b9dac
--- /dev/null
@@ -0,0 +1,60 @@
+[Setup]\r
+AppCopyright=California Institute of California\r
+AppName=Mussagl\r
+AppVerName=Mussagl build 141\r
+DefaultGroupName=Mussagl\r
+OutputDir=win32_mussagl_installer\r
+OutputBaseFilename=mussagl-setup-build-141\r
+VersionInfoVersion=141\r
+VersionInfoCompany=California Institute of Technology\r
+VersionInfoDescription=Mussagl\r
+VersionInfoTextVersion=Mussagl build 141\r
+VersionInfoCopyright=California Institute of Technology\r
+LicenseFile=LICENSE.txt\r
+ShowLanguageDialog=yes\r
+AppPublisher=Wold Lab - Caltech\r
+AppPublisherURL=http://woldlab.caltech.edu\r
+AppSupportURL=http://mussa.caltech.edu\r
+AppUpdatesURL=http://mussa.caltech.edu\r
+AppVersion=build 141\r
+AppID={{5B060311-9241-4015-B73D-D9D2822458E7}\r
+UninstallDisplayName=Mussagl\r
+DefaultDirName={pf}\Mussagl\r
+[Dirs]\r
+Name: {app}\examples\r
+Name: {app}\icons\r
+Name: {app}\examples\seq\r
+[Files]\r
+Source: icons\viewmag.png; DestDir: {app}\icons\r
+Source: icons\exit.png; DestDir: {app}\icons\r
+Source: icons\filenew.png; DestDir: {app}\icons\r
+Source: icons\fileopen.png; DestDir: {app}\icons\r
+Source: icons\filesave.png; DestDir: {app}\icons\r
+Source: icons\help.png; DestDir: {app}\icons\r
+Source: icons\image2.png; DestDir: {app}\icons\r
+Source: icons\info.png; DestDir: {app}\icons\r
+Source: icons\lock.png; DestDir: {app}\icons\r
+Source: icons\motif_icon.png; DestDir: {app}\icons\r
+Source: icons\README.txt; DestDir: {app}\icons\r
+Source: examples\test_motif.txt; DestDir: {app}\examples\r
+Source: examples\mck3test.mupa; DestDir: {app}\examples\r
+Source: examples\mck3test_example.museq; DestDir: {app}\examples\r
+Source: examples\mck3test_example.muway; DestDir: {app}\examples\r
+Source: examples\mm_mck3test.annot; DestDir: {app}\examples\r
+Source: examples\seq\rabbit_mck_pro.fa; DestDir: {app}\examples\seq\r
+Source: examples\seq\human_mck_pro.fa; DestDir: {app}\examples\seq\r
+Source: examples\seq\mouse_mck_pro.fa; DestDir: {app}\examples\seq\r
+Source: release\mussagl.exe; DestDir: {app}\r
+Source: ..\..\MinGW\bin\mingwm10.dll; DestDir: {app}\r
+Source: ..\..\Qt\4.1.0\bin\QtCore4.dll; DestDir: {app}\r
+Source: ..\..\Qt\4.1.0\bin\QtGui4.dll; DestDir: {app}\r
+Source: ..\..\Qt\4.1.0\bin\QtOpenGL4.dll; DestDir: {app}\r
+[Icons]\r
+Name: {group}\Mussagl; Filename: {app}\mussagl.exe; WorkingDir: {app}; IconFilename: {app}\mussagl.exe; Flags: createonlyiffileexists\r
+Name: {group}\{cm:UninstallProgram, Mussagl}; Filename: {uninstallexe}\r
+[INI]\r
+Filename: {app}\mussa.url; Section: InternetShortcut; Key: URL; String: http://mussa.caltech.edu/\r
+Filename: {app}\woldlab.url; Section: InternetShortcut; Key: URL; String: http://woldlab.caltech.edu\r
+[UninstallDelete]\r
+Type: files; Name: {app}\mussa.url\r
+Type: files; Name: {app}\woldlab.url\r
diff --git a/osxdist.py b/osxdist.py
deleted file mode 100644 (file)
index 500cdd5..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import sys
-from shutil import copy, copytree
-
-def system(cmdline):
-  #print >>sys.stderr, cmdline
-  return os.system(cmdline)
-
-def mkdir(path):
-  path_list = []
-  head, tail = os.path.split(path)
-  path_list.insert(0, tail)
-  while len(head) > 0:
-    head, tail = os.path.split(head)
-    path_list.insert(0, tail)
-  created_path = ""
-  for path_element in path_list:
-    created_path = os.path.join(created_path, path_element)
-    if not os.path.exists(created_path):
-      os.mkdir(created_path)
-    
-# useful information about building dmgs
-# http://developer.apple.com/documentation/Porting/Conceptual/PortingUnix
-# http://developer.apple.com/documentation/developertools/Conceptual/SoftwareDistribution/Concepts/sd_disk_images.html
-
-def makedmg(dirlist, volname):
-  # need to detect what the real volume name is
-  mussa_mount = '/Volumes/%s' %(volname)
-  mussarw_dmg = '%sw.dmg' %(volname)
-  mussa_dmg = '%s.dmg' %(volname)
-  system('hdiutil detach '+mussa_mount)
-  if os.path.exists(mussa_mount):
-    print >>sys.stderr, "Something is in", mussa_mount
-    return 
-  if os.path.exists(mussarw_dmg):
-    os.unlink(mussarw_dmg)
-  if os.path.exists(mussa_dmg):
-    os.unlink(mussa_dmg)
-  system('hdiutil create -size 64m -fs HFS+ -volname "%s" %s'%(volname, mussarw_dmg))
-  system('hdiutil attach '+mussarw_dmg)
-  # copy files
-  for d in dirlist:
-    copytree(d, os.path.join(mussa_mount, d))
-
-  system('hdiutil detach '+mussa_mount)
-  system('hdiutil convert '+mussarw_dmg +' -format UDZO -o '+mussa_dmg)
-  #system('hdiutil internet-enable -yes '+mussa_dmg)
-
-def main(args):
-  framework_subpath = os.path.join("%(framework)s.framework", "Versions", "4.0", "%(framework)s")
-  frameworks = ['QtCore', 'QtGui', 'QtOpenGL']
-
-  qt_lib_dir="/usr/local/qt-4.1.1/lib"
-  qt_framework=os.path.join(qt_lib_dir, framework_subpath)
-
-  app_name="mussagl"
-  app_dir=app_name+".app"
-  app_binary=app_dir+"/Contents/MacOS/"+app_name
-  app_framework=os.path.join(app_dir, "Contents", "Frameworks", framework_subpath)
-  if not os.path.exists(app_dir):
-    print >>sys.stderr, "please build mussagl first"
-    return 1
-
-  # install frameworks and update binary
-  for frame in frameworks:
-    qtframe = qt_framework % ({'framework': frame})
-    appframe = app_framework % ({'framework': frame})
-    exe_path = "@executable_path/../Frameworks/" + framework_subpath
-    exe_path %= ({'framework': frame})
-    mkdir(os.path.split(appframe)[0])
-    # update binary
-    copy(qtframe, appframe)
-    system("install_name_tool -id "+exe_path+" "+appframe)
-    system("install_name_tool -change "+qtframe+" "+exe_path+" "+app_binary)
-    # now that everything is in place change the frameworks 
-    # references
-    for frame2 in frameworks:
-      qtframe2 = qt_framework % ({'framework': frame2})
-      contents_exe_path = "@executable_path/../Frameworks/" + framework_subpath
-      contents_exe_path %= ({'framework': frame2})
-      system("install_name_tool -change "+qtframe2+" "+contents_exe_path+" "+
-             appframe)
-  makedmg([app_dir], 'mussa')
-
-if __name__ == "__main__":
-  main(sys.argv[1:])
diff --git a/wininst.iss b/wininst.iss
deleted file mode 100644 (file)
index 79b9dac..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-[Setup]\r
-AppCopyright=California Institute of California\r
-AppName=Mussagl\r
-AppVerName=Mussagl build 141\r
-DefaultGroupName=Mussagl\r
-OutputDir=win32_mussagl_installer\r
-OutputBaseFilename=mussagl-setup-build-141\r
-VersionInfoVersion=141\r
-VersionInfoCompany=California Institute of Technology\r
-VersionInfoDescription=Mussagl\r
-VersionInfoTextVersion=Mussagl build 141\r
-VersionInfoCopyright=California Institute of Technology\r
-LicenseFile=LICENSE.txt\r
-ShowLanguageDialog=yes\r
-AppPublisher=Wold Lab - Caltech\r
-AppPublisherURL=http://woldlab.caltech.edu\r
-AppSupportURL=http://mussa.caltech.edu\r
-AppUpdatesURL=http://mussa.caltech.edu\r
-AppVersion=build 141\r
-AppID={{5B060311-9241-4015-B73D-D9D2822458E7}\r
-UninstallDisplayName=Mussagl\r
-DefaultDirName={pf}\Mussagl\r
-[Dirs]\r
-Name: {app}\examples\r
-Name: {app}\icons\r
-Name: {app}\examples\seq\r
-[Files]\r
-Source: icons\viewmag.png; DestDir: {app}\icons\r
-Source: icons\exit.png; DestDir: {app}\icons\r
-Source: icons\filenew.png; DestDir: {app}\icons\r
-Source: icons\fileopen.png; DestDir: {app}\icons\r
-Source: icons\filesave.png; DestDir: {app}\icons\r
-Source: icons\help.png; DestDir: {app}\icons\r
-Source: icons\image2.png; DestDir: {app}\icons\r
-Source: icons\info.png; DestDir: {app}\icons\r
-Source: icons\lock.png; DestDir: {app}\icons\r
-Source: icons\motif_icon.png; DestDir: {app}\icons\r
-Source: icons\README.txt; DestDir: {app}\icons\r
-Source: examples\test_motif.txt; DestDir: {app}\examples\r
-Source: examples\mck3test.mupa; DestDir: {app}\examples\r
-Source: examples\mck3test_example.museq; DestDir: {app}\examples\r
-Source: examples\mck3test_example.muway; DestDir: {app}\examples\r
-Source: examples\mm_mck3test.annot; DestDir: {app}\examples\r
-Source: examples\seq\rabbit_mck_pro.fa; DestDir: {app}\examples\seq\r
-Source: examples\seq\human_mck_pro.fa; DestDir: {app}\examples\seq\r
-Source: examples\seq\mouse_mck_pro.fa; DestDir: {app}\examples\seq\r
-Source: release\mussagl.exe; DestDir: {app}\r
-Source: ..\..\MinGW\bin\mingwm10.dll; DestDir: {app}\r
-Source: ..\..\Qt\4.1.0\bin\QtCore4.dll; DestDir: {app}\r
-Source: ..\..\Qt\4.1.0\bin\QtGui4.dll; DestDir: {app}\r
-Source: ..\..\Qt\4.1.0\bin\QtOpenGL4.dll; DestDir: {app}\r
-[Icons]\r
-Name: {group}\Mussagl; Filename: {app}\mussagl.exe; WorkingDir: {app}; IconFilename: {app}\mussagl.exe; Flags: createonlyiffileexists\r
-Name: {group}\{cm:UninstallProgram, Mussagl}; Filename: {uninstallexe}\r
-[INI]\r
-Filename: {app}\mussa.url; Section: InternetShortcut; Key: URL; String: http://mussa.caltech.edu/\r
-Filename: {app}\woldlab.url; Section: InternetShortcut; Key: URL; String: http://woldlab.caltech.edu\r
-[UninstallDelete]\r
-Type: files; Name: {app}\mussa.url\r
-Type: files; Name: {app}\woldlab.url\r