May 28, 2017, 05:16:19 AM

Author Topic: Gnomoria Web Server  (Read 12275 times)

Roest

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Gnomoria Web Server
« Reply #30 on: August 02, 2015, 08:06:43 AM »
I'm using 2013 ultimate. Guess I use my MSDN subscription from work and get the 2015 professional and try it with that.

Your issues look good. Just had an idea when reading #9. How about making a graph showing the stockpile connections,
 which stockpile pulls from or pushes to which other stockpile.

Also spawning liquids would require spawning barrels or need to spawn into existing barrels.

Rychard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Gnomoria Web Server
« Reply #31 on: August 02, 2015, 08:30:31 AM »
I'm using 2013 ultimate. Guess I use my MSDN subscription from work and get the 2015 professional and try it with that.

Your issues look good. Just had an idea when reading #9. How about making a graph showing the stockpile connections,
 which stockpile pulls from or pushes to which other stockpile.

Also spawning liquids would require spawning barrels or need to spawn into existing barrels.

Yea, my MSDN subscription is expiring shortly, so when 2015 was released, I took the opportunity to downgrade to to the community edition so I wouldn't have to deal with the whole uninstall/reinstall process required to change between versions of Visual Studio.

It supports almost everything (Resharper, CodeMaid, extensions in general) but is missing CodeLens, which I had grown quite attached to.

Also, I love the idea of the stockpile visualizations.  Stockpile management is one of the most powerful features in the game; being able to manage this effectively would be a huge quality-of-life improvement.

Oh, and good catch regarding the necessity of a barrel when spawning liquid items, I'm not sure I would have thought of that.



Roest

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Gnomoria Web Server
« Reply #32 on: August 02, 2015, 09:28:25 AM »
Just did the whole thing again. Deleted Gnomoria dir, redownloaded, compiled with vs2015, linqed it and copied the GnomeApp as wwwroot.

... and it works.

Good to know we wasted several hours for such a stupid thing. :/

Rychard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Gnomoria Web Server
« Reply #33 on: August 02, 2015, 09:32:03 AM »
Just did the whole thing again. Deleted Gnomoria dir, redownloaded, compiled with vs2015, linqed it and copied the GnomeApp as wwwroot.

... and it works.

Good to know we wasted several hours for such a stupid thing. :/

It's interesting that it worked with VS2015, but not a previous version.  You'd think that it would at the very least indicate that there was some type of error.

I suppose that I'll have to add a note in the README file indicating that there is some unknown reason that requires VS2015 for everything to work correctly.

Morcaster

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Gnomoria Web Server
« Reply #34 on: August 06, 2015, 04:43:38 AM »
Is it just me or are the directions a bit confusing? In no way am I understanding what this means.

"Build the GnomeServer solution located in this repository."

"Copy the files below to your Gnomoria installation directory" I cannot find these files.

Roest

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: Gnomoria Web Server
« Reply #35 on: August 06, 2015, 08:39:33 AM »
Is it just me or are the directions a bit confusing? In no way am I understanding what this means.

"Build the GnomeServer solution located in this repository."

"Copy the files below to your Gnomoria installation directory" I cannot find these files.

Well it requires you to have Visual Studio 2015 installed and know how to build an application from
source code. Which is basically just double click the .sln file to open it with visual studio click the menu item build.

Satis

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Gnomoria Web Server
« Reply #36 on: August 21, 2015, 03:42:10 PM »
Well it requires you to have Visual Studio 2015 installed and know how to build an application from
source code. Which is basically just double click the .sln file to open it with visual studio click the menu item build.

Just a thought here.
Would it not be able for you to add an compiled version of the GnomeServer?
It's not that I can't compile it my self but there might be people out there that don't know a thing about compiling and such.

UFTimmy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Gnomoria Web Server
« Reply #37 on: September 01, 2015, 10:35:07 PM »
I'd like to get this working, but I am stuck. First, some problems I ran into, and how I solved them:

1. I had VS2013. Per the previous suggestion, I downloaded 2015 which helped.
2. I was not using the indev version. The project would not compile without the indev version.
3. When I updated the linq script for my steam path, I did not have the trailing slash on the path. The linq script could not find the gnomoria.dll file. It took a long time to realize the example path had the slash and add it back.

