Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve failure to set up private chain #375

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion builds/msvc-140/explorer/explorer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\burn.hpp" />
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\changepasswd.hpp" />
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\createasset.hpp" />
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\createmoremultisigtx.hpp" />
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\createmultisigtx.hpp" />
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\createrawtx.hpp" />
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\decoderawtx.hpp" />
Expand Down Expand Up @@ -186,6 +187,7 @@
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\burn.cpp" />
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\changepasswd.cpp" />
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\createasset.cpp" />
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\createmoremultisigtx.cpp" />
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\createmultisigtx.cpp" />
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\createrawtx.cpp" />
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\decoderawtx.cpp" />
Expand Down Expand Up @@ -344,4 +346,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
8 changes: 7 additions & 1 deletion builds/msvc-140/explorer/explorer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\verifyrandom.hpp">
<Filter>Header Files\extensions\commands</Filter>
</ClInclude>
<ClInclude Include="..\..\..\include\metaverse\explorer\extensions\commands\createmoremultisigtx.hpp">
<Filter>Header Files\extensions\commands</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\..\include\metaverse\explorer\impl\utility.ipp">
Expand Down Expand Up @@ -804,10 +807,13 @@
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\verifyrandom.cpp">
<Filter>Source Files\extensions\commands</Filter>
</ClCompile>
<ClCompile Include="..\..\..\src\lib\explorer\extensions\commands\createmoremultisigtx.cpp">
<Filter>Source Files\extensions\commands</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Text Include="..\..\..\include\CMakeLists.txt">
<Filter>Header Files\extensions\commands</Filter>
</Text>
</ItemGroup>
</Project>
</Project>
Binary file added builds/msvc-140/logo.ico
Binary file not shown.
156 changes: 156 additions & 0 deletions builds/msvc-140/mvs-setup-dll-0.8.5.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
; Script generated by the HM NIS Edit Script Wizard.

; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Metaverse"
; COMMON_MODIFY_ITEM
!define PRODUCT_VERSION "0.9.1"
!define PRODUCT_PUBLISHER "Metaverse Foundation"
!define PRODUCT_WEB_SITE "https://mvs.org"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\mvstray.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Language Selection Dialog Settings
!define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language"

; Set Source Path
; COMMON_MODIFY_ITEM
!define BINARY_DIR "D:\compile\metaverse-release\builds\msvc-140\x64\Release"
!define HTMLS_DIR "E:\mvs-htmls"

; Set Microsoft Visual Studio Path
!define VS_PATH "D:\Program Files (x86)\Microsoft Visual Studio 14.0"
!define VS_DLL_PATH "${VS_PATH}\Common7\IDE\Remote Debugger\x64"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
;!insertmacro MUI_PAGE_LICENSE "..\..\..\..\path\to\licence\YourSoftwareLicence.txt"
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
;!define MUI_FINISHPAGE_RUN "$INSTDIR\mvstray.exe"
;!define MUI_FINISHPAGE_RUN_PARAMETERS "--ui=true"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "SimpChinese"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "mvs-win64-v${PRODUCT_VERSION}.exe"
InstallDir "$PROGRAMFILES\Metaverse"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
; COMMON_MODIFY_ITEM
Icon "logo.ico"

Function CheckVC
Push $R0
ClearErrors
ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version"

; ��⺬��vc��ע�����Ϣ�Ƿ����
IfErrors 0 VSRedistInstalled
Exec "$INSTDIR\vcredist_x64.exe /q" ;�������ڣ�ִ�о�Ĭ��װ
StrCpy $R0 "-1"
; MessageBox MB_OK $R0

VSRedistInstalled:
; MessageBox MB_OK "�Ѱ�װ"
Exch $R0
Delete "$INSTDIR\vcredist_x64.exe."
FunctionEnd

Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
;MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "��ȷʵҪ��ȫ�Ƴ� $(^Name) ���估���е������" IDYES +2
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are your sure to completely remove $(^Name) ��and all its modules��" IDYES +2
Abort
FunctionEnd

Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
Call CheckVC
FunctionEnd

