Browse Source

Updated to MSVS 2013

djm34
troky 10 years ago
parent
commit
32d95dd967
  1. 2
      adl.c
  2. 2
      configure.ac
  3. 3
      sgminer.c
  4. 2
      submodules/jansson
  5. 14
      winbuild/README.txt
  6. 8
      winbuild/dist/include/config.h
  7. 12
      winbuild/dist/include/curl/.gitignore
  8. 1
      winbuild/dist/include/curl/README.txt
  9. 5
      winbuild/dist/include/jansson_config.h
  10. 2
      winbuild/dist/include/winbuild.h
  11. 6
      winbuild/jansson/jansson.vcxproj
  12. 36
      winbuild/jansson/jansson.vcxproj.filters
  13. 10
      winbuild/sgminer.vcxproj
  14. 12
      winbuild/sgminer.vcxproj.filters

2
adl.c

@ -1310,7 +1310,7 @@ void gpu_autotune(int gpu, enum dev_enable *denable) @@ -1310,7 +1310,7 @@ void gpu_autotune(int gpu, enum dev_enable *denable)
bool fan_optimal = true, fan_window = true;
struct cgpu_info *cgpu;
struct gpu_adl *ga;
unsigned int i;
int i;
cgpu = &gpus[gpu];
ga = &cgpu->adl;

2
configure.ac

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_maj], [5])
m4_define([v_min], [0])
m4_define([v_mic], [0])
m4_define([v_mic], [1])
##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##--##
m4_define([v_ver], [v_maj.v_min.v_mic])
m4_define([lt_rev], m4_eval(v_maj + v_min))

3
sgminer.c