Now, here's the error I get when I build the project:

Quote
1>------ Build started: Project: GnomoriaInjection, Configuration: Debug x86 ------
2>------ Build started: Project: GnomeApp, Configuration: Debug x86 ------
2>VSTSC : error TS6053: Build: File 'C:/Users/Tim/Desktop/GnomeServer-master/GnomeServer-master/GnomeApp/app/models/Interfaces.d.ts' not found.
1>  GnomoriaInjection -> C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomoriaInjection\bin\x86\Debug\GnomoriaInjection.dll
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I think the GnomoriaInjection gets built, but the GnomeServer, which I think is used to power the server does not get built. So I can load the game up, but when I pull up the server in my browser, I get the white screen and when I click a link it tells me it can't find wwwroot. I placed in the version that you provided in a zip earlier, and that provides the styles, but clicking any of the links makes a loading icon appear in the upper right, and a 404 error in the console.

It looks like the site is trying to load in app/military/index.js, which isn't in the zip you provided. And I think the error posted above is preventing me from building the wwwroot directory.

Rychard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Gnomoria Web Server
« Reply #38 on: September 02, 2015, 06:15:03 AM »
I'd like to get this working, but I am stuck. First, some problems I ran into, and how I solved them:

1. I had VS2013. Per the previous suggestion, I downloaded 2015 which helped.
2. I was not using the indev version. The project would not compile without the indev version.
3. When I updated the linq script for my steam path, I did not have the trailing slash on the path. The linq script could not find the gnomoria.dll file. It took a long time to realize the example path had the slash and add it back.

I'm not sure what the issue is regarding VS2013.  You're not the only one who's experienced the issues, but I can't seem to figure out what's special about my local VS2013 installation that allows it to work.  I've effectively given up on solving that particular issue; I use VS2015 for all my development work, and both versions can be installed side-by-side so it's really only a minor inconvenience to anyone who doesn't already have VS2015.  There are a few upsides though, notably the default support for TypeScript in VS2015.

I've fixed the issue you mentioned when omitting the trailing slash, so thanks for bringing that to my attention.

Now, here's the error I get when I build the project:

Quote
1>------ Build started: Project: GnomoriaInjection, Configuration: Debug x86 ------
2>------ Build started: Project: GnomeApp, Configuration: Debug x86 ------
2>VSTSC : error TS6053: Build: File 'C:/Users/Tim/Desktop/GnomeServer-master/GnomeServer-master/GnomeApp/app/models/Interfaces.d.ts' not found.
1>  GnomoriaInjection -> C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomoriaInjection\bin\x86\Debug\GnomoriaInjection.dll
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I think the GnomoriaInjection gets built, but the GnomeServer, which I think is used to power the server does not get built. So I can load the game up, but when I pull up the server in my browser, I get the white screen and when I click a link it tells me it can't find wwwroot. I placed in the version that you provided in a zip earlier, and that provides the styles, but clicking any of the links makes a loading icon appear in the upper right, and a 404 error in the console.

It looks like the site is trying to load in app/military/index.js, which isn't in the zip you provided. And I think the error posted above is preventing me from building the wwwroot directory.

In Visual Studio, locate this file in the Solution Explorer: GnomeServer/GnomeApp/models/Interfaces.tt

Right-click it, and click Run Custom Tool

This should generate the Interfaces.d.ts file that you're missing; I'm not sure why it doesn't get built automatically if the output files don't exist, but it's possible that I've misconfigured something in the project settings.

The missing js files you referred to should get created automatically the next time you build the solution, after you generate that interfaces file I mentioned, of course.  If this doesn't occur, there must be some issue with the way I've configured TypeScript in the project.  Either way, let me know if you run into more issues, I'm happy to help.

UFTimmy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Gnomoria Web Server
« Reply #39 on: September 02, 2015, 07:00:03 AM »
Ahh, that makes sense. This is in the console of VS2015 when I start it:

