(* ================================================================================ copyhdrs.met An AppleScript to copy the NCBI Toolkit header files in preparation for compilation with Metrowerks CodeWarrior. Revision History: ---------------- ??/??/?? Harmon Created, script must be run first 2/18/96 Kans Consolidated all 68K/PPC scripts This file needs to be modified for your system. Please scan through the script looking for occurences of >>>CHANGE THIS<<<. A note will follow indicating what is needed. Run this file before running the makeall.met and makenet.met AppleScripts. ================================================================================ *) (* ==== Edit this section to specify desired paths on your machine ==== *) -- >>>CHANGE THIS<<< Set NCBIBUILD to where Libraries, Headers, and Include folders will reside property NCBIBUILD : "yourMac:CodeWarrior:" -- >>>CHANGE THIS<<< Set NCBISOURCE to the root folder containing the NCBI toolkit source property NCBISOURCE : "yourMac:CodeWarrior:ncbi:" (* ==== These symbols are derived from the edited symbols above ==== *) property LIBRARIESPPC : NCBIBUILD & "PPC Libraries:" property LIBRARIES68K : NCBIBUILD & "68K Libraries:" property HEADERS : NCBIBUILD & "Headers:" property INCLUDES : NCBIBUILD & "Include:" (* ==== The following steps copy the toolkit headers and prefix files ==== *) createFolders() copyPrefixes() copyIncludes() (* ==== This section creates folders, copies headers, and copies include files ==== *) on createFolders() tell application "Finder" if not (exists (folder INCLUDES)) then make new folder at folder NCBIBUILD with properties {name:"Include"} end if if not (exists (folder HEADERS)) then make new folder at folder NCBIBUILD with properties {name:"Headers"} end if if not (exists (folder LIBRARIESPPC)) then make new folder at folder NCBIBUILD with properties {name:"PPC Libraries"} end if if not (exists (folder LIBRARIES68K)) then make new folder at folder NCBIBUILD with properties {name:"68K Libraries"} end if end tell end createFolders on copyPrefixes() tell application "Finder" if (exists (file "net.pfx" of folder HEADERS)) then delete file "net.pfx" of (folder HEADERS) end if if (exists (file "blast.pfx" of folder HEADERS)) then delete file "blast.pfx" of (folder HEADERS) end if if (exists (file "medarch.pfx" of folder HEADERS)) then delete file "medarch.pfx" of (folder HEADERS) end if copy {file "net.pfx" of folder "macmet" of folder "link" of folder NCBISOURCE} to {folder HEADERS} copy {file "blast.pfx" of folder "macmet" of folder "link" of folder NCBISOURCE} to {folder HEADERS} copy {file "medarch.pfx" of folder "macmet" of folder "link" of folder NCBISOURCE} to {folder HEADERS} if (exists (file "ncbilcl.met" of folder HEADERS)) then delete file "ncbilcl.met" of (folder HEADERS) end if if (exists (file "ncbilcl.h" of (folder HEADERS))) then delete file "ncbilcl.h" of (folder HEADERS) end if copy {file "ncbilcl.met" of (folder "corelib" of folder NCBISOURCE)} to {folder HEADERS} set name of file "ncbilcl.met" of (folder HEADERS) to "ncbilcl.h" end tell end copyPrefixes on copyIncludes() tell application "Finder" activate repeat with i in (every folder of (folder NCBISOURCE)) if (i as string does not contain "build" and i as string does not contain "include") then try repeat with j in every file of i try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat on error end try end if end repeat repeat with j in every file of (folder (NCBISOURCE & "network:ncsasock:")) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat repeat with j in (every file of (folder (NCBISOURCE & "network:nsclilib:"))) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat repeat with j in every file of (folder (NCBISOURCE & "network:entrez:client:")) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat repeat with j in every file of (folder (NCBISOURCE & "network:blast2:client:")) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat repeat with j in every file of (folder (NCBISOURCE & "network:medarch:client:")) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat repeat with j in every file of (folder (NCBISOURCE & "network:taxon1:client:")) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat repeat with j in every file of (folder (NCBISOURCE & "network:taxon1:common:")) try if j ends with ".h" then copy {j} to {folder INCLUDES} end if on error end try end repeat end tell end copyIncludes