-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#/***************************************************************************** | ||
# | ||
# CartelMania | ||
# Copyright(C) 2017 Hernán Di Pietro | ||
# | ||
# This program is free software : you can redistribute it and / or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program.If not, see < http://www.gnu.org/licenses/>. | ||
# | ||
#****************************************************************************/ | ||
|
||
# Version stamping script | ||
# | ||
# | ||
# The script should stamp "revision" field with the number days elapsed from | ||
# 1, January, 2017. | ||
# | ||
# Build number will be set to the minute of the day in which the build | ||
# was made (0-1440). | ||
# | ||
|
||
$timespan = (new-timespan -end (get-date -year 2017 -month 1 -day 1)); | ||
$hour = Get-Date -UFormat %H; | ||
$mins = Get-Date -UFormat %M; | ||
$todaymins = $hour.ToInt32($Null) * 60 + $mins.Toint32($Null) | ||
|
||
$filetext = Get-Content -Path "..\src\version.h" -ErrorAction Stop; | ||
$build = "#define _BUILDPLACEHOLDER " + $todaymins; | ||
$rev = "#define _REVPLACEHOLDER " + -$timespan.Days; | ||
$filetext = $filetext -replace "#define _BUILDPLACEHOLDER [ 0-9]*$", $build; | ||
$filetext = $filetext -replace "#define _REVPLACEHOLDER [ 0-9]*$", $rev; | ||
|
||
Set-Content -Path "..\src\version.h" -Value $filetext -ErrorAction Stop; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#pragma once | ||
/***************************************************************************** | ||
CartelMania | ||
Copyright(C) 2017 Hernán Di Pietro | ||
This program is free software : you can redistribute it and / or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program.If not, see < http://www.gnu.org/licenses/>. | ||
*****************************************************************************/ | ||
|
||
/** Version Data -- this file is processed by VerStamp.ps1 Pre-build step | ||
on release configurations by stamping data on _REVPLACEHOLDER and | ||
_BUILDPLACEHOLDER definitions. Do not mess this! | ||
Initial value should be 9999,0. | ||
The script should stamp "revision" field with year/month/day. Month | ||
in hex (0-C), e.g: for 2017-11-30: 17B30. | ||
Build number will be set to the minute of the day in which the build | ||
was made (0-1440). | ||
See verstamp.ps1 script in pre-build step for details. | ||
**/ | ||
|
||
|
||
#define _REVPLACEHOLDER 196 | ||
#define _BUILDPLACEHOLDER 1230 | ||
|
||
// --------------------------------------------------------------------------- | ||
#define CMANIA_VERSION_MAJOR 0 | ||
#define CMANIA_VERSION_MINOR 5 | ||
#define CMANIA_VERSION_REV _REVPLACEHOLDER | ||
#define CMANIA_VERSION_BUILD _BUILDPLACEHOLDER | ||
// --------------------------------------------------------------------------- | ||
|