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

Upgrade and replace web server with EmbedIO #216

Merged
merged 33 commits into from
Jul 25, 2020

Conversation

YoRyan
Copy link
Member

@YoRyan YoRyan commented Jun 13, 2020

Successor to #202.

Replace the home-rolled web server with EmbedIO, separate and clean up the client webpages, and add a copy web content step to the build process. Also see these changes by Chris Jakeman.

Blueprints:
Foundation for interactive content on secondary screens/devices
Use EmbedIO in place of in-house web-server
Organise web content

@cjakeman cjakeman added the for-unstable Special label to include a pull request in the Unstable Version label Jun 13, 2020
twpol pushed a commit that referenced this pull request Jun 13, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #183 at e6c01f7: restored BNSF Scenic Route and updated link to Broad Gauge Productions
- Pull request #188 at cdece3b: Setting.IsModeActivity added so Menu remembers choice of activity or …
- Pull request #205 at 873bc47: Traction-braking cabview control considering also train brake
- Pull request #206 at f677478: Add additional sound triggers for steam locomotives
- Pull request #207 at a3889ab: Correct an issue with throttle not increasing
- Pull request #208 at 1468587: Bug fix for https://bugs.launchpad.net/or/+bug/1882499 OR requires first number > 1 in animation ( 1 1
- Pull request #209 at 032225e: Enable rotation of digital clock cab control; by Paolo
- Pull request #211 at 32b48ad: Update of and improvements to German locales of RunActivity PLUS first version of Russian locales by Weter
- Pull request #212 at 9886b63: Bug fix for https://bugs.launchpad.net/or/+bug/1882397. Consist engine info shows bad.…
- Pull request #216 at 0900b5a: Upgrade and replace web server with EmbedIO (v2)
twpol pushed a commit that referenced this pull request Jun 13, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #183 at e6c01f7: restored BNSF Scenic Route and updated link to Broad Gauge Productions
- Pull request #188 at cdece3b: Setting.IsModeActivity added so Menu remembers choice of activity or …
- Pull request #205 at 873bc47: Traction-braking cabview control considering also train brake
- Pull request #206 at f677478: Add additional sound triggers for steam locomotives
- Pull request #207 at a3889ab: Correct an issue with throttle not increasing
- Pull request #208 at 1468587: Bug fix for https://bugs.launchpad.net/or/+bug/1882499 OR requires first number > 1 in animation ( 1 1
- Pull request #209 at 032225e: Enable rotation of digital clock cab control; by Paolo
- Pull request #211 at 32b48ad: Update of and improvements to German locales of RunActivity PLUS first version of Russian locales by Weter
- Pull request #212 at 9886b63: Bug fix for https://bugs.launchpad.net/or/+bug/1882397. Consist engine info shows bad.…
- Pull request #214 at 4c9606f: Fix annoying startup exception when running with a debugger attached
- Pull request #216 at 0900b5a: Upgrade and replace web server with EmbedIO (v2)
twpol pushed a commit that referenced this pull request Jun 13, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #183 at e6c01f7: restored BNSF Scenic Route and updated link to Broad Gauge Productions
- Pull request #188 at cdece3b: Setting.IsModeActivity added so Menu remembers choice of activity or …
- Pull request #205 at 873bc47: Traction-braking cabview control considering also train brake
- Pull request #207 at a3889ab: Correct an issue with throttle not increasing
- Pull request #208 at 1468587: Bug fix for https://bugs.launchpad.net/or/+bug/1882499 OR requires first number > 1 in animation ( 1 1
- Pull request #209 at 032225e: Enable rotation of digital clock cab control; by Paolo
- Pull request #211 at 32b48ad: Update of and improvements to German locales of RunActivity PLUS first version of Russian locales by Weter
- Pull request #212 at 9886b63: Bug fix for https://bugs.launchpad.net/or/+bug/1882397. Consist engine info shows bad.…
- Pull request #214 at 4c9606f: Fix annoying startup exception when running with a debugger attached
- Pull request #216 at 0900b5a: Upgrade and replace web server with EmbedIO (v2)
- Pull request #217 at aae4d79: Additional Sound Triggers for steam locomotives
@cjakeman
Copy link
Contributor

Jenkins build reports:
WARNING: nuget.exe ([UTS] .NET package manager tool) is not found in %PATH% - the build may fail.
ERROR: Input redirection is not supported, exiting the process immediately.
'nuget' is not recognized as an internal or external command,
operable program or batch file.
ERROR: Failure during build (check the output above). Error 1.
Build step 'Execute Windows batch command' marked build as failure

so this method is not working. I'm closing the PR until we have an alternative, so the Jenkins build can continue.

Chris

@cjakeman cjakeman closed this Jun 14, 2020
@cjakeman
Copy link
Contributor

nuget.exe has been added to Jenkins, so I'm going to open this PR and try building again.