Section "MainSection" SEC01
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
File "${BINARY_DIR}\mvstray.exe"
CreateDirectory "$SMPROGRAMS\Metaverse"
CreateShortCut "$DESKTOP\Metaverse Wallet.lnk" "$INSTDIR\mvstray.exe" "--ui=true"
File "${BINARY_DIR}\mvs-cli.exe"
File "${BINARY_DIR}\mvsd.exe"
; depend exe / dll
File "${VS_PATH}\VC\redist\1033\vcredist_x64.exe"
File "${VS_DLL_PATH}\api-ms-win-crt-runtime-l1-1-0.dll"
File "${VS_DLL_PATH}\api-ms-win-crt-math-l1-1-0.dll"
File "${VS_DLL_PATH}\api-ms-win-crt-stdio-l1-1-0.dll"
File "${VS_DLL_PATH}\api-ms-win-crt-locale-l1-1-0.dll"
File "${VS_DLL_PATH}\api-ms-win-crt-heap-l1-1-0.dll"
File "${VS_DLL_PATH}\vcruntime140.dll"
;SetOutPath "$DESKTOP"
;File "D:\�ؿ���Ԫ��Ǯ����װ˵��.txt"
SetOutPath "$INSTDIR\mvs-htmls"
SetOverwrite try
File /r "${HTMLS_DIR}\*.*"
ExecWait "$INSTDIR\mvsd.exe -i"
SectionEnd

Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\mvstray.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\mvstray.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd

Function un.onUninstSuccess
HideWindow
;MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) �ѳɹ��ش���ļ�����Ƴ���"
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) has been completely removed from your computer��"
FunctionEnd

Section Uninstall
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\mvsd.exe"
Delete "$INSTDIR\mvs-cli.exe"
Delete "$INSTDIR\mvstray.exe"
Delete "$INSTDIR\vcredist_x64.exe"
Delete "$INSTDIR\api-ms-win-crt-runtime-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-math-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-stdio-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-locale-l1-1-0.dll"
Delete "$INSTDIR\api-ms-win-crt-heap-l1-1-0.dll"
Delete "$INSTDIR\vcruntime140.dll"
RMDir /r /REBOOTOK "$INSTDIR\mvs-htmls"
RMDir "$INSTDIR"

Delete "$DESKTOP\Metaverse Wallet.lnk"

DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd
6 changes: 3 additions & 3 deletions builds/msvc-140/network/network.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<SubSystem>Windows</SubSystem>
</Link>
<Lib>
<AdditionalLibraryDirectories>..\..\..\..\miniupnp\miniupnpc\msvc\x64\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>..\..\..\..\miniupnp\miniupnpc\msvc\x64\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>miniupnpc.lib</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
Expand All @@ -144,11 +144,11 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<AdditionalLibraryDirectories>..\..\..\..\miniupnp\miniupnpc\msvc\x64\Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>..\..\..\..\miniupnp\miniupnpc\msvc\x64\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>miniupnpc.lib;</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
5 changes: 4 additions & 1 deletion include/metaverse/bitcoin/unicode/unicode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@
boost::filesystem::path::imbue(std::locale()); \
\
auto variables = bc::to_utf8(_wenviron); \
auto old_environ = environ; \
environ = reinterpret_cast<char**>(variables.data()); \
\
auto arguments = bc::to_utf8(argc, argv); \
auto args = reinterpret_cast<char**>(arguments.data()); \
\
return libbitcoin::main(argc, args); \
auto ret = libbitcoin::main(argc, args); \
environ = old_environ; \
return ret; \
}
#else
#define BC_USE_MVS_MAIN \
Expand Down
2 changes: 1 addition & 1 deletion include/metaverse/bitcoin/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
* For interpretation of the versioning scheme see: http://semver.org
*/

#define MVS_VERSION "0.9.0"
#define MVS_VERSION "0.9.1"

#endif
2 changes: 1 addition & 1 deletion include/metaverse/consensus/libethash/mmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define MAP_ANON MAP_ANONYMOUS
#define MAP_FAILED ((void *) -1)

void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset);
void* mmap(void* start, size_t length, int prot, int flags, int fd, size_t offset);
void munmap(void* addr, size_t length);
#else // posix, yay! ^_^
#include <sys/mman.h>
Expand Down
2 changes: 1 addition & 1 deletion include/metaverse/consensus/libethash/mmap_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
# define DWORD_LO(x) (x)
#endif

void* mmap(void* start, size_t length, int prot, int flags, int fd, off_t offset)
void* mmap(void* start, size_t length, int prot, int flags, int fd, size_t offset)
{
if (prot & ~(PROT_READ | PROT_WRITE | PROT_EXEC))
return MAP_FAILED;
Expand Down