Skip to content

Commit

Permalink
Merge pull request #26 from nvdacn/AddonStoreJSON
Browse files Browse the repository at this point in the history
确保安装来自插件商店的插件时,插件商店中的通道正确
  • Loading branch information
wmhn1872265132 authored Jul 13, 2024
2 parents 91cf08d + 1208168 commit bc57b63
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 29 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: get ${{ matrix.addon.addonId }} addon data
uses: antifree/json-to-variables@v1.2.0
with:
filename: ${{ github.workspace}}/addon-datastore/views/zh_CN/latest/${{ matrix.addon.addonId }}/stable.json
filename: ${{ github.workspace }}/addon-datastore/views/zh_CN/latest/${{ matrix.addon.addonId }}/stable.json
- name: Cache ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon
uses: actions/cache@v4
with:
Expand All @@ -110,10 +110,15 @@ jobs:
with:
file-url: ${{ env.URL }}
sha256: ${{ env.sha256 }}
- name: Copy ${{ matrix.addon.addonId }}-${{ env.addonVersionName }} Addon JSON data
run: cp ${{ github.workspace }}/addon-datastore/views/zh_CN/latest/${{ matrix.addon.addonId }}/stable.json ${{ github.workspace }}/${{ matrix.addon.addonId }}.json
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.addon.addonId }}-${{ env.addonVersionName }}.nvda-addon
path: ${{ steps.download-addon.outputs.file-path }}
path: |
${{ steps.download-addon.outputs.file-path }}
${{ github.workspace }}/${{ matrix.addon.addonId }}.json
if-no-files-found: error