Quote
Severity   Code   Description   Project   File   Line
Warning      A custom tool 'TextTemplatingFileGenerator' is associated with file 'app\models\Interfaces.tt', but the output of the custom tool was not found in the project.  You may try re-running the custom tool by right-clicking on the file in the Solution Explorer and choosing Run Custom Tool.   GnomeApp      

But, I have so little VS2015 experience, I didn't know what to do about it. When I first ran the custom tool, I got a warning that Manager.ttinclude was not trusted since I had downloaded it. Simple enough, I unblocked it as the instructions said. When I ran the tool, though, I got this:

Quote
Severity   Code   Description   Project   File   Line
Error      Compiling transformation: Metadata file 'C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomeApp\bin\GnomeApp.dll' could not be found   GnomeApp   C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomeApp\app\models\Interfaces.tt   1

Ignoring that, and building the whole project, I get this:

Quote
1>------ Build started: Project: GnomeApp, Configuration: Debug x86 ------
1>C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts(1,1): error TS1036: Build: Statements are not allowed in ambient contexts.
========== Build: 0 succeeded, 1 failed, 2 up-to-date, 0 skipped ==========

Near as I can find, I do not have a wwwroot folder with the app in it. Do I need to take the GnomeApp.dll from somewhere else and put it there?

Rychard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Gnomoria Web Server
« Reply #40 on: September 02, 2015, 07:08:36 AM »
Near as I can find, I do not have a wwwroot folder with the app in it. Do I need to take the GnomeApp.dll from somewhere else and put it there?

Oh, silly me.

Right click on the GnomeApp project in the Solution Explorer and click Publish.  In the wizard that appears, change the Publish Method to "File System" and tell it where to store the output.

The GnomeApp.dll (or anything in the GnomeApp/Bin directory) is unused.  TypeScript projects have a few nuances, and this is one of them.  ;)

UFTimmy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Gnomoria Web Server
« Reply #41 on: September 02, 2015, 07:31:20 AM »
Thanks, I went into Publish, and selected custom. I created a new publish profile for file system. When I ran it, I get an error that looks the same as I got when I build the solution:

Quote
1>------ Build started: Project: GnomeApp, Configuration: Release x86 ------
1>C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts(1,1): error TS1036: Build: Statements are not allowed in ambient contexts.
2>------ Skipped Publish: Project GnomeApp, Configuration: Release x86 ------
2>
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 0 failed, 1 skipped ==========

UFTimmy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Gnomoria Web Server
« Reply #42 on: September 02, 2015, 07:33:10 AM »
By the way, I really appreciate you getting back to so quickly. I am looking forward to using this!

Rychard

  • Newbie
  • *
  • Posts: 25
    • View Profile
Re: Gnomoria Web Server
« Reply #43 on: September 02, 2015, 07:39:04 AM »
Thanks, I went into Publish, and selected custom. I created a new publish profile for file system. When I ran it, I get an error that looks the same as I got when I build the solution:

Quote
1>------ Build started: Project: GnomeApp, Configuration: Release x86 ------
1>C:\Users\Tim\Desktop\GnomeServer-master\GnomeServer-master\GnomeApp\app\models\Interfaces.d.ts(1,1): error TS1036: Build: Statements are not allowed in ambient contexts.
2>------ Skipped Publish: Project GnomeApp, Configuration: Release x86 ------
2>
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 0 failed, 1 skipped ==========

I'm unsure why it's failing on that generated file.  Can you open that file, and copy/paste the contents to someplace like https://gist.github.com/ or http://pastebin.com/, so that I can compare it to my local copy?

In the meantime, here's the contents of that file on my machine, you can give this a try and see if it works:

https://gist.github.com/Rychard/05439410927669091ece

UFTimmy

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Gnomoria Web Server
« Reply #44 on: September 02, 2015, 07:49:05 AM »
Thanks, your Interfaces.d.ts file worked, and it generated the wwwroot contents. I cannot test it now to see if it works, but it looks like all the right files are there.

The contents of my file was: ErrorGeneratingOutput

Doh. I never noticed, but when I ran the custom tool on Interfaces.tt, the following appeared in the VS console, but it was delayed, so I guess I never saw it:

http://pastie.org/private/zxpmdd3umxbawql489zk0q

Am I missing a dll or something?