Skip to content

Commit

Permalink
Updated to MSVS 2013
Browse files Browse the repository at this point in the history
  • Loading branch information
troky committed Nov 16, 2014
1 parent e481d67 commit 32d95dd
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 66 deletions.
2 changes: 1 addition & 1 deletion adl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 1 addition & 2 deletions sgminer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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 */
Expand Down
16 changes: 8 additions & 8 deletions winbuild/README.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
-----------------------
Expand All @@ -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
Expand Down Expand Up @@ -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\
- 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\

Expand Down
8 changes: 3 additions & 5 deletions winbuild/dist/include/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 ""
Expand Down
12 changes: 2 additions & 10 deletions winbuild/dist/include/curl/.gitignore
Original file line number Diff line number Diff line change
@@ -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 change: 0 additions & 1 deletion winbuild/dist/include/curl/README.txt

This file was deleted.

5 changes: 0 additions & 5 deletions winbuild/dist/include/jansson_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions winbuild/dist/include/winbuild.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 5 additions & 1 deletion winbuild/jansson/jansson.vcxproj
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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">
Expand Down
36 changes: 18 additions & 18 deletions winbuild/jansson/jansson.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
10 changes: 5 additions & 5 deletions winbuild/sgminer.vcxproj
Original file line number Diff line number Diff line change
@@ -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>
Expand Down Expand Up @@ -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">
Expand Down
12 changes: 6 additions & 6 deletions winbuild/sgminer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down Expand Up @@ -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">
Expand Down

0 comments on commit 32d95dd

Please sign in to comment.