-
Notifications
You must be signed in to change notification settings - Fork 9
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
284 changed files
with
12,010 additions
and
7,489 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 |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
; 安装程序初始定义常量 | ||
!define PRODUCT_NAME "Samurai" | ||
!define PRODUCT_VERSION " 0.3.0.9"; 加版本号,开头多加一个空格! | ||
!define PRODUCT_VERSION "0.6.0"; | ||
!define PRODUCT_PUBLISHER "www.platon.network<[email protected]>" | ||
!define PRODUCT_WEB_SITE "https://www.platon.network" | ||
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\Samurai.exe" | ||
|
@@ -41,20 +41,36 @@ Page custom SetCustom LeaveCustom ; | |
!insertmacro MUI_UNPAGE_INSTFILES | ||
|
||
; 安装界面包含的语言设置 | ||
|
||
!insertmacro MUI_LANGUAGE "English" | ||
|
||
!insertmacro MUI_LANGUAGE "SimpChinese" | ||
|
||
LangString brandingText ${LANG_ENGLISH} "Install System:" | ||
LangString brandingText ${LANG_SimpChinese} "Install System:" | ||
LangString instInfo ${LANG_ENGLISH} "The installer detected that $(^Name) is running. Need to stop and uninstall it to proceed with the new installation. Do you want to uninstall it now?" | ||
LangString instInfo ${LANG_SimpChinese} "安装程序检测到 $(^Name) 正在运行,您必须将其卸载才能进行下一步安装,是否现在进行卸载?" | ||
LangString selectLocation ${LANG_ENGLISH} "Please select a location to store the block data and the keystore file." | ||
LangString selectLocation ${LANG_SimpChinese} "请选择存储区块数据及Keystore文件的位置." | ||
LangString UninstInfo ${LANG_ENGLISH} "Are you sure you want to completely remove $(^Name) and all its components?" | ||
LangString UninstInfo ${LANG_SimpChinese} "您确实要完全移除 $(^Name) ,及其所有的组件?" | ||
LangString UninstSuccess ${LANG_ENGLISH} "Has been successfully removed from your computer." | ||
LangString UninstSuccess ${LANG_SimpChinese} "已成功地从你的计算机移除。" | ||
LangString closeInfo ${LANG_ENGLISH} "${PRODUCT_NAME} is running, click OK to close." | ||
LangString closeInfo ${LANG_SimpChinese} "${PRODUCT_NAME} 正在运行,点击OK关闭." | ||
LangString openFileInfo ${LANG_ENGLISH} "Opening leftover data directories(backup before deleting!)" | ||
LangString openFileInfo ${LANG_SimpChinese} "打开剩余的数据目录(删除前注意备份)" | ||
|
||
; 安装预释放文件 | ||
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS | ||
!insertmacro MUI_RESERVEFILE_LANGDLL | ||
; ------ MUI 现代界面定义结束 ------ | ||
|
||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" | ||
OutFile "..\dist\${PRODUCT_NAME}-windows-amd64${PRODUCT_VERSION}.exe" | ||
OutFile "..\dist\${PRODUCT_NAME}-windows-x86_64-${PRODUCT_VERSION}.exe" | ||
InstallDir "$PROGRAMFILES\Samurai" | ||
InstallDirRegKey HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" | ||
ShowInstDetails show | ||
ShowUnInstDetails show | ||
BrandingText "$(brandingText) ${PRODUCT_NAME} ${PRODUCT_VERSION}" | ||
|
||
; 激活安装日志记录,该日志文件将会作为卸载文件的依据(注意,本区段必须放置在所有区段之前) | ||
Section "-LogSetOn" | ||
|
@@ -65,10 +81,9 @@ Section "Samurai" | |
ReadRegStr $R2 HKLM "${PRODUCT_UNINST_KEY}" "UninstallString" | ||
StrCmp $R2 "" NO YES | ||
YES: | ||
MessageBox MB_ICONQuESTION|MB_YESNO "The installer detected that Samurai is running. Need to stop and uninstall it to proceed with the new installation. Do you want to uninstall it now?" IDYES keep IDNO none | ||
MessageBox MB_ICONQuESTION|MB_YESNO "$(instInfo)" IDYES keep IDNO none | ||
keep: | ||
ExecWait $R2 | ||
|
||
none: | ||
Quit | ||
NO: | ||
|
@@ -125,15 +140,15 @@ Function SetCustom | |
; 判断勾选的组件,并把未勾选组件的安装路径控件设为不可用 | ||
SectionGetFlags ${SecA} $0 | ||
StrCmp $0 0 0 +2 | ||
WriteINIStr "$PLUGINSDIR\setup.ini" "Field 2" "Flags" "Disabled" | ||
WriteINIStr "$PLUGINSDIR\setup.ini" "Field 2" "Flags" "" | ||
StrCmp $0 1 0 +2 ; 如果组件勾选了,还需要去掉 Disabled,这两行代码不能省略 | ||
WriteINIStr "$PLUGINSDIR\setup.ini" "Field 2" "Flags" "Disabled" | ||
WriteINIStr "$PLUGINSDIR\setup.ini" "Field 2" "Flags" "" | ||
|
||
; 预定义组件安装路径 | ||
WriteINIStr "$PLUGINSDIR\setup.ini" "Field 2" "State" "$APPDATA\Samurai" | ||
|
||
InstallOptions::initDialog /NOUNLOAD "$PLUGINSDIR\setup.ini" | ||
!insertmacro MUI_HEADER_TEXT "Please select a location to store the block data and the keystore file." "" | ||
!insertmacro MUI_HEADER_TEXT "$(selectLocation)" "" | ||
InstallOptions::show | ||
Pop $R0 | ||
|
||
|
@@ -179,28 +194,34 @@ Section Uninstall | |
RMDir "$INSTDIR" | ||
|
||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" | ||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" | ||
SetAutoClose true | ||
SectionEnd | ||
|
||
#-- 根据 NSIS 脚本编辑规则,所有 Function 区段必须放置在 Section 区段之后编写,以避免安装程序出现未可预知的问题。--# | ||
|
||
Function un.onInit | ||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all its components?" IDYES +2 | ||
Abort | ||
;检测程序是否运行 | ||
FindProcDLL::FindProc "Samurai.exe" | ||
Pop $R0 | ||
IntCmp $R0 1 0 no_run | ||
MessageBox MB_ICONSTOP "卸载程序检测到 ${PRODUCT_NAME} 正在运行,请关闭之后再卸载!" | ||
Quit | ||
no_run: | ||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(UninstInfo)" IDYES +2 | ||
Abort | ||
CheckProc: | ||
killer::IsProcessRunning "Samurai.exe" | ||
Pop $R0 | ||
IntCmp $R0 1 0 no_run | ||
MessageBox MB_ICONEXCLAMATION|MB_OKCANCEL "$(closeInfo)" IDYES kill IDNO none | ||
kill: | ||
killer::KillProcess "Samurai.exe" | ||
Sleep 1000 | ||
Goto CheckProc | ||
none: | ||
Quit | ||
no_run: | ||
FunctionEnd | ||
|
||
Function un.onUninstSuccess | ||
MessageBox MB_ICONINFORMATION|MB_OK "Opening leftover data directories(backup before deleting!)" IDOK ok | ||
ReadRegStr $0 HKLM "${PRODUCT_DIR_REGKEY}" "UserDataPath" | ||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" | ||
MessageBox MB_ICONINFORMATION|MB_OK "$(openFileInfo)" IDOK ok | ||
ok: | ||
ExecShell explore "$APPDATA\Samurai" | ||
ExecShell explore $0 | ||
FunctionEnd | ||
|
||
; 以下是卸载程序通过安装日志卸载文件的专用函数,请不要随意修改 | ||
|
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
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
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 |
---|---|---|
@@ -1,17 +1,17 @@ | ||
{ | ||
"name": "Samurai", | ||
"version": "0.3.9", | ||
"version": "0.6.0", | ||
"author": "www.platon.network<[email protected]>", | ||
"description": "Samurai钱包客户端", | ||
"license": null, | ||
"main": "./dist/electron/main.js", | ||
"homepage": "https://www.platon.network/", | ||
"scripts": { | ||
"win": "node build/build.js && electron-builder -w --x64", | ||
"win": "node build/build.js && electron-builder -w --x64 -p onTag", | ||
"mac": "node build/build.js && electron-builder --mac --arch=x64 ", | ||
"linux": "node build/build.js && electron-builder --linux tar.xz", | ||
"build": "node build/build.js && electron-builder", | ||
"build:dir": "node build/build.js && electron-builder --dir", | ||
"build": "node build/build.js && electron-builder -p onTag", | ||
"build:dir": "node build/build.js && electron-builder --dir -p onTag", | ||
"build:clean": "cross-env BUILD_TARGET=clean node build/build.js", | ||
"build:web": "cross-env BUILD_TARGET=web node build/build.js", | ||
"dev": "node build/dev-runner.js", | ||
|
@@ -22,7 +22,7 @@ | |
}, | ||
"build": { | ||
"productName": "Samurai", | ||
"buildVersion": "0.3.0.9", | ||
"buildVersion": "0.6.0", | ||
"appId": "org.simulatedgreg.electron-vue", | ||
"directories": { | ||
"output": "dist" | ||
|
@@ -39,8 +39,8 @@ | |
] | ||
}, | ||
{ | ||
"from": "src/services/demo1/", | ||
"to": "demo1", | ||
"from": "src/services/buildInContract/", | ||
"to": "buildInContract", | ||
"filter": [] | ||
} | ||
], | ||
|
@@ -78,6 +78,12 @@ | |
"to": "platon_exe", | ||
"filter": [] | ||
} | ||
], | ||
"publish": [ | ||
{ | ||
"provider": "generic", | ||
"url": "https://download.platon.network/0.6" | ||
} | ||
] | ||
}, | ||
"linux": { | ||
|
@@ -106,12 +112,17 @@ | |
"bignumber": "^1.1.0", | ||
"bignumber.js": "^8.0.1", | ||
"console-utility": "git+ssh://http://luchenqun:[email protected]/Juzix-ethereum/console-utility.git#develop", | ||
"crypto": "^1.0.1", | ||
"crypto-js": "^3.1.9-1", | ||
"decimal.js": "^10.0.1", | ||
"electron-updater": "^4.0.8", | ||
"element-ui": "^1.4.3", | ||
"ethereumjs-tx": "^1.3.7", | ||
"jssha": "^2.3.1", | ||
"keythereum": "^1.0.4", | ||
"less": "^2.7.2", | ||
"less-loader": "^4.0.5", | ||
"lodash": "^4.17.11", | ||
"mddir": "^1.1.1", | ||
"node-loader": "^0.6.0", | ||
"node-uuid": "^1.4.8", | ||
|
@@ -122,7 +133,7 @@ | |
"vue-qr": "^1.5.2", | ||
"vue-router": "^2.5.3", | ||
"vuex": "^2.3.1", | ||
"web3": "git+ssh://[email protected]:PlatON/client-sdk-js.git#0.3.0_dev" | ||
"web3": "git+ssh://[email protected]:PlatON/client-sdk-js.git#0.5.0_dev" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.22.1", | ||
|
@@ -140,16 +151,17 @@ | |
"del": "^2.2.1", | ||
"devtron": "^1.1.0", | ||
"electron": "^3.1.0", | ||
"electron-builder": "^20.38.4", | ||
"electron-builder": "^20.34.0", | ||
"electron-debug": "^1.4.0", | ||
"electron-devtools-installer": "^2.0.1", | ||
"electron-devtools-installer": "^2.2.4", | ||
"extract-text-webpack-plugin": "^2.0.0-beta.4", | ||
"file-loader": "^0.11.1", | ||
"html-webpack-plugin": "^2.30.1", | ||
"json-loader": "^0.5.4", | ||
"less": "^2.7.2", | ||
"less-loader": "^4.0.5", | ||
"multispinner": "^0.2.1", | ||
"sha3": "^2.0.0", | ||
"style-loader": "^0.18.1", | ||
"url-loader": "^0.5.7", | ||
"vue-html-loader": "^1.2.2", | ||
|
Oops, something went wrong.