File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ The only platform that can build packages for all three platforms is macOS:
130130```
131131brew install wine --without-x11
132132brew install mono
133+ brew install gnu-tar
133134npm install
134135npm run build:electron
135136```
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ const spawn = require('child_process').spawn;
33const app = require ( 'electron' ) . app ;
44
55function run_update_exe ( args , done ) {
6- const updateExe = path . resolve ( path . dirname ( process . execPath ) , '..' , ' Update.exe') ;
6+ const updateExe = path . resolve ( path . dirname ( process . execPath ) , 'Update.exe' ) ;
77 spawn ( updateExe , args , {
88 detached : true
99 } ) . on ( 'close' , done ) ;
Original file line number Diff line number Diff line change @@ -136,11 +136,20 @@ var onNewScreen = function(screen) {
136136// click back to the client having registered.
137137// It's up to us to recognise if we're loaded with
138138// this URL and tell MatrixClient to resume registration.
139+ //
140+ // If we're in electron, we should never pass through a file:// URL otherwise
141+ // the identity server will try to 302 the browser to it, which breaks horribly.
142+ // so in that instance, hardcode to use riot.im/app for now instead.
139143var makeRegistrationUrl = function ( ) {
140- return window . location . protocol + '//' +
141- window . location . host +
142- window . location . pathname +
143- '#/register' ;
144+ if ( window . location . protocol === "file:" ) {
145+ return 'https://riot.im/app/#/register' ;
146+ }
147+ else {
148+ return window . location . protocol + '//' +
149+ window . location . host +
150+ window . location . pathname +
151+ '#/register' ;
152+ }
144153}
145154
146155window . addEventListener ( 'hashchange' , onHashChange ) ;
You can’t perform that action at this time.
0 commit comments