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

fix: Script registration for Windows #2848

Merged
merged 6 commits into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
{
"target": "nsis",
"arch": [
"ia32",
"x64"
]
}
Expand All @@ -40,15 +41,18 @@
"artifactName": "BotFramework-Composer-${version}-windows-setup.${ext}"
},
"nsis": {
"include": "resources/installer.nsh",
"perMachine": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": true,
"packElevateHelper": true,
"unicode": true,
"runAfterFinish": true,
"installerIcon": "resources/composerIcon.ico",
"uninstallerIcon": "resources/composerIcon.ico",
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "Bot Framework Composer (preview)",
"shortcutName": "Bot Framework Composer",
"oneClick": false
},
"linux": {
Expand Down
15 changes: 15 additions & 0 deletions Composer/packages/electron-server/resources/installer.nsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
!macro customInstall
DetailPrint "Register bfcomposer URI Handler"
DeleteRegKey HKCU "SOFTWARE\Classes\bfcomposer"
WriteRegStr HKCU "SOFTWARE\Classes\bfcomposer" "" "URL:Bot Framework Composer"
WriteRegStr HKCU "SOFTWARE\Classes\bfcomposer" "URL Protocol" ""
WriteRegStr HKCU "SOFTWARE\Classes\bfcomposer\DefaultIcon" "" "$INSTDIR\${APP_EXECUTABLE_FILENAME},1"
WriteRegStr HKCU "SOFTWARE\Classes\bfcomposer\shell" "" ""
WriteRegStr HKCU "SOFTWARE\Classes\bfcomposer\shell\open" "" ""
WriteRegStr HKCU "SOFTWARE\Classes\bfcomposer\shell\open\command" "" `"$INSTDIR\${APP_EXECUTABLE_FILENAME}" "%1"`
!macroend

!macro customUninstall
DetailPrint "Unregister bfcomposer URI Handler"
DeleteRegKey HKCU "SOFTWARE\Classes\bfcomposer"
!macroend
2 changes: 1 addition & 1 deletion Composer/packages/electron-server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getBaseUrl = () => {
if (!serverPort) {
throw new Error('getBaseUrl() called before serverPort is defined.');
}
return `http://localhost:${serverPort}`;
return `http://localhost:${serverPort}/`;
};

function processArgsForWindows(args: string[]): string {
Expand Down