Module: dfmc-projects Synopsis: DFMC project manager interface Author: Andy Armstrong, Roman Budzianowski Copyright: Original Code is Copyright (c) 1995-2004 Functional Objects, Inc. All rights reserved. License: Functional Objects Library Public License Version 1.0 Dual-license: GNU Lesser General Public License Warranty: Distributed WITHOUT WARRANTY OF ANY KIND define sealed class () sealed slot project-name :: , required-init-keyword: name:; sealed slot project-database-location :: , required-init-keyword: database-location:; end class ; define sealed domain make (singleton()); define sealed domain initialize (); define function open-binary-project (workspace :: , location :: ) => (project :: ) make(, database-location: location, name: location.locator-base) end function open-binary-project; define function find-binary-project (workspace :: , name :: ) => (project :: false-or()) block (return) local method maybe-return-project (install-locator :: false-or()) => () if (install-locator) let databases-directory = ensure-directory-exists(install-locator, "databases"); let database-location = make(, directory: databases-directory, base: as(, name), extension: database-file-extension()); if (file-exists?(database-location)) let project = make(, database-location: database-location, name: database-location.locator-base); return(project) end end end method maybe-return-project; maybe-return-project(user-install-path()); maybe-return-project(system-install-path()); maybe-return-project(system-release-path()); #f end end function find-binary-project; define method project-library-name (project :: ) => (name :: ) //---*** Surely we should get this from the database? project.project-name end method project-library-name; define method project-read-only? (project :: ) => (read-only? == #t) #t end method project-read-only?; define method project-directory (project :: ) => (location :: ) project.project-database-location.locator-directory end method project-directory; define method project-source-files (project :: ) => (source-files :: ) #[] end method project-source-files; define method project-filename (project :: ) => (filename :: ) // This information isn't available (yet) in the compiler database. // For the moment only our system projects will become binary projects, // so we can use the release-info library to get the information. //---*** This must be fixed to allow users to use binary projects. let name = project.project-library-name; let info = find-dll-group(name); case info => info.info-dll-name; otherwise => as(, name) end end method project-filename;