@ -8040,7 +8040,7 @@ static void probe_pools(void) @@ -8040,7 +8040,7 @@ static void probe_pools(void)
static void restart_mining_threads(unsigned int new_n_threads)
{
struct thr_info *thr;
unsigned int i, j, k;
int i, j, k;
// Stop and free threads
if (mining_thr)
@ -8197,7 +8197,6 @@ int main(int argc, char *argv[]) @@ -8197,7 +8197,6 @@ int main(int argc, char *argv[])
struct thr_info *thr;
struct block *block;
int i;
char *s;
/* This dangerous function tramples random dynamically allocated
* variables so do it before anything at all */

2
submodules/jansson

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit df248712a5d982b0721b6e8d15b09d4a9264301e
Subproject commit bc743ad2d9807b00e7dc0b5d3524d0a47a14f3c3

14
winbuild/README.txt

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
Tools needed
------------
1. Windows 7 (if you are using Win 8 or above, you will need to use a VM Win 7)
2. Visual Studio C++ 2010 Express - found at http://www.visualstudio.com/en-us/downloads#d-2010-express
2. Visual Studio C++ 2013 Express - found at http://www.visualstudio.com/en-us/downloads#d-2013-express
3. Windows 7.1 SDK - http://www.microsoft.com/en-us/download/details.aspx?id=8279
If you intend to build for native x64, then instead of using <Visual Studio Command Prompt>, you will need to use
@ -10,7 +10,7 @@ Windows SDK 7.1 Command Prompt and run "setenv /x64 /Release" before starting to @@ -10,7 +10,7 @@ Windows SDK 7.1 Command Prompt and run "setenv /x64 /Release" before starting to
Also, for x64, after you follow all the steps and you are ready to build. Go to "Project Properties -> VC++ Directories -> Library Directories"
and add this folder to the library list: C:\Program Files\Microsoft SDKs\Windows\v7.1\Lib\x64
To run sgminer built using Visual Studios you will need to have Microsoft Visual C++ 2010 Redistributable Package (x86 or x64 depending on your sgminer version) installed.
To run sgminer built using Visual Studios you will need to have Microsoft Visual C++ 2013 Redistributable Package (x86 or x64 depending on your sgminer version) installed.
Installing dependencies
-----------------------
@ -31,12 +31,12 @@ x64 version: @@ -31,12 +31,12 @@ x64 version:
2. Install AMD APP SDK (OpenCL), latest version
-----------------------------------------------
- go to http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/ and download appropriate version (x86/x64) and install
- go to http://developer.amd.com/tools-and-sdks/opencl-zone/amd-accelerated-parallel-processing-app-sdk/ and download appropriate version (x86/x64) and install
- copy C:\Program Files (x86)\AMD APP SDK\2.9\lib\x86\OpenCL.lib to winbuild/dist/lib/x86/
- copy C:\Program Files (x86)\AMD APP SDK\2.9\bin\x86\OpenCL.dll to winbuild/dist/dll/x86/
- copy C:\Program Files (x86)\AMD APP SDK\2.9\lib\x86_64\OpenCL.lib to winbuild/dist/lib/x64/
- copy C:\Program Files (x86)\AMD APP SDK\2.9\bin\x86_64\OpenCL.dll to winbuild/dist/dll/x64/
- copy C:\Program Files (x86)\AMD APP SDK\2.9\include\* winbuild/dist/include/
- copy C:\Program Files (x86)\AMD APP SDK\2.9\include\CL\* winbuild/dist/include/CL/
3. PDCurses
@ -67,20 +67,20 @@ x64 version: @@ -67,20 +67,20 @@ x64 version:
4. Curl
-------
- go to http://curl.haxx.se/download.html and download latest source and extract it somewhere
- go to http://curl.haxx.se/download.html and download latest source (>=7.39.0) and extract it somewhere
- replace original curl winbuild\MakefileBuild.vc with provided winbuild\MakefileBuild.vc (corrected paths and static library names for VC)
x86 version:
- open Visual Studio Command Prompt (x86)
- go to winbuild folder and execute:
nmake -f Makefile.vc mode=static VC=10 WITH_DEVEL=C:\OpenSSL-Win32 WITH_SSL=static ENABLE_SSPI=no ENABLE_IPV6=no ENABLE_IDN=no GEN_PDB=no DEBUG=no MACHINE=x86
nmake -f Makefile.vc mode=static VC=13 WITH_DEVEL=C:\OpenSSL-Win32 WITH_SSL=static ENABLE_SSPI=no ENABLE_IPV6=no ENABLE_IDN=no GEN_PDB=no DEBUG=no MACHINE=x86
- copy builds\libcurl-vc10-x86-release-static-ssl-static-spnego\lib\libcurl_a.lib to winbuild\dist\lib\x86
- copy builds \libcurl-vc10-x86-release-static-ssl-static-spnego\include\* winbuild\dist\include\
x64 version:
- open Visual Studio Command Prompt (x64)
- go to winbuild folder and execute:
nmake -f Makefile.vc mode=static VC=10 WITH_DEVEL=C:\OpenSSL-Win64 WITH_SSL=static ENABLE_SSPI=no ENABLE_IPV6=no ENABLE_IDN=no GEN_PDB=no DEBUG=no MACHINE=x64
nmake -f Makefile.vc mode=static VC=13 WITH_DEVEL=C:\OpenSSL-Win64 WITH_SSL=static ENABLE_SSPI=no ENABLE_IPV6=no ENABLE_IDN=no GEN_PDB=no DEBUG=no MACHINE=x64
- copy builds\libcurl-vc10-x64-release-static-ssl-static-spnego\lib\libcurl_a.lib to winbuild\dist\lib\x64
- copy builds\libcurl-vc10-x64-release-static-ssl-static-spnego\include\* winbuild\dist\include\

8
winbuild/dist/include/config.h vendored

@ -49,8 +49,6 @@ @@ -49,8 +49,6 @@
#define PATH_MAX MAX_PATH
#define R_OK 0
// Libraries to include
#pragma comment(lib, "winmm.lib")
#pragma comment(lib, "wsock32.lib")
@ -69,11 +67,11 @@ @@ -69,11 +67,11 @@
#endif
#define VERSION "v5.0.0"
#define VERSION "v5.0.1"
#define PACKAGE_NAME "sgminer"
#define PACKAGE_TARNAME "sgminer"
#define PACKAGE_VERSION "5.0.0"
#define PACKAGE_STRING "sgminer 5.0.0"
#define PACKAGE_VERSION "5.0.1"
#define PACKAGE_STRING "sgminer 5.0.1"
#define PACKAGE "sgminer"
#define SGMINER_PREFIX ""

12
winbuild/dist/include/curl/.gitignore vendored

@ -1,10 +1,2 @@ @@ -1,10 +1,2 @@
curl.h
curlbuild.h
curlrules.h
curlver.h
easy.h
mprintf.h
multi.h
stdcheaders.h
typecheck-gcc.h
*
!.gitignore

1
winbuild/dist/include/curl/README.txt vendored

@ -1 +0,0 @@ @@ -1 +0,0 @@
Curl installation instructions can be found in winbuild/README.txt.

5
winbuild/dist/include/jansson_config.h vendored

@ -25,11 +25,6 @@ @@ -25,11 +25,6 @@
* as we will also check for __int64 etc types.
* (the definition was used in the automake system) */
/* Bring in the cmake-detected defines */
#define HAVE_STDINT_H 1
/* #undef HAVE_INTTYPES_H */
/* #undef HAVE_SYS_TYPES_H */
/* Include our standard type header for the integer typedef */
#if defined(HAVE_STDINT_H)

2
winbuild/dist/include/winbuild.h vendored

@ -131,8 +131,6 @@ inline void* memmem (void* buf, size_t buflen, void* pat, size_t patlen) @@ -131,8 +131,6 @@ inline void* memmem (void* buf, size_t buflen, void* pat, size_t patlen)
return 0;
}
#define va_copy(a, b) memcpy(&(a), &(b), sizeof(va_list))
#define usleep(x) Sleep((x)/1000)
#define sleep(x) Sleep((x)*1000)