@cjakeman cjakeman reopened this Jun 16, 2020
twpol pushed a commit that referenced this pull request Jun 16, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #214 at 2b62097: Fix annoying startup exception when running with a debugger attached
- Pull request #216 at cf45322: Upgrade and replace web server with EmbedIO (v2)
Copy link
Contributor

@cjakeman cjakeman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have to resolve some conflicts manually, but Jenkins has now successfully included this in the Unstable build.
Hope it still works !
Chris

EDIT By Chris: Yes, it does work.

twpol pushed a commit that referenced this pull request Jul 15, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #221 at 13ba17f: Refactor try-catch blocks in RunActivity
- Pull request #225 at bb67fb6: Fix advanced adhesion wheelslip upon resuming from save: https://bugs.launchpad.net/or/+bug/1294410
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #233 at 4084c75: Remove startup exception in the launcher by refactoring a try-catch
twpol pushed a commit that referenced this pull request Jul 20, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 377e893: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #233 at 4084c75: Remove startup exception in the launcher by refactoring a try-catch
twpol pushed a commit that referenced this pull request Jul 21, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #145 at c024d04: Advanced Coupler Functionality
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 377e893: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #233 at 4084c75: Remove startup exception in the launcher by refactoring a try-catch
twpol pushed a commit that referenced this pull request Jul 22, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 377e893: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #233 at 4084c75: Remove startup exception in the launcher by refactoring a try-catch
- Pull request #234 at e3c545c: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 22, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 377e893: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #233 at 4084c75: Remove startup exception in the launcher by refactoring a try-catch
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 22, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 6b464fb: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #233 at 4084c75: Remove startup exception in the launcher by refactoring a try-catch
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at b74ea65: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 2ba1d2c: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 9b12015: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 9b12015: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 9b12015: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
@wjcurrey wjcurrey assigned wjcurrey and unassigned wjcurrey Jul 23, 2020
@wjcurrey wjcurrey self-requested a review July 23, 2020 19:37
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 9b12015: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at bca1702: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 25dbdea: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at bca1702: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at da3c574: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 0b66e51: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 23, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at d189ea9: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 24, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 03dc5dd: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
twpol pushed a commit that referenced this pull request Jul 24, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 633793b: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
@cjakeman cjakeman removed the request for review from twpol July 24, 2020 12:12
twpol pushed a commit that referenced this pull request Jul 24, 2020
- Pull request #40 at e81861b: Monogame upgrade
- Pull request #79 at 7d9f14b: Update version calculation for new unstable versions
- Pull request #216 at 927a49c: Upgrade and replace web server with EmbedIO
- Pull request #226 at 26983e9: EmbedIO web server graphical track monitor
- Pull request #227 at 6ec1539: EmbedIO web server graphical train driving monitor
- Pull request #228 at 72c0146: adds links to OR on Elvas Tower
- Pull request #232 at 699c09a: JSON consist format: https://blueprints.launchpad.net/or/+spec/consist-editor
- Pull request #234 at 3ac34fe: Rehabilitate unit testing suite, migrate to xUnit 2
Copy link
Contributor

@wjcurrey wjcurrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am approving these changes. Per a PM discussion with Ryan, and anticipating that external devices would be enabled in the future. This should allow other WebServer changes to proceed

Copy link
Member

@twpol twpol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, although I have not reviewed the web content as my professional experience is going to make that painful :)

@@ -137,6 +141,11 @@ editbin /NOLOGO /LARGEADDRESSAWARE "Program\RunActivityLAA.exe" || GOTO :error
copy "Program\RunActivity.exe.config" "Program\RunActivityLAA.exe.config" || GOTO :error
ECHO Created large address aware version of RunActivity.exe.

REM Copy the Web content, empty the destination folder first
IF EXIST "Program\Content\Web" RMDIR "Program\Content\Web" /S /Q
IF NOT EXIST "Program\Content\Web" MKDIR "Program\Content\Web"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The utility ":recreate" should do these two steps for you, e.g.

CALL :recreate "Program\Content\Web" || GOTO :error

However, because the entire Program directory is recreated earlier on line 102/106, this whole bit is not needed.

<Content Include="Viewer3D\WebServices\Web\js\trackmonitor.js" />
<Content Include="Viewer3D\WebServices\Web\or_logo.png" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\index.html" />
<Content Include="Viewer3D\WebServices\Web\TrackMonitor\index.js" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these references needed? I am confused by having these references and the XCOPY for the same directories, but maybe I'm missing something?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

twpol pushed a commit to openrails/openrails.org that referenced this pull request Oct 31, 2020
Upgrade and replace web server with EmbedIO
@twpol twpol added the refactoring Changes with minimal user-visible effects label Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for-unstable Special label to include a pull request in the Unstable Version refactoring Changes with minimal user-visible effects
6 participants