Commit bee96226 authored by ROOL's avatar ROOL 🤖

Get version from VersionASM

Detail:
  Changed messages file to _Version tag, and used awk script to insert it at build time.
parent c3850ad6
......@@ -140,8 +140,10 @@
LIBDIR = C:
MKDIR = do mkdir -p
AS = objasm
AWK = GNU.gawk
CMHG = cmhg
CP = copy
INSERTVERSION = ${AWK} -f Build:AwkVers
LD = link
RM = remove
SQUEEZE = squeeze
......@@ -735,7 +737,7 @@ install_common: ${FILES}
${CP} ${LDIR}.8desktop ${INSTDIR}.8desktop ${CPFLAGS}n
${CP} ${LDIR}.Choices ${INSTDIR}.Choices ${CPFLAGS}n
${CP} ${LDIR}.Controls ${INSTDIR}.Controls ${CPFLAGS}n
${CP} ${LDIR}.Messages ${INSTDIR}.Messages ${CPFLAGS}n
${INSERTVERSION} ${LDIR}.Messages > ${INSTDIR}.Messages
${CP} ${LDIR}.Sprites ${INSTDIR}.Sprites ${CPFLAGS}n
-${CP} ${LDIR}.Sprites22 ${INSTDIR}.Sprites22 ${CPFLAGS}n
-${CP} ${LDIR}.Sprites23 ${INSTDIR}.Sprites23 ${CPFLAGS}n
......@@ -840,7 +842,7 @@ resources:
-${CP} ${LDIR}.5Sprites22 ${RESDIR}.5Sprites22 ${CPFLAGS}
${CP} ${LDIR}.Choices ${RESDIR}.Choices ${CPFLAGS}
${CP} ${LDIR}.Controls ${RESDIR}.Controls ${CPFLAGS}
${CP} ${LDIR}.Messages ${RESDIR}.Messages ${CPFLAGS}
${INSERTVERSION} ${LDIR}.Messages > ${RESDIR}.Messages
${CP} ${LDIR}.Res ${RESDIR}.Res ${CPFLAGS}
${CP} ${LDIR}.Sprites ${RESDIR}.Sprites ${CPFLAGS}
-${CP} ${LDIR}.Sprites22 ${RESDIR}.Sprites22 ${CPFLAGS}
......
......@@ -3,7 +3,7 @@
_TaskName:Browse
_SpriName:!browse
Version:2.15 (24 Apr 2009)
_Version:Auto-maintained
FullName:Acorn Browse
DAGen:- General
DAJSc:- JavaScript
......
......@@ -3,7 +3,7 @@
_TaskName:Phoenix
_SpriName:!phoenix
Version:2.15 (24 Apr 2009)
_Version:Auto-maintained
FullName:Phoenix
DAGen:- General
DAJSc:- JavaScript
......
......@@ -3,7 +3,7 @@
_TaskName:Browse
_SpriName:!browse
Version:2.15 (24 Apr 2009)
_Version:Auto-maintained
FullName:Acorn Browse
DAGen:- General
DAJSc:- JavaScript
......
......@@ -499,7 +499,7 @@ _kernel_oserror * about_build_page(void ** block)
/* move the final string down into place. */
len = strlen(lookup_token("paboutbrw",1,0)) + 1;
len += strlen(lookup_token("Version", 1,0)) * 2 + 1;
len += strlen(lookup_token("_Version", 1,0)) * 2 + 1;
if (!flex_extend(block, output_size + len)) goto panic;
......
......@@ -3677,7 +3677,7 @@ int handle_show_info(int eventcode, ToolboxEvent * event, IdBlock * idb, void *
#endif
lookup_token("Version:(Unknown!)",1,0);
lookup_token("_Version:(Unknown!)",1,0);
#ifndef SINGLE_USER
......
......@@ -293,7 +293,7 @@
nav->appCodeName = JS_NewStringCopyZ(cx, lookup_token("_TaskName:Browse",0,0));
if (nav->appCodeName) JS_LockGCThing(cx, nav->appCodeName);
nav->appVersion = JS_NewStringCopyZ(cx, lookup_token("Version:(Unknown!)",0,0));
nav->appVersion = JS_NewStringCopyZ(cx, lookup_token("_Version:(Unknown!)",0,0));
if (nav->appVersion) JS_LockGCThing(cx, nav->appVersion);
nav->appName = JS_NewStringCopyZ(cx, lookup_token("FullName:Acorn Browse",0,0));
......
......@@ -1842,7 +1842,7 @@ int menus_help_release_notes(int eventcode, ToolboxEvent * event, IdBlock * idb,
*tokens = '\0';
*lasttokn = '\0';
lookup_token("Version",1,0);
lookup_token("_Version",1,0);
if (strlen(tokens) + strlen(help) + sizeof(".html") > sizeof(help)) return 0;
......
......@@ -481,7 +481,7 @@ _kernel_oserror * plugin_write_params
if (e) goto plugin_write_params_exit;
data = lookup_token("Version", 1, 0);
data = lookup_token("_Version", 1, 0);
StrNCpy0(version, data);
e = plugin_write_params_entry(fh,
......
......@@ -582,7 +582,7 @@ _kernel_oserror * save_save_uri(char * path, char * url, char * title, int write
else if (
fprintf(file,
"%s\n\n\t%s",
lookup_token("Version:(Unknown!)",0,0),
lookup_token("_Version:(Unknown!)",0,0),
url) < 0
)
{
......@@ -730,7 +730,7 @@ _kernel_oserror * save_transfer_uri(char * url, char * title, int write_url, int
written += sprintf(uri_file + written,
"%s\n\n\t%s",
lookup_token("Version:(Unknown!)",0,0),
lookup_token("_Version:(Unknown!)",0,0),
url);
written += sprintf(uri_file + written,
......@@ -840,7 +840,7 @@ int save_uri_size(char * url, char * title, int write_url)
len += strlen(lookup_token("_TaskName",1,0));
len += strlen(" v");
len += strlen(lookup_token("Version:(Unknown!)",0,0));
len += strlen(lookup_token("_Version:(Unknown!)",0,0));
len += strlen("\n\n\t");
len += strlen(url);
......
......@@ -3078,7 +3078,7 @@ void utils_build_user_agent_string(int netscape, char * buffer, int buffer_size)
*lasttokn = 0;
*tokens = 0;
lookup_token("Version",1,0);
lookup_token("_Version",1,0);
/* Just do a simple version outside of the comment field */
......
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