Navigation Menu

Skip to content

Commit

Permalink
#5662: Set up linker options and install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Jul 4, 2021
1 parent 61ae4a9 commit b0caa9b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions plugins/vcs/GitModule.cpp
@@ -1,5 +1,8 @@
#include "GitModule.h"

#include "igame.h"
#include "git2/repository.h"

namespace vcs
{

Expand All @@ -19,6 +22,17 @@ void GitModule::initialiseModule(const IApplicationContext& ctx)
{
rMessage() << getName() << "::initialiseModule called." << std::endl;

auto modPath = GlobalGameManager().getModPath();
git_repository* repository;

if (git_repository_open(&repository, modPath.c_str()) == 0)
{
rMessage() << "Opened repository at " << modPath << std::endl;
}
else
{
rMessage() << "Failed to open repository at " << modPath << std::endl;
}
}

void GitModule::shutdownModule()
Expand Down
1 change: 1 addition & 0 deletions tools/msvc/post_build_event.cmd
Expand Up @@ -2,6 +2,7 @@ for %%i in (..\..\install\*.dll) do if not "%%~nxi"=="DarkRadiantCore.dll" del "

del ..\..\install\python*.zip

copy ..\..\w32deps\libgit2\bin\git2.dll ..\..\install /Y
copy ..\..\w32deps\openal\bin\OpenAL32.dll ..\..\install /Y
copy ..\..\w32deps\openal\bin\wrap_oal.dll ..\..\install /Y
copy ..\..\w32deps\glew\bin\glew32.dll ..\..\install /Y
Expand Down
1 change: 1 addition & 0 deletions tools/msvc/post_build_event_x64.cmd
Expand Up @@ -2,6 +2,7 @@ for %%i in (..\..\install\*.dll) do if not "%%~nxi"=="DarkRadiantCore.dll" del "

del ..\..\install\python*.zip

copy ..\..\w64deps\libgit2\bin\git2.dll ..\..\install /Y
copy ..\..\w64deps\openal\bin\OpenAL32.dll ..\..\install /Y
copy ..\..\w64deps\openal\bin\wrap_oal.dll ..\..\install /Y
copy ..\..\w64deps\glew\bin\glew32.dll ..\..\install /Y
Expand Down
4 changes: 4 additions & 0 deletions tools/msvc/properties/libgit2.props
Expand Up @@ -7,6 +7,10 @@
<ClCompile>
<AdditionalIncludeDirectories>$(W32DepsDir)libgit2\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>git2.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(PlatformDepsDir)\libgit2\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>
16 changes: 16 additions & 0 deletions tools/msvc/vcs.vcxproj
Expand Up @@ -105,6 +105,10 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
Expand All @@ -121,6 +125,10 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
Expand All @@ -133,6 +141,10 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
Expand All @@ -149,6 +161,10 @@
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\plugins\vcs\GitModule.cpp" />
Expand Down

0 comments on commit b0caa9b

Please sign in to comment.