Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
/bin
/bin64
/obj
/src/Git.cpp
/src/RA_BuildVer.h

.vscode
14 changes: 8 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ OBJS=\
src/CdRom.o \
src/Emulator.o \
src/Fsm.o \
src/Git.o \
src/Gl.o \
src/GlUtil.o \
src/Hash.o \
Expand All @@ -110,6 +109,8 @@ ifdef HAVE_CHD
src/HashCHD.o
endif

all: $(OUTDIR)/RALibretro.exe $(OUTDIR)/SDL2.dll $(OUTDIR)/libwinpthread-1.dll

src/rcheevos/src/rc_libretro.o: CFLAGS += -I./src/libretro

src/components/Config.o: CFLAGS += -I./src/libretro
Expand All @@ -124,11 +125,15 @@ src/Hash.o: CFLAGS += -I./src/libretro
%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

src/RA_BuildVer.h: .git/HEAD
src/RAInterface/MakeBuildVer.sh src/RA_BuildVer.h "" RA_LIBRETRO

src/RA_Implementation.o: src/RA_Implementation.cpp src/RA_BuildVer.h
$(CXX) $(CXXFLAGS) -c $< -o $@

%.res: %.rc
$(RC) $< -O coff -o $@

all: $(OUTDIR)/RALibretro.exe $(OUTDIR)/SDL2.dll $(OUTDIR)/libwinpthread-1.dll

$(OUTDIR)/SDL2.dll: $(SDLLIBDIR)/SDL2.dll
cp -f $< $@

Expand All @@ -139,9 +144,6 @@ $(OUTDIR)/RALibretro.exe: $(OBJS)
mkdir -p $(OUTDIR)
$(CXX) -o $@ $+ $(LDFLAGS)

src/Git.cpp: etc/Git.cpp.template FORCE
cat $< | sed s/GITFULLHASH/`git rev-parse HEAD | tr -d "\n"`/g | sed s/GITMINIHASH/`git rev-parse HEAD | tr -d "\n" | cut -c 1-7`/g | sed s/GITRELEASE/`git describe --tags | sed s/\-.*//g | tr -d "\n"`/g > $@

zip:
rm -f $(OUTDIR)/RALibretro-*.zip RALibretro-*.zip
zip -9 RALibretro-`git describe | tr -d "\n"`.zip $(OUTDIR)/RALibretro.exe
Expand Down
12 changes: 7 additions & 5 deletions Makefile.RAHasher
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ OBJS=\
src/rcheevos/src/rhash/hash_rom.o \
src/rcheevos/src/rhash/hash_zip.o \
src/rcheevos/src/rhash/md5.o \
src/Git.o \
src/Hash3DS.o \
src/Util.o \
src/RAHasher.o
Expand All @@ -47,21 +46,24 @@ ifdef HAVE_CHD
src/HashCHD.o
endif

all: $(OUTDIR)/RAHasher$(EXE)

%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@

%.o: %.c
$(CC) $(CFLAGS) -c $< -o $@

all: $(OUTDIR)/RAHasher$(EXE)
src/RA_BuildVer.h: .git/HEAD
src/RAInterface/MakeBuildVer.sh src/RA_BuildVer.h "" RA_LIBRETRO

src/RAHasher.o: src/RAHasher.cpp src/RA_BuildVer.h
$(CXX) $(CXXFLAGS) -c $< -o $@

$(OUTDIR)/RAHasher$(EXE): $(OBJS)
mkdir -p $(OUTDIR)
$(CXX) -o $@ $+ $(LDFLAGS)

src/Git.cpp: etc/Git.cpp.template FORCE
cat $< | sed s/GITFULLHASH/`git rev-parse HEAD | tr -d "\n"`/g | sed s/GITMINIHASH/`git rev-parse HEAD | tr -d "\n" | cut -c 1-7`/g | sed s/GITRELEASE/`git describe --tags | sed s/\-.*//g | tr -d "\n"`/g > $@

