Commit 69adac3a authored by Kevin Bracey's avatar Kevin Bracey
Browse files

ART branch (version 0.76) folded in

parent 9963025b
......@@ -28,6 +28,11 @@
# 31-Jan-95 AMcC No longer installs !Sprites23. Modules writable by owner
#
# 03-Jul-96 KJB Added 370 directory
#
# 24-Apr-97 KJB Made all copies file-by-file to prevent copying CVS
# directories. Removed 200 and 300 directories.
# Made SysPaths set Boot$OSVersion if not already set,
# and correct "3.50" to "350".
VPATH = @ <Support$Dir>
......@@ -71,20 +76,19 @@ OSLIB = OSLib:o.OSLib
INCLUDES = -ISupport:,OS:
MODULES = \
200.Modules.CLib \
200.Modules.Colours \
200.Modules.FPEmulator \
300.Modules.BASIC64 \
300.Modules.SCSIFiler \
300.Modules.SerialUtil \
310.Modules.Colours \
310.Modules.ABCLib \
310.Modules.ABIMod \
310.Modules.BASIC64 \
310.Modules.Colours \
310.Modules.DDEUtils \
310.Modules.DDT \
310.Modules.FrontEnd \
310.Modules.Network.URL.File \
310.Modules.Network.URL.URL
310.Modules.Network.URL.URL \
310.Modules.SCSIFiler \
310.Modules.SerialUtil \
370.Modules.DDEUtils \
370.Modules.DDT
FILES =\
${LDIR}.!Boot\
......@@ -123,25 +127,32 @@ install: ${FILES}
${CP} abs.SysPaths ${INSTDIR}.SysPaths ${CPFLAGS}
|
${MKDIR} ${INSTDIR}.Modules
${MKDIR} ${INSTDIR}.200
${MKDIR} ${INSTDIR}.300
${MKDIR} ${INSTDIR}.310
${MKDIR} ${INSTDIR}.310.Modules
${MKDIR} ${INSTDIR}.350
${MKDIR} ${INSTDIR}.350.Modules
${MKDIR} ${INSTDIR}.360
${MKDIR} ${INSTDIR}.360.Modules
${MKDIR} ${INSTDIR}.370
${CP} 200 ${INSTDIR}.200 ${CPFLAGS}
${CP} 300 ${INSTDIR}.300 ${CPFLAGS}
${CP} 310 ${INSTDIR}.310 ${CPFLAGS}
${CP} 350 ${INSTDIR}.350 ${CPFLAGS}
${CP} 360 ${INSTDIR}.360 ${CPFLAGS}
${CP} 370 ${INSTDIR}.370 ${CPFLAGS}
${CP} Modules ${INSTDIR}.Modules ${CPFLAGS} #shouldn't really be anything in Modules, but SSound currently is
${MKDIR} ${INSTDIR}.370.Modules
${CP} 310.Modules.ABCLib ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.ABIMod ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.BASIC64 ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.Colours ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.DDEUtils ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.DDT ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.FrontEnd ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.SCSIFiler ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.SerialUtil ${INSTDIR}.310.Modules.* ${CPFLAGS}
${CP} 310.Modules.Network.URL.File ${INSTDIR}.310.Modules.Network.URL.* ${CPFLAGS}
${CP} 310.Modules.Network.URL.URL ${INSTDIR}.310.Modules.Network.URL.* ${CPFLAGS}
${CP} 370.Modules.DDEUtils ${INSTDIR}.370.Modules.* ${CPFLAGS}
${CP} 370.Modules.DDT ${INSTDIR}.370.Modules.* ${CPFLAGS}
${CP} Modules.SSound ${INSTDIR}.Modules.* ${CPFLAGS} # shouldn't be in here
|
${ATTR} -directories +wr ${INSTDIR}
${ATTR} -files +ol +or -ow +wr -ww ${INSTDIR}
${ATTR} -files -ol +or +ow +wr -ww ${INSTDIR}.Modules
${ATTR} -files -ol +or +ow +wr -ww ${INSTDIR}.200
${ATTR} -files -ol +or +ow +wr -ww ${INSTDIR}.300
${ATTR} -files -ol +or +ow +wr -ww ${INSTDIR}.310
${ATTR} -files -ol +or +ow +wr -ww ${INSTDIR}.350
${ATTR} -files -ol +or +ow +wr -ww ${INSTDIR}.360
......
| !Run file for !System, version 0.75 (13-Aug-96)
| !Run file for !System, version 0.76 (24-Apr-97)
|
IconSprites <Obey$Dir>.!Sprites
WimpSlot 12k 12k
Set System$Dir <Obey$Dir>
Do /<Obey$Dir>.SysPaths
/<Obey$Dir>.SysPaths
| Wenn Sie ein Netzwerk benutzen, das sowohl RISC-OS-2-Computer als auch
| Computer mit neuereren RISC-OS-Versionen enthält, sollte der Inhalt
| des (alten) RISC-OS-2-!System.Modules in dieses !System integriert
| werden.
|
IconSprites <Obey$Dir>.!Sprites
If "<System$Dir>" = "" Then Set System$Dir <Obey$Dir>
If "<System$Path>" = "" Then Set System$Path <System$Dir>.
If "<System$Path>" = "" Then /<Obey$Dir>.SysPaths
IconSprites <Obey$Dir>.!Sprites
If "<System$Dir>" = "" Then Set System$Dir <Obey$Dir>
If "<System$Path>" = "" Then Do /<Obey$Dir>.SysPaths <System$Dir>
If "<System$Path>" = "" Then /<Obey$Dir>.SysPaths
......@@ -24,11 +24,3 @@ application then the directory !System.Modules does
not contain a sufficiently up-to-date version of the
relocatable module "some-module".
If this version of !System is used with a machine
running RISC OS 2 this will probably be because
!System.Modules does not contain the module at all.
In this case it will be necessary to add relocatable
modules from the RISC OS 2 !System to the Modules
directory in this !System - copy the RISC OS 2
!System.Modules directory into the RISC OS 3 !System
directory (the directory containing this file).
......@@ -22,6 +22,7 @@
#include "macros.h"
#include "os.h"
#include "osgbpb.h"
#include "osmodule.h"
/*From Support*/
#include "x.h"
......@@ -40,13 +41,40 @@ x_STATIC_ERROR (Too_Many_Entries, 1, "Too many entries")
static int Compare (void const *i0, void const *i1)
{return atoi (*(char **) i1) - atoi (*(char **) i0);}
/*
* Return the version number of a ROM module.
*/
static int Module_Version(const char *module)
{
int v = 0, m, s;
char *name;
x_exception x;
m = 0, s = -1;
x_TRY (&x)
/*Bizarrely, this call only stops when it gets an error ...*/
while (TRUE)
{ m = osmodule_enumerate_rom_with_info (m, s, &s, &name, NULL,
NULL, &v);
if (strcmp (name, module) == 0)
break;
}
x_CATCH (&x)
;
return v >> 8;
}
int main (void)
{ char info [os_FILE_NAME_LIMIT + 1], system_path [1024 + 1],
system_dir [1024 + 1], sys_path [os_CLI_LIMIT + 1],
os_version [os_CLI_LIMIT + 1], *entries [ENTRY_LIMIT];
int context, version, n, used, v, entry, entry_count;
char *point;
x_exception x;
os_error *e;
x_TRY (&x)
{ /*Fix fault: ignore arguments, and read System$Dir instead. J R C
......@@ -61,9 +89,31 @@ int main (void)
os_VARTYPE_STRING, NULL);
/*Which OS are we running under?*/
os_read_var_val ("Boot$OSVersion", os_version, sizeof os_version, 0,
os_VARTYPE_STRING, &used, NULL);
os_version [used] = '\0';
e = xos_read_var_val ("Boot$OSVersion", os_version, sizeof os_version, 0,
os_VARTYPE_STRING, &used, NULL, NULL);
if (e->errnum == error_VAR_CANT_FIND)
{
/* Set it if not already set */
sprintf(os_version, "%X0%n", Module_Version("UtilityModule")/16, &used);
os_set_var_val("Boot$OSVersion", (byte *) os_version, used, 0,
os_VARTYPE_STRING, NULL);
}
else if (e)
x_THROW(e);
else
os_version [used] = '\0';
/* Turn "3.50" into "350" */
if ((point = strchr(os_version, '.')) != NULL)
{
do
{
*point=*(point+1);
}
while (*++point);
os_set_var_val("Boot$OSVersion", (byte *) os_version, used, 0,
os_VARTYPE_STRING, NULL);
}
sscanf (os_version, "%d%n", &version, (n = -1, &n));
if (n == strlen (os_version))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment