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.
- Windows 10 or later
- Visual Studio Community 2022 or the equivalent
- Git for Windows - or the equivalent
- Clone the source for PDFsharp 1.5:
- example:
git clone https://github.com/empira/PDFsharp-1.5
- example:
- Using Visual Studio, open
PDFsharp\code\BuildAll-PdfSharp.sln
, select the Release target, and build. - Clone this repository:
- example:
git clone https://github.com/inexorabletash/travellermap.git
- example:
- In your clone, copy the included
web.config.sample
file toweb.config
- Using Visual Studio, open
Maps.sln
- 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
) - 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 thestateConnectionString
attribute; change50103
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 sayshttp://localhost:50103/
for example).
- Select the Debug or Release target and build the Maps target.
- 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!
Some features such as search require a database.
- Ensure you have some version of SQL Server installed (Express, Developer, etc). SQL Server Downloads
- 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;
- Open the Solution > Maps >
Web.config
file and find the<connectionStrings>
element - Paste your copied connection string information from the properties panel into the
connectionString
attribute of both theSqlDev
andSqlProd
names - 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:
- Start the site; I use Ctrl+F5 to start without debugging.
- Your browser will open to the default page,
http://localhost:<YOUR_PORT>/index.htm
- 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.