Commit 827caae7 authored by Ben Avison's avatar Ben Avison
Browse files

New script for copying version numbers into apps

  Change from James Lampard:
    Several components that build desktop apps have an awk script in their
    build directory, to copy the version number from the VersionNum file into
    their final Messages file.
    Many other desktop app components currently do nothing, and rely on their
    messages file/templates being changed manually.
    It would obviously be superior to have a single script that all
    components could use in a central location. This is that script.
  Also fixed the perl scripts so they use a standard shebang (#!/usr/bin/env
  perl) before rather than after the licence header, as this is a technical
  requirement of shebangs on some systems.
  Tested on RiscPC RO402, with modified ChangeFSI, Maestro & Alarm

Version 1.32. Tagged as 'Library-1_32'
parent cfdb55a9
#!/usr/bin/env awk
# Copyright 2009 Castle Technology Ltd
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# See the License for the specific language governing permissions and
# limitations under the License.
# Change _Version token in Messages file
# to Module_HelpVersion in VersionNum file
while (getline < "VersionNum" > 0) {
split($0, Version)
if (Version[2] == "Module_HelpVersion") {
split($0, VString, "\"")
/^_Version/ { printf("_Version:%s\n", VString[2]); done = 1; next; }
{ print }
if (!done) {
printf("_Version:%s\n", VString[2]);
/* (1.31)
/* (1.32)
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.2.
* Last processed by srccommit version: 1.1.
#define Module_MajorVersion_CMHG 1.31
#define Module_MajorVersion_CMHG 1.32
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 24 Apr 2008
#define Module_Date_CMHG 07 Jun 2009
#define Module_MajorVersion "1.31"
#define Module_Version 131
#define Module_MajorVersion "1.32"
#define Module_Version 132
#define Module_MinorVersion ""
#define Module_Date "24 Apr 2008"
#define Module_Date "07 Jun 2009"
#define Module_ApplicationDate "24-Apr-08"
#define Module_ApplicationDate "07-Jun-09"
#define Module_ComponentName "Library"
#define Module_ComponentPath "RiscOS/Library"
#define Module_ComponentPath "mixed/RiscOS/Library"
#define Module_FullVersion "1.31"
#define Module_HelpVersion "1.31 (24 Apr 2008)"
#define Module_LibraryVersionInfo "1:31"
#define Module_FullVersion "1.32"
#define Module_HelpVersion "1.32 (07 Jun 2009)"
#define Module_LibraryVersionInfo "1:32"
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