forked from CnCNet/xna-cncnet-client
-
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
821 changed files
with
301,108 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,19 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto | ||
* eol=crlf | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.sln text eol=crlf | ||
*.cs text eol=crlf | ||
*.csproj text eol=crlf | ||
*.manifest text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.jpg binary | ||
*.dll binary | ||
*.pdb binary | ||
|
||
# Shell scripts | ||
*.sh text eof=lf | ||
|
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,27 @@ | ||
.project | ||
|
||
# Visual Studion tiedostoja | ||
*/[Ee]xported[Oo]bj/ | ||
*.booproj | ||
*.pidb | ||
*.suo | ||
*.svd | ||
*.user | ||
*.userprefs | ||
bin/ | ||
obj/ | ||
.vs/ | ||
Compiled/ | ||
Compiled*/ | ||
|
||
# Käyttiksen (Mac ja win) tekemiä tiedostoja joita jättää pois | ||
._* | ||
.DS_Store* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Icon? | ||
[Tt]humbs.db | ||
|
||
# Dolphin | ||
.directory |
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,44 @@ | ||
@echo off | ||
rem Compiles the client with a specific configuration for a specific platform | ||
|
||
if [%1]==[] goto argfail | ||
if [%2]==[] goto argfail | ||
|
||
set configuration=%1 | ||
set platform=%2 | ||
|
||
call FindMSBuild | ||
|
||
if exist "%msbuild%" goto msbuildok | ||
ECHO. | ||
ECHO. | ||
echo Visual Studio 2017, Visual Studio 2019 or MSBuild required. | ||
ECHO. | ||
ECHO. | ||
goto error | ||
|
||
:msbuildok | ||
|
||
ECHO. | ||
echo Compiling %configuration% %platform% | ||
ECHO. | ||
|
||
"%msbuild%" ..\DXClient.sln /t:Rebuild /p:Platform=%platform% /p:Configuration=%configuration% | ||
if errorlevel 1 goto error | ||
|
||
ECHO. | ||
echo Compiled succesfully. | ||
ECHO. | ||
|
||
goto end | ||
|
||
:argfail | ||
echo Syntax: %0% (configuration) (platform) (example: %0% DTARelease SharpDX) | ||
goto error | ||
|
||
:error | ||
endlocal | ||
exit /B 1 | ||
|
||
:end | ||
endlocal |
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,4 @@ | ||
@echo off | ||
|
||
call BuildGame DTARelease | ||
|
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,31 @@ | ||
@echo off | ||
rem Compiles the client for a specific configuration (game) for all platforms. | ||
|
||
if [%1]==[] goto argfail | ||
set configuration=%1 | ||
|
||
echo Compiling client for %configuration% | ||
|
||
call Build %configuration% SharpDX | ||
call Build %configuration% WindowsGL | ||
call Build %configuration% XNAFramework | ||
|
||
if errorlevel 1 goto error | ||
|
||
call CopyCompiled | ||
|
||
echo Compiling complete. | ||
pause | ||
|
||
goto end | ||
|
||
:argfail | ||
echo Syntax: %0% (configuration) (example: %0% DTARelease) | ||
goto error | ||
|
||
:error | ||
endlocal | ||
exit /B 1 | ||
|
||
:end | ||
endlocal |
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,4 @@ | ||
@echo off | ||
|
||
call BuildGame MORelease | ||
|
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,4 @@ | ||
@echo off | ||
|
||
call BuildGame TIRelease | ||
|
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,4 @@ | ||
@echo off | ||
|
||
call BuildGame TSRelease | ||
|
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,5 @@ | ||
@echo off | ||
|
||
call BuildGame YRRelease | ||
pause | ||
|
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,79 @@ | ||
@echo off | ||
echo Taking binaries compiled using Visual Studio and putting them into correct folders with the correct names for use in target projects. | ||
echo( | ||
cd .. | ||
rd /s /q Compiled | ||
mkdir Compiled | ||
cd Compiled | ||
mkdir Binaries | ||
cd Binaries | ||
mkdir OpenGL | ||
mkdir Windows | ||
mkdir XNA | ||
cd OpenGL | ||
mkdir x86 | ||
cd .. | ||
|
||
REM Setting up paths | ||
|
||
set cr="..\..\..\..\Compiled\" | ||
set commonBinaries="..\..\..\..\Compiled\Binaries\" | ||
set winBinaries="..\..\..\..\Compiled\Binaries\Windows\" | ||
set oglBinaries="..\..\..\..\Compiled\Binaries\OpenGL\" | ||
set xnaBinaries="..\..\..\..\Compiled\Binaries\XNA\" | ||
|
||
echo( | ||
echo Windows | ||
|
||
cd ..\..\DXMainClient\bin\Windows\Release\ | ||
copy DTAClient.exe %cr%clientdx.exe | ||
copy ClientCore.dll %winBinaries%ClientCore.dll | ||
copy ClientGUI.dll %winBinaries%ClientGUI.dll | ||
copy DTAConfig.dll %winBinaries%DTAConfig.dll | ||
copy Rampastring.XNAUI.dll %winBinaries%Rampastring.XNAUI.dll | ||
copy MonoGame.Framework.dll %winBinaries%MonoGame.Framework.dll | ||
copy SharpDX.Direct2D1.dll %winBinaries%SharpDX.Direct2D1.dll | ||
copy SharpDX.Direct3D11.dll %winBinaries%SharpDX.Direct3D11.dll | ||
copy SharpDX.dll %winBinaries%SharpDX.dll | ||
copy SharpDX.DXGI.dll %winBinaries%SharpDX.DXGI.dll | ||
copy SharpDX.MediaFoundation.dll %winBinaries%SharpDX.MediaFoundation.dll | ||
copy IMEHelper.Window.dll %winBinaries%IMEHelper.Window.dll | ||
|
||
copy SharpDX.XAudio2.dll %winBinaries%SharpDX.XAudio2.dll | ||
copy SharpDX.XInput.dll %winBinaries%SharpDX.XInput.dll | ||
|
||
echo OpenGL | ||
|
||
cd ..\..\WindowsGL\Release\ | ||
copy DTAClient.exe %cr%clientogl.exe | ||
copy ClientCore.dll %oglBinaries%ClientCore.dll | ||
copy ClientGUI.dll %oglBinaries%ClientGUI.dll | ||
copy DTAConfig.dll %oglBinaries%DTAConfig.dll | ||
copy MonoGame.Framework.dll %oglBinaries%MonoGame.Framework.dll | ||
copy ..\..\..\..\References\WindowsGL\x86\SDL2.dll %oglBinaries%x86\SDL2.dll | ||
copy ..\..\..\..\References\WindowsGL\x86\soft_oal.dll %oglBinaries%x86\soft_oal.dll | ||
|
||
copy Rampastring.XNAUI.dll %oglBinaries%Rampastring.XNAUI.dll | ||
|
||
echo XNA | ||
|
||
cd ..\..\XNAFramework\Release\ | ||
copy DTAClient.exe %cr%clientxna.exe | ||
copy ClientCore.dll %xnaBinaries%ClientCore.dll | ||
copy ClientGUI.dll %xnaBinaries%ClientGUI.dll | ||
copy DTAConfig.dll %xnaBinaries%DTAConfig.dll | ||
|
||
copy Rampastring.XNAUI.dll %xnaBinaries%Rampastring.XNAUI.dll | ||
|
||
echo Common | ||
|
||
copy DTAUpdater.dll %commonBinaries%DTAUpdater.dll | ||
copy Ionic.Zip.dll %commonBinaries%Ionic.Zip.dll | ||
copy MapThumbnailExtractor.dll %commonBinaries%MapThumbnailExtractor.dll | ||
copy Rampastring.Tools.dll %commonBinaries%Rampastring.Tools.dll | ||
copy Newtonsoft.Json.dll %commonBinaries%Newtonsoft.Json.dll | ||
copy Localization.dll %commonBinaries%Localization.dll | ||
copy DiscordRPC.dll %commonBinaries%DiscordRPC.dll | ||
|
||
echo( | ||
echo Copying complete. |
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,41 @@ | ||
rem @echo off | ||
|
||
SET msbuild="" | ||
|
||
for /f "usebackq tokens=1* delims=: " %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild`) do ( | ||
if /i "%%i"=="installationPath" set InstallDir=%%j | ||
) | ||
|
||
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" ( | ||
SET "msbuild=%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" ( | ||
SET "msbuild=%InstallDir%\MSBuild\Current\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" ( | ||
SET "msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" ( | ||
SET "msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" ( | ||
SET "msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" ( | ||
SET "msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" ( | ||
SET "msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe" | ||
) | ||
|
||
if exist "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" ( | ||
SET "msbuild=%ProgramFiles(x86)%\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\MSBuild.exe" | ||
) | ||
|
||
ENDLOCAL&set msbuild=%msbuild% |
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,82 @@ | ||
#/bin/sh | ||
set -x | ||
|
||
function build() | ||
{ | ||
platform=$1 | ||
configuration=$2 | ||
|
||
msbuild ../DXClient.sln /t:Rebuild /p:Platform=$platform /p:Configuration=$configuration | ||
} | ||
|
||
function copyCompiled() | ||
{ | ||
arg=$1 | ||
|
||
mkdir -p ../Compiled${arg}/Binaries/OpenGL/x86 | ||
mkdir -p ../Compiled${arg}/Binaries/Windows | ||
mkdir -p ../Compiled${arg}/Binaries/XNA | ||
|
||
cp ../DXMainClient/bin/Windows/Release/DTAClient.exe ../Compiled${arg}/clientdx.exe | ||
cp ../DXMainClient/bin/Windows/Release/ClientCore.dll ../Compiled${arg}/Binaries/Windows/ | ||
cp ../DXMainClient/bin/Windows/Release/ClientGUI.dll ../Compiled${arg}/Binaries/Windows/ | ||
cp ../DXMainClient/bin/Windows/Release/DTAConfig.dll ../Compiled${arg}/Binaries/Windows/ | ||
|
||
cp ../DXMainClient/bin/Windows/Release/Rampastring.XNAUI.dll ../Compiled${arg}/Binaries/Windows/ | ||
cp ../DXMainClient/bin/Windows/Release/MonoGame.Framework.dll ../Compiled${arg}/Binaries/Windows/MonoGame.Framework.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.Direct2D1.dll ../Compiled${arg}/Binaries/Windows/SharpDX.Direct2D1.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.Direct3D11.dll ../Compiled${arg}/Binaries/Windows/SharpDX.Direct3D11.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.dll ../Compiled${arg}/Binaries/Windows/SharpDX.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.DXGI.dll ../Compiled${arg}/Binaries/Windows/SharpDX.DXGI.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.MediaFoundation.dll ../Compiled${arg}/Binaries/Windows/SharpDX.MediaFoundation.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.XAudio2.dll ../Compiled${arg}/Binaries/Windows/SharpDX.XAudio2.dll | ||
cp ../DXMainClient/bin/Windows/Release/SharpDX.XInput.dll ../Compiled${arg}/Binaries/Windows/SharpDX.XInput.dll | ||
|
||
cp ../DXMainClient/bin/WindowsGL/Release/DTAClient.exe ../Compiled${arg}/clientogl.exe | ||
cp ../DXMainClient/bin/WindowsGL/Release/ClientCore.dll ../Compiled${arg}/Binaries/OpenGL/ | ||
cp ../DXMainClient/bin/WindowsGL/Release/ClientGUI.dll ../Compiled${arg}/Binaries/OpenGL/ | ||
cp ../DXMainClient/bin/WindowsGL/Release/DTAConfig.dll ../Compiled${arg}/Binaries/OpenGL/ | ||
cp ../DXMainClient/bin/WindowsGL/Release/MonoGame.Framework.dll ../Compiled${arg}/Binaries/OpenGL/ | ||
cp ../DXMainClient/bin/WindowsGL/Release/Rampastring.XNAUI.dll ../Compiled${arg}/Binaries/OpenGL/ | ||
cp ../References/WindowsGL/x86/SDL2.dll ../Compiled${arg}/Binaries/OpenGL/x86/ | ||
cp ../References/WindowsGL/x86/soft_oal.dll ../Compiled${arg}/Binaries/OpenGL/x86/ | ||
|
||
cp ../DXMainClient/bin/XNAFramework/Release/DTAClient.exe ../Compiled${arg}/clientxna.exe | ||
cp ../DXMainClient/bin/XNAFramework/Release/ClientCore.dll ../Compiled${arg}/Binaries/XNA/ | ||
cp ../DXMainClient/bin/XNAFramework/Release/ClientGUI.dll ../Compiled${arg}/Binaries/XNA/ | ||
cp ../DXMainClient/bin/XNAFramework/Release/DTAConfig.dll ../Compiled${arg}/Binaries/XNA/ | ||
cp ../DXMainClient/bin/XNAFramework/Release/Rampastring.XNAUI.dll ../Compiled${arg}/Binaries/XNA/ | ||
|
||
cp ../References/DTAUpdater.dll ../Compiled${arg}/Binaries/ | ||
cp ../References/Ionic.Zip.dll ../Compiled${arg}/Binaries/ | ||
cp ../References/MapThumbnailExtractor.dll ../Compiled${arg}/Binaries/ | ||
cp ../References/Rampastring.Tools.dll ../Compiled${arg}/Binaries/ | ||
} | ||
|
||
|
||
case $1 in | ||
DTA) | ||
build SharpDX DTARelease | ||
build WindowsGL DTARelease | ||
build XNAFramework DTARelease | ||
copyCompiled DTA | ||
;; | ||
TI) | ||
build SharpDX TIRelease | ||
build WindowsGL TIRelease | ||
build XNAFramework TIRelease | ||
copyCompiled TI | ||
;; | ||
YR) | ||
build SharpDX YRRelease | ||
build WindowsGL YRRelease | ||
build XNAFramework YRRelease | ||
copyCompiled YR | ||
;; | ||
MO) | ||
build SharpDX MORelease | ||
build WindowsGL MORelease | ||
build XNAFramework MORelease | ||
copyCompiled MO | ||
;; | ||
esac |
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,36 @@ | ||
using Rampastring.Tools; | ||
using System.IO; | ||
|
||
namespace ClientCore | ||
{ | ||
public class CCIniFile : IniFile | ||
{ | ||
public CCIniFile(string path) : base(path) | ||
{ | ||
|
||
} | ||
|
||
protected override void ApplyBaseIni() | ||
{ | ||
string basedOn = GetStringValue("INISystem", "BasedOn", string.Empty); | ||
if (!string.IsNullOrEmpty(basedOn)) | ||
{ | ||
string path = string.Empty; | ||
if (basedOn.Contains("$THEME_DIR$")) | ||
{ | ||
path = basedOn.Replace("$THEME_DIR$\\", ProgramConstants.GetResourcePath()); | ||
} | ||
else | ||
path = Path.GetDirectoryName(FileName) + "\\" + basedOn; | ||
|
||
// Consolidate with the INI file that this INI file is based on | ||
if (!File.Exists(path)) | ||
Logger.Log(FileName + ": Base INI file not found! " + path); | ||
|
||
CCIniFile baseIni = new CCIniFile(path); | ||
ConsolidateIniFiles(baseIni, this); | ||
this.Sections = baseIni.Sections; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.