zip: $(OUTDIR)/RAHasher$(EXE)
rm -f $(OUTDIR)/RAHasher-*.zip RAHasher-*.zip
zip -9 RAHasher-$(ARCH)-$(KERNEL)-`git describe --tags | sed s/\-.*//g | tr -d "\n"`.zip $(OUTDIR)/RAHasher$(EXE)
Expand Down
35 changes: 0 additions & 35 deletions etc/Git.cpp.template

This file was deleted.

47 changes: 0 additions & 47 deletions etc/MakeGitCpp.bat

This file was deleted.

8 changes: 4 additions & 4 deletions src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ along with RALibretro. If not, see <http://www.gnu.org/licenses/>.
*/

#include "Application.h"
#include "Git.h"
#include "RA_BuildVer.h"

#include <SDL_syswm.h>

Expand Down Expand Up @@ -109,11 +109,11 @@ bool Application::init(const char* title, int width, int height)
inited = kLoggerInited;

#if defined(_M_X64) || defined(__amd64__)
_logger.info(TAG "RALibretro version %s-x64 starting", git::getReleaseVersion());
_logger.info(TAG "RALibretro version %s-x64 starting", RA_LIBRETRO_VERSION);
#else
_logger.info(TAG "RALibretro version %s starting", git::getReleaseVersion());
_logger.info(TAG "RALibretro version %s starting", RA_LIBRETRO_VERSION);
#endif
_logger.info(TAG "RALibretro commit hash is %s", git::getFullHash());
_logger.info(TAG "RALibretro commit hash is %s", RA_LIBRETRO_VERSION_COMMIT_HASH);

