-
Notifications
You must be signed in to change notification settings - Fork 214
Windows Installation
MAKE SURE YOU HAVE THE DEPENDENCIES LISTED ON THE README FIRST
- Windows Linux Subsystem
- Prerequisites
- Obtaining the Source
- Setup Development Environment
- Build the Project
- Build the Launcher
- Configuration
- Running the Server
If you're not sure what this is, you can skip this section and continue onto the general Windows installation guide, otherwise keep reading.
Sapphire will also operate correctly (save for unforeseen issues) within the Windows Linux Subsystem (WSL) and is actively tested in this environment. While setup will not covered in this guide, please note that it does work and you may prefer to use this environment for development over the standard Windows development environment.
As a note for people using the Ubuntu WSL environment, Boost 1.63 is not in the standard repo on Ubuntu 14.04 LTSB and you need to either build it yourself, use a backports ppa or change your release stream from LTSB and update your Ubuntu install to a more recent version for easy access to prebuilt boost libraries of more recent Boost versions.
- Visual Studio 2017
- MySQL Server 5.6 or later
- Boost version 1.65.0 MSVC 14.1
- MySQL client (optional) ex: HeidiSQL
- Git or a graphical Git client like GitKracken
Installation of these will be explained later in the guide.
-
Open git bash and navigate to a directory of choice
-
Clone the Sapphire source, including submodules
git clone --recursive https://github.com/SapphireMordred/Sapphire.git
2a. To update the main Sapphire source, open a git bash shell from inside the Sapphire source directory and run the following
git pull git submodule update --init --recursive
-
Clone the Sapphire Launcher source
git clone https://github.com/SapphireMordred/SapphireLauncher.git
Using GitKracken as example:
-
Open GitKracken, and select to clone new repository from https://github.com/SapphireMordred/Sapphire.git and choose a folder to save the files.
-
Choose "yes" to initialize submodules.
2a. To update the source, you can visually click on a newer commit or use the git pull button. To update the submodules, right click on the submodule and choose the "update" option.
-
Clone the Sapphire Launcher repository from https://github.com/SapphireMordred/SapphireLauncher.git
-
Download the Visual Studio 2017 installer and open it. (The community edition is fine!)
-
Run the installer selecting the .Net Desktop development and Desktop development with C++ options.
-
Switch to Individual components. You'll need to also select NuGet for installation. Select any additional features as needed. You can always add them later.
-
Wait for the installation to complete. You will be prompted to restart your computer.
-
Download Boost for Windows.
- Sapphire on Windows requires Boost 1.65.0 at this time
- Compiling on Windows requires the MSVC 14.1 binaries.
- 32 bit is recommended at this time as the included zlib/libmysql only supports 32bit builds of Sapphire.
-
Install Boost. This step may take a while as there are many files.
-
Add Boost to your Windows Environment Variables.
You can access this from the System Control Panel, and then clicking on Advanced System Settings.
Then add the entries for Boost.
- TODO
-
Download MySQL Community Server 5.7 or later.
1a. You can use premade setups like those found in WAMP, XAMPP, or others.
-
Install MySQL Server and make note of the password you set.
2a. You can set up additional users later.
-
Open Visual Studio 2017
-
Using the "Open Folder" file option, browse to the Sapphire source code folder. The project should open and CMake may begin generating a cache automatically.
2a. If you're using external CMake, open the generated SLN file instead.
-
If a CMake cache was not generated, open the CMakeSettings.json file in Visual Studio.
-
Edit the cmake generator fields from
Visual Studio 14 2015
toVisual Studio 15 2017
and save the file. CMake will start generating a cache. This may take a few minutes depending on your computer.4a. You can regenerate the CMake cache from the CMake menu or by right-clicking the CMakeLists.txt file.
-
Build the solution. Depending on how your Visual Studio is configured, you can build by:
CMake
menu >Build All
Build
menu >Build All
Right-click the CMakeLists.txt file and selectBuild
-
Files will be generated in the
Sapphire source folder
\bin
-
Open the
Sapphire Launcher
source folder. -
Open the
SapphireBootWPF.sln
solution file. It should open Visual Studio 2017. -
Right-click the Solution and select
Restore NuGet Packages
. -
Set your build target. The defaults are
Debug
andWin32
-
Build the launcher.
-
You can find the launcher executable files in
Sapphire launcher
\bin[x86
/x64
]\[Debug
/Release
] accordingly.
- Open the
Sapphire source
\bin\config folder. - Open each server's settings.xml file.
- Adjust the ListenIp, ZoneIp, and RestHost IP addresses if needed. For a local server for testing, keep these as
127.0.0.1
- Adjust the DataPath's of the server's settings.xml, to your FFXIV installation's game\sqpack\folder. Double backslashes are required. This will need to be adjusted to
C:\\Program Files (x86)\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack\\
if you have installed FFXIV to its default location. - Adjust the MySQL settings to match your MySQL server.
Host - the IP of the machine your MySQL server is running on. Default:
127.0.0.1
Port - the port that the MySQL server can be accessed on. Default:3306
Username - the username for your MySQL server. Default:root
Pass - the password for your MySQL server. Use the password you set during MySQL Server installation. If you used a pre-packaged MySQL server, the default root password may be blank or vary. Database - the database name for your Sapphire server. Default:sapphire
- Each configuration file also has server-specific parameters. Do not adjust these unless you are familiar with them.
- Go to the
Sapphire source\sql
folder.- Edit
import.sh
to match your environment. These settings will assume you are running all servers on the same computer you're currently using. The command paths may need to be adjusted to your environment. IMPORT_PATH="full path to your Sapphire source folder\\sql.
" Note: This path needs to use double forward slashes. Ex:C://Users//[your username here]//Documents//Sapphire//sql//
USER=your MySQL username
PASS=your MySQL password (can be blank)
DBNAME=your Sapphire database name
- Run the
import.sh
file.
- Edit
Using a graphical MySQL client such as HeidiSQL:
-
Download HeidiSQL. You can install it or use the Portable installation.
-
Run HeidiSQL and add a new server session. Adjust the settings to match your MySQL server. Then click Open. Hostname / IP - the hostname or IP of your server default:
127.0.0.1
User - the username for your MySQL server. Default:root
Password - the password for your MySQL server. Use the password you set during MySQL Server installation. If you used a pre-packaged MySQL server, the default root password may be blank or vary. Port - the port that the MySQL server can be accessed on. Default:3306
-
Create a new database named
sapphire
. The default options are fine. Note: If you want to name your database something else, adjust the other config above. -
Select the
sapphire
database so it is highlighted. Then go toFile
>Run SQL File
-
Navigate to your
Sapphire source\sql
folder and select all of the files. HeidiSQL will then run each file on thesapphire
database. -
Refresh HeidiSQL to verify the import was successful. You may need to run the update.sql file again if it contains any data.
- Start your MySQL server if it is not running.
- Start sapphire_lobby.exe Note: You may be prompted by Windows Firewall to allow access.
- Start sapphire_api.exe Note: You may be prompted by Windows Firewall to allow access. Note 2: The REST server requires Port 80 to function. Ensure no other programs are using this port like Skype, Apache/httpd, etc.
- Start sapphire_zone.exe Note: You may be prompted by Windows Firewall to allow access.
-
Open the Sapphire Launcher
-
Click on the gear in the top right to enter the Launcher settings
-
Enter the URL to connect to your REST server. Default:
http://localhost/login.html
Note: PressCheck availability
to confirm your URL works. -
Navigate to your FFXIV installation and select the ffxiv.exe for DirectX9 mode or ffxiv_dx11.exe for DirectX11 mode. Note: the default path is
C:\Program Files (x86)\SquareEnix\FINAL FANTASY XIV - A Realm Reborn\game
-
Select your Expansion level and Language.
-
You should be greeted by the Sapphire Login screen.
-
Create an account if needed and login.
Getting Started
About
Installation
Developing
Actor Control
Scripting
Administration
Debug Commands
GM Commands
Other
PS4 Support