Skip to content

Latest commit

 

History

History
59 lines (45 loc) · 3.43 KB

SETUP.md

File metadata and controls

59 lines (45 loc) · 3.43 KB

The Traveller Map - Setup Guide

This is the setup guide to source code behind https://travellermap.com - an online resource for fans of the Traveller role playing game.

This guide assumes basic familiarity with using Visual Studio projects and the Git source control system.

Prerequisites

Setup and Build

  1. Clone the source for PDFsharp 1.5:
    • example: git clone https://github.com/empira/PDFsharp-1.5
  2. Using Visual Studio, open PDFsharp\code\BuildAll-PdfSharp.sln, select the Release target, and build.
  3. Clone this repository:
    • example: git clone https://github.com/inexorabletash/travellermap.git
  4. In your clone, copy the included web.config.sample file to web.config
  5. Using Visual Studio, open Maps.sln
  6. In the Solution Explorer pane, in both the Maps project and the UnitTests project, delete and re-add the references to PdfSharp to point to the PDFSharp DLL you just built (PDFsharp-1.5\src\PdfSharp-gdi\bin\Release\PdfSharp-gdi.dll)
  7. Optionally, modify the web.config file in the solution:
    • Add an admin key - this can be used to trigger flushing of the memory cache and rebuilding the search index.
    • Find the <sessionState> element and the stateConnectionString attribute; change 50103 to your local IISExpress port number. Find this by opening the Maps project's properties and looking for the Web tab, "Servers" subsection, Project URL box (mine says http://localhost:50103/ for example).
  8. Select the Debug or Release target and build the Maps target.

Trying it out

  • You can run it however you like; I use Ctrl+F5 to start without debugging.
  • IIS will start and your default browser will connect to the site.
  • The map will display!

To Add a Database

Some features such as search require a database.

  1. Ensure you have some version of SQL Server installed (Express, Developer, etc). SQL Server Downloads
  2. Track down the connection string for the database. When installing SQL Server Express Edition, this is given at the end of the install, and looks like: Server=localhost\SQLEXPRESS;Database=master;Trusted_Connection=True;
  3. Open the Solution > Maps > Web.config file and find the <connectionStrings> element
  4. Paste your copied connection string information from the properties panel into the connectionString attribute of both the SqlDev and SqlProd names
  5. Save your Web.config

Now that your application can find your empty database, the reindex action on the admin page will fill an empty database:

  1. Start the site; I use Ctrl+F5 to start without debugging.
  2. Your browser will open to the default page, http://localhost:<YOUR_PORT>/index.htm
  3. Edit the URL to load: http://localhost:<YOUR_PORT>/admin/reindex

You will see output from the re-indexing operation; when complete the page will show a summary followed by a little Omega symbol (Ω) at the bottom of the page.

To verify that the database is populated, you can run a query:

  • http://localhost:<YOUR_PORT>/api/search?q=regina

NOTE: When the Debug build target is running, only the worlds in "selected" sectors will be indexed. A Release build will index all worlds.