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 7 or later
- Visual Studio 2015 Community Edition or the equivalent
- Git for Windows Windows - options include msysgit, TortoiseGit (a GUI wrapper around msysgit) or the git tools for Visual Studio Pro (integrated with Team Explorer)
- Clone the source for PDFsharp:
- example:
git clone https://github.com/inexorabletash/PDFsharp.git
- This fork includes required patches that have not yet been accepted upstream.
- Using Visual Studio, open
PDFsharp\code\BuildAll-PdfSharp-VS2010.sln
, select the Release target, and build. - Clone this repository:
- example:
git clone https://github.com/inexorabletash/travellermap.git
- 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\code\PDFSharp\bin\Release\PdfSharp.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 F5 to start debugging.
- IIS will start and IE will connect to the site, launching the default page (
index.html
) - The map will display!
Make a database:
- Right-click the Maps project
- Select Add New Item...
- Select SQL Server Database
- Give it a good name
- Click Add
- The system will prompt you to add the database to the
App_Data
folder; pick Yes.
Now that the database has been added, you must change your web.config:
- Find the
App_Data
folder - Within it, double-click your newly-created
.mdf
file - The Database Explorer will open
- In the Properties panel, navigate to the
Connection String
property; copy the value of that property - Open your
web.config
and find theconnectionStrings
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 F5 to start 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/admin?action=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. Hit your back button and try out Search.
NOTE: When the Debug target is running, only the worlds in "selected" sectors will be indexed. A Release build will index all worlds.