Calabro, Brandon af5a56a0ae Apply SED Patches
2025-10-10 17:16:32 -05:00
2025-07-20 20:17:53 -05:00
2025-10-10 17:16:32 -05:00
2025-10-10 17:16:32 -05:00
2025-10-10 14:45:04 -05:00
2025-10-10 15:29:01 -05:00
2025-07-20 20:17:53 -05:00
2025-07-20 20:17:53 -05:00

swg-docker

This project sets up a development environment for SWG using Docker.

Instructions:

  1. Clone this repository.
  2. (Optional) To use a custom git repository or database credentials, create a file named .env in this directory. See the "Custom Configuration" section below for details.
  3. Run docker compose up -d --build to build the images and start the services. This may take a long time on the first run.
  4. Run docker exec -it swg bash to get a shell inside the swg container.
  5. Run ant swg to compile the game and assets. This is a one-time step that can take over an hour. You only need to re-run it if you destroy the Docker volumes.
  6. Run ant start & to start the server.
  7. Run ant stop to stop the server.

Connecting Your Client

To connect your client, open the login.cfg file in your client directory and ensure the settings match the following. The server address should be 127.0.0.1 if the client is on the same machine as the Docker container.

[Station]
    subscriptionFeatures=1
    gameFeatures=65535

[ClientGame]
    loginServerPort0=44453
    loginServerAddress0=127.0.0.1

Custom SWG Repository

You can configure the Docker build to pull the swg-main source from your own repository. Create a file named .env in the root of this project and add the following variables as needed.

Example .env file:

# .env file for custom repository configuration

# The full HTTPS URL to your git repository.
# If left unset, it defaults to https://github.com/SWG-Source/swg-main.git
REPO_URL=https://github.com/SWG-Source/swg-main.git

# (Optional) Credentials for private repositories.
# For security, it is highly recommended to use a Personal Access Token instead of your actual password.
# If you do not need a username or password then ignore adding these lines.
REPO_USERNAME=your-gitlab-username
REPO_PASSWORD=your-personal-access-token

# (Optional) Credentials for the oracle DB user/pass, otherwise DO NOT add these 2 lines.
DB_USER=swg
DB_USER_PASSWORD=swg

Fixing Oracle DB User

docker exec -it oracle bash

sqlplus / as sysdba

ALTER SESSION SET CONTAINER = FREEPDB1;
CREATE USER swg IDENTIFIED BY "swg";
GRANT dba TO swg;

exit
exit

DEVELOPER GUIDE

Here are some commands that will help with development. Say you need to move files to the TRE and they compiled within the container, you can easily copy files to your local file system.

First, exit the container with exit then:

docker cp <container_name>:<path_inside_container> <local_path>

For example, this command will copy the buff.iff file to a local directory called ServerFiles on the Desktop of my Window's machine. NOTE: For Windows, surround the <local_path> with quotes.

docker cp swg:/swg-main/data/sku.0/sys.shared/compiled/game/datatables/buff/buff.iff "C:\Users\username\OneDrive\Desktop\ServerFiles"

Description
No description provided
Readme 122 MiB
Languages
Dockerfile 65%
Shell 35%