{
const time_t now_timet = time(0);
Expand Down
27 changes: 0 additions & 27 deletions src/Git.h

This file was deleted.

4 changes: 2 additions & 2 deletions src/RAHasher.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// RAHasher.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include "Git.h"
#include "RA_BuildVer.h"
#include "Util.h"

#include <rcheevos/include/rc_hash.h>
Expand Down Expand Up @@ -33,7 +33,7 @@ void initHash3DS(const std::string& systemDir); /* in Hash3DS.cpp */

static void usage(const char* appname)
{
printf("RAHasher %s\n====================\n", git::getReleaseVersion());
printf("RAHasher %s\n====================\n", RA_LIBRETRO_VERSION_SHORT);

printf("Usage: %s [-v] [-s systempath] systemid filepath\n", util::fileName(appname).c_str());
printf("\n");
Expand Down
1 change: 0 additions & 1 deletion src/RAHasher.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="components\Logger.cpp" />
<ClCompile Include="Git.cpp" />
<ClCompile Include="HashCHD.cpp" />
<ClCompile Include="Hash3DS.cpp" />
<ClCompile Include="libmincrypt/sha256.c" />
Expand Down
3 changes: 0 additions & 3 deletions src/RAHasher.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@
<ClCompile Include="components\Logger.cpp">
<Filter>Source Files\RALibRetro</Filter>
</ClCompile>
<ClCompile Include="Git.cpp">
<Filter>Source Files\RALibRetro</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rhash\md5.c">
<Filter>Source Files\rhash</Filter>
</ClCompile>
Expand Down
10 changes: 5 additions & 5 deletions src/RALibretro.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<AdditionalDependencies>SDL2main.lib;SDL2.lib;dinput8.lib;winmm.lib;imm32.lib;version.lib;winhttp.lib;opengl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PreBuildEvent>
<Command>$(ProjectDir)..\etc\MakeGitCpp.bat</Command>
<Command>$(ProjectDir)RAInterface\MakeBuildVer.bat $(ProjectDir)\RA_BuildVer.h "" RA_LIBRETRO</Command>
</PreBuildEvent>
<CustomBuildStep>
<Command>copy /b/y $(TargetPath) $(SolutionDir)\bin</Command>
Expand Down Expand Up @@ -111,7 +111,7 @@ $(ProjectDir)RAInterface\CopyOverlay.bat $(SolutionDir)bin</Command>
<Message>Copying $(TargetFileName) to bin directory</Message>
</CustomBuildStep>
<PreBuildEvent>
<Command>$(ProjectDir)..\etc\MakeGitCpp.bat</Command>
<Command>$(ProjectDir)RAInterface\MakeBuildVer.bat $(ProjectDir)\RA_BuildVer.h "" RA_LIBRETRO</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>$(SolutionDir)etc\CopyDLLs.bat x86 $(ProjectDir) $(SolutionDir)bin
Expand Down Expand Up @@ -140,7 +140,7 @@ $(ProjectDir)RAInterface\CopyOverlay.bat $(SolutionDir)bin</Command>
<Message>Copying $(TargetFileName) to bin64 directory</Message>
</CustomBuildStep>
<PreBuildEvent>
<Command>$(ProjectDir)..\etc\MakeGitCpp.bat</Command>
<Command>$(ProjectDir)RAInterface\MakeBuildVer.bat $(ProjectDir)\RA_BuildVer.h "" RA_LIBRETRO</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>xcopy /D /Q /Y $(SolutionDir)bin\Cores\cores.json $(SolutionDir)bin64\Cores\
Expand Down Expand Up @@ -172,7 +172,7 @@ $(ProjectDir)RAInterface\CopyOverlay.bat $(SolutionDir)\bin64</Command>
<Message>Copying $(TargetFileName) to bin64 directory</Message>
</CustomBuildStep>
<PreBuildEvent>
<Command>$(ProjectDir)..\etc\MakeGitCpp.bat</Command>
<Command>$(ProjectDir)RAInterface\MakeBuildVer.bat $(ProjectDir)\RA_BuildVer.h "" RA_LIBRETRO</Command>
</PreBuildEvent>
<PostBuildEvent>
<Command>xcopy /D /Q /Y $(SolutionDir)bin\Cores\cores.json $(SolutionDir)bin64\Cores\
Expand All @@ -197,7 +197,6 @@ $(ProjectDir)RAInterface\CopyOverlay.bat $(SolutionDir)\bin64</Command>
<ClCompile Include="dynlib\dynlib.c" />
<ClCompile Include="Emulator.cpp" />
<ClCompile Include="Fsm.cpp" />
<ClCompile Include="Git.cpp" />
<ClCompile Include="Gl.cpp" />
<ClCompile Include="GlUtil.cpp" />
<ClCompile Include="Hash.cpp">
Expand Down Expand Up @@ -260,6 +259,7 @@ $(ProjectDir)RAInterface\CopyOverlay.bat $(SolutionDir)\bin64</Command>
<ClInclude Include="libretro\Components.h" />
<ClInclude Include="libretro\Core.h" />
<ClInclude Include="libretro\libretro.h" />
<ClInclude Include="RA_BuildVer.h" />
<ClInclude Include="rcheevos\include\rcheevos.h" />
<ClInclude Include="rcheevos\include\rc_consoles.h" />
<ClInclude Include="Util.h" />
Expand Down
6 changes: 3 additions & 3 deletions src/RALibretro.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@
<ClCompile Include="RA_Implementation.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Git.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GlUtil.cpp">
<Filter>Source Files</Filter>
</ClCompile>
Expand Down Expand Up @@ -257,6 +254,9 @@
<ClInclude Include="rcheevos\include\rc_consoles.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="RA_BuildVer.h">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="menu.rc">
Expand Down
4 changes: 2 additions & 2 deletions src/RA_Implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include <windows.h>

#include "Git.h"
#include "RA_BuildVer.h"

extern HWND g_mainWindow;

Expand Down Expand Up @@ -98,7 +98,7 @@ void LoadROM(const char* sFullPath)
void RA_Init(HWND hWnd)
{
// initialize the DLL
RA_Init(hWnd, RA_Libretro, git::getReleaseVersion());
RA_Init(hWnd, RA_Libretro, RA_LIBRETRO_VERSION_FULL);

// provide callbacks to the DLL
RA_InstallSharedFunctions(NULL, &CauseUnpause, &CausePause, &RebuildMenu, &GetEstimatedGameTitle, &ResetEmulation, &LoadROM);
Expand Down
Loading