Ticket #680 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

GS2 installed in a filepath containing spaces where GLI runs apache-httpd

Reported by: ak19 Owned by: ak19
Priority: high Milestone: 2.84 Release
Component: GLI Severity: major
Keywords: Cc:

Description

Previously GLI couldn't deal with spaces in the filepath when running apache-httpd (if running server.exe things were fine).

The problem was with how GLI launched gs2-server.bat (which would launch apache-httpd): GLI needs to use cmd /c START "win-name" "c:\path to\gs2-server.bat" --config=config filepath [--quitport=portnum].

Another problem was with how parameters to the command given to START (i.e. parameters to gs2-server.bat launched by START) are not allowed to be embedded in quotes, the command to START itself can be (gs2-server.bat).

If the path to the config file contained spaces, this would be a problem to the existing gs2-server.bat.

The solution was to

1. In GLI: make GLI embed the gs2-server.bat command (its entire path) in quotes, which is acceptable by START.

2. In gs2-server.bat: next, it was necessary to piece together all the parameters gs2-server.bat received and work out the config-file and optional portnum from that. Then the server.jar could be launched with the config file path constructed from the individual parameters and the quit-portnumber.

One final change to gs2-server.bat was to once make the new DOS prompt launched by GLI (for the apache web server) to know to exit when it's launched through GLI, but not if the apache webserver was launched independently. This is to keep the program as it was working before, and because one doesn't want GLI to leave open and unused DOS prompts all over the place.

Change History

Changed 9 years ago by ak19

  • status changed from new to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.