download-resource:
Expand Down
6 changes: 4 additions & 2 deletions documentation/新增插件模板.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ Type: files; Name: "{app}\Addons\
# [Run] 段
Filename: "{tmp}\7z"; Parameters: "x ""Addons\
插件ID
*"" -aoa -o""{app}\Addons\
*.nvda-addon"" -aoa -o""{app}\Addons\
插件ID
"""; Components: "Addons\
插件ID
"
"; AfterInstall: JSONFile('
插件ID
')

# [Files] 段
Source: "Resource\Addons\
Expand Down
60 changes: 35 additions & 25 deletions 懒人版安装脚本.iss
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ begin
SetIniString('ibmeci', ' TTSPath ', ExpandConstant('{pf}\ViaVoiceTTS'), ExpandConstant('{userappdata}\NVDA\nvda.ini'));
end;
end;
procedure JSONFile(JSONName: String);
var
FileName: String;
begin
FileName := ExpandConstant('{tmp}\Addons\'+ JSONName +'.json');
If FileExists(FileName) Then
begin
FileCopy(FileName, ExpandConstant('{app}\Addons\'+ JSONName +'.json'), False);
end;
end;
[ini]
FileName: "{tmp}\Application\locale\zh_CN\gestures.ini"; Section: "globalPlugins.DragAndDrop.GlobalPlugin"; Key: "None"; String: "kb(desktop):numpad9+nvda, kb(desktop):.+nvda"; Tasks: DragAndDropGestures
Expand Down Expand Up @@ -262,37 +272,37 @@ Filename: "{tmp}\Application\nvda"; Parameters: "-m --install-silent --enable-st
Filename: "{tmp}\Application\nvda"; Parameters: "-m -s"; Flags: nowait
Filename: "{tmp}\VVTTS"; Parameters: "/S"; Components: "Voices\VVTTS and Settings"; AfterInstall: VVTTSINI();
Filename: "{tmp}\VVTTS"; Parameters: "/S"; Components: "Voices\VVTTS and not Settings"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\AiSound5*"" -aoa -o""{app}\Addons\AiSound5"""; Components: "Voices\AiSound5"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\AiSound5*.nvda-addon"" -aoa -o""{app}\Addons\AiSound5"""; Components: "Voices\AiSound5"; AfterInstall: JSONFile('AiSound5')
Filename: "{tmp}\7z"; Parameters: "x ""aisound.zip"" -aoa -o""{app}\Addons\AiSound5\synthDrivers"""; Components: "Voices\AiSound5"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\IBMTTS*"" -aoa -o""{app}\Addons\IBMTTS"""; Components: "Voices\VVTTS\IBMTTS"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\IBMTTS*.nvda-addon"" -aoa -o""{app}\Addons\IBMTTS"""; Components: "Voices\VVTTS\IBMTTS"; AfterInstall: JSONFile('IBMTTS')
Filename: "{tmp}\vcredist_x86"; Parameters: "/install /quiet /norestart"; Components: "Voices\WorldVoice"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\WorldVoice*"" -aoa -o""{app}\Addons\WorldVoice"""; Components: "Voices\WorldVoice"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\WorldVoice*.nvda-addon"" -aoa -o""{app}\Addons\WorldVoice"""; Components: "Voices\WorldVoice"; AfterInstall: JSONFile('WorldVoice')
Filename: "{tmp}\7z"; Parameters: "x ""aisound.zip"" -aoa -o""{app}\WorldVoice-workspace\aisound"""; Components: "Voices\WorldVoice"
Filename: "{tmp}\7z"; Parameters: "x ""VE.zip"" -aoa -o""{app}\WorldVoice-workspace\VE"""; Components: "Voices\WorldVoice"
Filename: "{tmp}\7z"; Parameters: "x ""voice.zip"" -aoa -o""{app}\WorldVoice-workspace"""; Components: "Voices\WorldVoice"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\Access8Math*"" -aoa -o""{app}\Addons\Access8Math"""; Components: "Addons\Access8Math"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\addonsHelp*"" -aoa -o""{app}\Addons\addonsHelp"""; Components: "Addons\addonsHelp"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\addonsTools*"" -aoa -o""{app}\Addons\addonsTools"""; Components: "Addons\addonsTools"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\Access8Math*.nvda-addon"" -aoa -o""{app}\Addons\Access8Math"""; Components: "Addons\Access8Math"; AfterInstall: JSONFile('Access8Math')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\addonsHelp*.nvda-addon"" -aoa -o""{app}\Addons\addonsHelp"""; Components: "Addons\addonsHelp"; AfterInstall: JSONFile('addonsHelp')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\addonsTools*.nvda-addon"" -aoa -o""{app}\Addons\addonsTools"""; Components: "Addons\addonsTools"; AfterInstall: JSONFile('addonsTools')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\addonUpdater*"" -aoa -o""{app}\Addons\addonUpdater"""; Components: "Addons\addonUpdater"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\audioManager*"" -aoa -o""{app}\Addons\audioManager"""; Components: "Addons\audioManager"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\baiduTranslation*"" -aoa -o""{app}\Addons\baiduTranslation"""; Components: "Addons\baiduTranslation"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\clipboardEnhancement*"" -aoa -o""{app}\Addons\clipboardEnhancement"""; Components: "Addons\clipboardEnhancement"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\DragAndDrop*"" -aoa -o""{app}\Addons\DragAndDrop"""; Components: "Addons\DragAndDrop"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\enhancedTouchGestures*"" -aoa -o""{app}\Addons\enhancedTouchGestures"""; Components: "Addons\enhancedTouchGestures"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\goldenCursor*"" -aoa -o""{app}\Addons\goldenCursor"""; Components: "Addons\goldenCursor"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\ime_expressive*"" -aoa -o""{app}\Addons\ime_expressive"""; Components: "Addons\imeExpressive"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\inputLock*"" -aoa -o""{app}\Addons\inputLock"""; Components: "Addons\inputLock"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\instantTranslate*"" -aoa -o""{app}\Addons\instantTranslate"""; Components: "Addons\instantTranslate"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\MSEdgeDiscardAnnouncements*"" -aoa -o""{app}\Addons\MSEdgeDiscardAnnouncements"""; Components: "Addons\MSEdgeDiscardAnnouncements"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\numberProcessing*"" -aoa -o""{app}\Addons\numberProcessing"""; Components: "Addons\numberProcessing"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\QQEnhancement*"" -aoa -o""{app}\Addons\QQEnhancement"""; Components: "Addons\QQEnhancement"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\remote*"" -aoa -o""{app}\Addons\remote"""; Components: "Addons\remote"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\resourceMonitor*"" -aoa -o""{app}\Addons\resourceMonitor"""; Components: "Addons\resourceMonitor"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\unmute*"" -aoa -o""{app}\Addons\unmute"""; Components: "Addons\unmute"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\NVDACNMirror*"" -aoa -o""{app}\Addons\NVDACNMirror"""; Components: "Addons\NVDACNMirror"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\WeChatEnhancement*"" -aoa -o""{app}\Addons\WeChatEnhancement"""; Components: "Addons\WeChatEnhancement"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\wintenApps*"" -aoa -o""{app}\Addons\wintenApps"""; Components: "Addons\wintenApps"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\xyOCR*"" -aoa -o""{app}\Addons\xyOCR"""; Components: "Addons\xyOCR"
Filename: "{tmp}\7z"; Parameters: "x ""Addons\audioManager*.nvda-addon"" -aoa -o""{app}\Addons\audioManager"""; Components: "Addons\audioManager"; AfterInstall: JSONFile('audioManager')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\baiduTranslation*.nvda-addon"" -aoa -o""{app}\Addons\baiduTranslation"""; Components: "Addons\baiduTranslation"; AfterInstall: JSONFile('baiduTranslation')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\clipboardEnhancement*.nvda-addon"" -aoa -o""{app}\Addons\clipboardEnhancement"""; Components: "Addons\clipboardEnhancement"; AfterInstall: JSONFile('clipboardEnhancement')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\DragAndDrop*.nvda-addon"" -aoa -o""{app}\Addons\DragAndDrop"""; Components: "Addons\DragAndDrop"; AfterInstall: JSONFile('DragAndDrop')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\enhancedTouchGestures*.nvda-addon"" -aoa -o""{app}\Addons\enhancedTouchGestures"""; Components: "Addons\enhancedTouchGestures"; AfterInstall: JSONFile('enhancedTouchGestures')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\goldenCursor*.nvda-addon"" -aoa -o""{app}\Addons\goldenCursor"""; Components: "Addons\goldenCursor"; AfterInstall: JSONFile('goldenCursor')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\ime_expressive*.nvda-addon"" -aoa -o""{app}\Addons\ime_expressive"""; Components: "Addons\imeExpressive"; AfterInstall: JSONFile('ime_expressive')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\inputLock*.nvda-addon"" -aoa -o""{app}\Addons\inputLock"""; Components: "Addons\inputLock"; AfterInstall: JSONFile('inputLock')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\instantTranslate*.nvda-addon"" -aoa -o""{app}\Addons\instantTranslate"""; Components: "Addons\instantTranslate"; AfterInstall: JSONFile('instantTranslate')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\MSEdgeDiscardAnnouncements*.nvda-addon"" -aoa -o""{app}\Addons\MSEdgeDiscardAnnouncements"""; Components: "Addons\MSEdgeDiscardAnnouncements"; AfterInstall: JSONFile('MSEdgeDiscardAnnouncements')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\numberProcessing*.nvda-addon"" -aoa -o""{app}\Addons\numberProcessing"""; Components: "Addons\numberProcessing"; AfterInstall: JSONFile('numberProcessing')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\QQEnhancement*.nvda-addon"" -aoa -o""{app}\Addons\QQEnhancement"""; Components: "Addons\QQEnhancement"; AfterInstall: JSONFile('QQEnhancement')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\remote*.nvda-addon"" -aoa -o""{app}\Addons\remote"""; Components: "Addons\remote"; AfterInstall: JSONFile('remote')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\resourceMonitor*.nvda-addon"" -aoa -o""{app}\Addons\resourceMonitor"""; Components: "Addons\resourceMonitor"; AfterInstall: JSONFile('resourceMonitor')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\unmute*.nvda-addon"" -aoa -o""{app}\Addons\unmute"""; Components: "Addons\unmute"; AfterInstall: JSONFile('unmute')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\NVDACNMirror*.nvda-addon"" -aoa -o""{app}\Addons\NVDACNMirror"""; Components: "Addons\NVDACNMirror"; AfterInstall: JSONFile('NVDACNMirror')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\WeChatEnhancement*.nvda-addon"" -aoa -o""{app}\Addons\WeChatEnhancement"""; Components: "Addons\WeChatEnhancement"; AfterInstall: JSONFile('WeChatEnhancement')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\wintenApps*.nvda-addon"" -aoa -o""{app}\Addons\wintenApps"""; Components: "Addons\wintenApps"; AfterInstall: JSONFile('wintenApps')
Filename: "{tmp}\7z"; Parameters: "x ""Addons\xyOCR*.nvda-addon"" -aoa -o""{app}\Addons\xyOCR"""; Components: "Addons\xyOCR"; AfterInstall: JSONFile('xyOCR')

[Files]
Source: "Temp\Application.exe"; DestDir: "{tmp}"; Flags: dontcopy deleteafterinstall
Expand Down

0 comments on commit bc57b63

Please sign in to comment.