Browse Source

Oops, forgot to commit some previous changes. Also updated dependency handling.

Progranism 15 years ago
parent
commit
dd7656f4ae
3 changed files with 12 additions and 3 deletions
  1. 2 1
      Source/Controls/Clipboard.cpp
  2. 1 1
      Source/Core/Math.cpp
  3. 9 1
      how_to_build_for_mingw.txt

+ 2 - 1
Source/Controls/Clipboard.cpp

@@ -107,7 +107,8 @@ void Clipboard::Set(const Core::WString& _content)
 		_content.ToUTF8(win32_content);
 
 		HGLOBAL clipboard_data = GlobalAlloc(GMEM_FIXED, win32_content.Length() + 1);
-		strcpy_s((char*) clipboard_data, win32_content.Length() + 1, win32_content.CString());
+		// Replaced strcpy_s with a simple strcpy, because we know for sure it's big enough.
+		strcpy((char*) clipboard_data, win32_content.CString());
 
 		if (SetClipboardData(CF_TEXT, clipboard_data) == NULL)
 		{

+ 1 - 1
Source/Core/Math.cpp

@@ -144,7 +144,7 @@ ROCKETCORE_API int RoundDown(float value)
 // Efficiently truncates a floating-point value into an integer.
 ROCKETCORE_API int RealToInteger(float value)
 {
-#if defined ROCKET_PLATFORM_WIN32
+#if defined(ROCKET_PLATFORM_WIN32) && !defined(__MINGW32__)
 	int i;
 	_asm
 	{

+ 9 - 1
how_to_build_for_mingw.txt

@@ -1,3 +1,11 @@
+Download FreeType. Get the Binaries package:
+	http://gnuwin32.sourceforge.net/packages/freetype.htm
+Direct link:
+	http://gnuwin32.sourceforge.net/downlinks/freetype-bin-zip.php
+	
+Extract to Dependencies\freetype
+
 Go into the Build folder
 run:
-	cmake -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM="F:\MinGW\bin\make.exe" -D FREETYPE_INCLUDE_DIRS="..\..\support\freetype\include" -D FREETYPE_LIBRARY="..\..\support\lib\libfreetype243MT.a" .
+
+cmake -G "MinGW Makefiles" -D CMAKE_MAKE_PROGRAM="F:\MinGW\bin\make.exe" -D FREETYPE_INCLUDE_DIRS="..\Dependencies\freetype\include;..\Dependencies\freetype\include\freetype2" -D FREETYPE_LIBRARY="..\Dependencies\freetype\lib\libfreetype.dll.a" .