Skip to content

Commit b0f1bc2

Browse files
committed
Add VersionNum file to describe the release.
The standard style of VersionNum file can be used to give a programatically extractable version number in most tools. This is common in most RISC OS sources in some form. Tools such as the old RISC OS 'srccommit' tool, my own 'commit' tool, and more recently the 'riscos-vmanage' tool all use this format. The syntax output has been updated to match RISC OS tools better, including correcting the capitalisation of the tool.
1 parent 81b7f02 commit b0f1bc2

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

src/VersionNum

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* WakeOnLAN (0.02) 01:13:55 12/12/2022
2+
*
3+
* This file is automatically maintained by vmanage, do not edit manually.
4+
*
5+
*/
6+
#define Module_MajorVersion_CMHG 0.02
7+
#define Module_MinorVersion_CMHG
8+
#define Module_Date_CMHG 12 Dec 2022
9+
10+
#define Module_MajorVersion "0.02"
11+
#define Module_Version 2
12+
#define Module_MinorVersion ""
13+
#define Module_Date "12 Dec 2022"
14+
15+
#define Module_ApplicationDate2 "12-Dec-22"
16+
#define Module_ApplicationDate4 "12-Dec-2022"
17+
18+
#define Module_ComponentName "WakeOnLAN"
19+
#define Module_ComponentBranch ""
20+
#define Module_ComponentPath "WakeOnLAN"
21+
22+
#define Module_FullVersion "0.02"
23+
#define Module_FullVersionAndDate "0.02 (12 Dec 2022)"
24+
#define Module_HelpVersion "0.02 (12 Dec 2022)"

src/c/main

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/*
22
* WakeOnLAN command for RISC OS
33
*
4-
* release 0.1
54
* Copyright 2004 by Paolo Fabio Zaino
65
*
76
* Redistribution and use in source and binary forms, with or without
@@ -61,6 +60,8 @@
6160
char *__progname = "WakeOnLan";
6261
#endif
6362

63+
#include "VersionNum"
64+
6465
#include "magic.h"
6566

6667
static verbose_output = 0;
@@ -71,7 +72,8 @@ int sendMagicPacket(unsigned int mac[6], const char *broadcastAddress);
7172

7273
void show_syntax()
7374
{
74-
printf("Syntax: *wakeonlan -m <mac address> [ -b <broadcast address> ] [-v]\n");
75+
printf("WakeOnLAN %s\n", Module_FullVersionAndDate);
76+
printf("Syntax: *WakeOnLAN -m <mac address> [ -b <broadcast address> ] [-v]\n");
7577
printf(" Where <mac address> has to be the MAC of the device you want to wake up. (MAC syntax: 01:02:03:04:05:06)\n");
7678
printf(" And <broadcast address> is a valid broadcast address for you LAN. (broadcast syntax: xxx.yyy.hhh.zzz\n");
7779
printf(" -v specify you want verbose output\n");

0 commit comments

Comments
 (0)