Skip to content

Commit

Permalink
fix: Script registration for Windows (microsoft#2848)
Browse files Browse the repository at this point in the history
* Added nsis script

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* Adding nsis registration for windows

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* Removing unused macros

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

* Fixed production base URL.

* Adding Tony to codeowners

Signed-off-by: Srinaath Ravichandran <srravich@microsoft.com>

Co-authored-by: Srinaath Ravichandran <srravich@microsoft.com>
Co-authored-by: Tony Anziano <tonyanziano5@gmail.com>
  • Loading branch information
3 people authored Apr 30, 2020
1 parent 928873a commit 9a540ac
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

/BotProject/ @boydc2014 @luhan2017

/Composer/ @cwhitten @boydc2014 @a-b-r-o-w-n @corinagum @beyackle @srinaath
/Composer/ @cwhitten @boydc2014 @a-b-r-o-w-n @corinagum @beyackle @srinaath @tonyanziano

/Composer/packages/extensions/visual-designer @yeze322 @cwhitten @boydc2014 @a-b-r-o-w-n

Expand Down
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

0 comments on commit 9a540ac

Please sign in to comment.