6
winbuild/jansson/jansson.vcxproj

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -27,23 +27,27 @@ @@ -27,23 +27,27 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

36
winbuild/jansson/jansson.vcxproj.filters

@ -15,60 +15,60 @@ @@ -15,60 +15,60 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\compat\jansson\src\dump.c">
<ClCompile Include="..\..\submodules\jansson\src\dump.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\error.c">
<ClCompile Include="..\..\submodules\jansson\src\error.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\hashtable.c">
<ClCompile Include="..\..\submodules\jansson\src\hashtable.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\hashtable_seed.c">
<ClCompile Include="..\..\submodules\jansson\src\hashtable_seed.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\load.c">
<ClCompile Include="..\..\submodules\jansson\src\load.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\memory.c">
<ClCompile Include="..\..\submodules\jansson\src\memory.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\pack_unpack.c">
<ClCompile Include="..\..\submodules\jansson\src\pack_unpack.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\strbuffer.c">
<ClCompile Include="..\..\submodules\jansson\src\strbuffer.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\strconv.c">
<ClCompile Include="..\..\submodules\jansson\src\strconv.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\utf.c">
<ClCompile Include="..\..\submodules\jansson\src\utf.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\compat\jansson\src\value.c">
<ClCompile Include="..\..\submodules\jansson\src\value.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\compat\jansson\src\hashtable.h">
<ClInclude Include="jansson_config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\compat\jansson\src\jansson.h">
<ClInclude Include="jansson_private_config.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\compat\jansson\src\jansson_private.h">
<ClInclude Include="..\..\submodules\jansson\src\hashtable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\compat\jansson\src\strbuffer.h">
<ClInclude Include="..\..\submodules\jansson\src\jansson.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\compat\jansson\src\utf.h">
<ClInclude Include="..\..\submodules\jansson\src\jansson_private.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="jansson_config.h">
<ClInclude Include="..\..\submodules\jansson\src\strbuffer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="jansson_private_config.h">
<ClInclude Include="..\..\submodules\jansson\src\utf.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>

10
winbuild/sgminer.vcxproj

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@ -28,27 +28,27 @@ @@ -28,27 +28,27 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v100</PlatformToolset>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">

12
winbuild/sgminer.vcxproj.filters

@ -47,9 +47,6 @@ @@ -47,9 +47,6 @@
<ClCompile Include="..\logging.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\ocl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\sgminer.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -71,9 +68,6 @@ @@ -71,9 +68,6 @@
<ClCompile Include="..\pool.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\algorithm.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\sph\aes_helper.c">
<Filter>Source Files\sph</Filter>
</ClCompile>
@ -197,6 +191,12 @@ @@ -197,6 +191,12 @@
<ClCompile Include="..\sph\whirlpool.c">
<Filter>Source Files\sph</Filter>
</ClCompile>
<ClCompile Include="..\ocl.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\algorithm.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\adl.h">

Loading…
Cancel
Save