Module: release-info-internals Synopsis: Functional Developer release information -- settings and user profiles Author: Andy Armstrong, Scott McKay 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 /// Functional Objects settings // General Open Dylan settings are those settings pertaining to all // software maintained to the Dylan Hackers, not specifically to // the Open Dylan compiler. Maybe they should be called something // like ? --tc define settings () key-name "Open Dylan"; end settings ; define settings () key-name "Open Dylan"; end settings ; define settings () key-name "1.0"; slot service-pack :: = 0; slot library-packs :: = as(, 0); slot console-tools :: = #f; end settings ; define settings () key-name "1.1"; slot service-pack :: = 0; slot library-packs :: = as(, 0); slot console-tools :: = #f; end settings ; define settings () key-name "1.2"; slot service-pack :: = 0; slot library-packs :: = as(, 0); slot console-tools :: = #f; end settings ; define settings () key-name "2.0"; slot service-pack :: = 0; slot library-packs :: = as(, 0); slot console-tools :: = #f; end settings ; define settings () key-name "2.1"; slot service-pack :: = 0; slot library-packs :: = as(, 0); slot console-tools :: = #f; end settings ; define constant = ; define settings () key-name "Open Dylan"; end settings ; define settings () key-name "Open Dylan"; end settings ; define settings () key-name "1.0"; end settings ; define settings () key-name "1.1"; end settings ; define settings () key-name "1.2"; end settings ; define settings () key-name "2.0"; end settings ; define settings () key-name "2.1"; end settings ; define constant = ; /// Library and service pack settings define constant $local-settings = make(); define variable *library-packs-override* = #"unknown"; define function raw-encoded-library-packs () => (encoded-packs :: ) if (*library-packs-override* = #"unknown") let raw-override = environment-variable("OPEN_DYLAN_LIBRARY_PACKS"); if (raw-override) *library-packs-override* := string-to-machine-word(raw-override) else *library-packs-override* := #f end end; *library-packs-override* | $local-settings.library-packs end function raw-encoded-library-packs; define function release-encoded-library-packs () => (encoded-packs :: ) raw-encoded-library-packs() end function release-encoded-library-packs; define function release-encoded-required-library-packs () => (encoded-packs :: ) let installed-packs :: = raw-encoded-library-packs(); if (*library-packs-override*) // If the developer has overriden the library packs setting, claim // only the installed packs are required to assist bootstrapping... installed-packs else let packs :: = as(, 0); for (pack :: from 1 to $maximum-library-packs, bit :: = as(, 1) then u%shift-left(bit, 1)) if (library-pack-required?(pack)) packs := %logior(packs, bit) end end; packs end end function release-encoded-required-library-packs; define function release-encoded-optional-library-packs () => (encoded-packs :: ) let packs :: = raw-encoded-library-packs(); if (*library-packs-override*) // If the developer has overriden the library packs setting, claim // all packs are required to avoid license checks during bootstrapping... as(, 0) else for (pack :: from 1 to $maximum-library-packs, bit :: = as(, 1) then u%shift-left(bit, 1)) if (library-pack-required?(pack)) packs := %logand(packs, %lognot(bit)) end end; packs end end function release-encoded-optional-library-packs; define function release-service-pack () => (service-pack :: ) $local-settings.service-pack end function release-service-pack; define function release-contains-console-tools? () => (tools? :: ) $local-settings.console-tools end function release-contains-console-tools?;