Skip to content
This repository has been archived by the owner on Sep 8, 2019. It is now read-only.

Commit

Permalink
Added versioning to RAGens
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Davies authored and Scott Davies committed Apr 7, 2015
1 parent 8f4c33e commit 22f077a
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Expand Up @@ -238,3 +238,6 @@
/bizhawk/RAInterface/Diffs.txt
/bizhawk/RAInterface/LiveTag.txt
/BuildVer.cs
/BuildVer.h
/RAGens/win32/Diffs.txt
/RAGens/win32/LiveTag.txt
1 change: 1 addition & 0 deletions RAGens/common/src/G_main.cpp
Expand Up @@ -7,6 +7,7 @@
#include <string.h>

// ##RA
#include "BuildVer.h"
#include "RA_Resource.h"
#include "RA_Interface.h"
#include "RA_Implementation.h"
Expand Down
15 changes: 15 additions & 0 deletions RAGens/win32/MakeBuildVer.bat
@@ -0,0 +1,15 @@
@echo off

git describe --tags --long > LiveTag.txt
@set /p ACTIVE_TAG=<LiveTag.txt

git diff HEAD > Diffs.txt
@set /p RAW_DIFFS_FOUND=<Diffs.txt

setlocal
REM set file=
@for /F "usebackq" %%A in ('"Diffs.txt"') do set DIFF_FILE_SIZE=%%~zA
@if %DIFF_FILE_SIZE% GTR 0 set ACTIVE_TAG=Unstaged Changes

@echo Tag: %ACTIVE_TAG%
@echo #define RAGENS_VERSION "%ACTIVE_TAG%" > ../../BuildVer.h
5 changes: 5 additions & 0 deletions RAGens/win32/Makefile
Expand Up @@ -23,6 +23,8 @@ POSTBUILD=copy $(SRC_RA)\RA_Integration.dll . && copy $(SRC_RA)\*.pdb .
POSTBUILD=copy $(SRC_RA)\RA_Integration_d.dll . && copy $(SRC_RA)\*.pdb .
!ENDIF

PREBUILD=MakeBuildVer.bat

!IF [if not exist $(GENSPATH) mkdir $(GENSPATH)]
!ERROR Could not create path "$(GENSPATH)".
!ENDIF
Expand Down Expand Up @@ -160,6 +162,9 @@ STARSCREAM_LIBS = \
odbc32.lib \
odbccp32.lib

all:
$(PREBUILD)

gens: $(GENSPATH)\RAGens.exe
copy /Y $(SRCCOMMONPATH)\license.txt $(GENSPATH)\LICENSE.txt
$(POSTBUILD)
Expand Down
2 changes: 1 addition & 1 deletion RA_Integration/RA_Defs.h
Expand Up @@ -18,7 +18,7 @@
#ifndef RA_EXPORTS

//NB. These must ONLY accessible from the emulator!
#define RAGENS_VERSION "0.051"
//#define RAGENS_VERSION "0.051"
#define RASNES9X_VERSION "0.016"
#define RAVBA_VERSION "0.019"
#define RANES_VERSION "0.009"
Expand Down
2 changes: 1 addition & 1 deletion RA_Integration/RA_Dlg_Achievement.cpp
Expand Up @@ -95,7 +95,7 @@ LRESULT ProcessCustomDraw( LPARAM lParam )
{
int nNextItem = (int)lplvcd->nmcd.dwItemSpec;

if( nNextItem < g_pActiveAchievements->NumAchievements() )
if( static_cast<size_t>( nNextItem ) < g_pActiveAchievements->NumAchievements() )
{
//if (((int)lplvcd->nmcd.dwItemSpec%2)==0)
BOOL bSelected = &g_pActiveAchievements->GetAchievement( nNextItem ) == g_AchievementEditorDialog.ActiveAchievement();
Expand Down

0 comments on commit 22f077a

Please sign in to comment.