Improve build configuration and instructions
This commit is contained in:
parent
cd14dce0d7
commit
0fbefbe628
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ package-lock.json
|
||||
.vs
|
||||
bin
|
||||
obj
|
||||
*.user
|
||||
|
||||
# ---> Node
|
||||
# Logs
|
||||
|
12
.vscode/tasks.json
vendored
12
.vscode/tasks.json
vendored
@ -2,7 +2,7 @@
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "release: server",
|
||||
"label": "build: server",
|
||||
"type": "shell",
|
||||
"linux": {
|
||||
"command": "npm --prefix Server run release:any"
|
||||
@ -11,20 +11,20 @@
|
||||
"command": "npm --prefix Server run release:any"
|
||||
},
|
||||
"windows": {
|
||||
"command": "npm --prefix Server run release:win"
|
||||
"command": "npm --prefix Server run build"
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "release: launcher",
|
||||
"label": "build: launcher",
|
||||
"type": "shell",
|
||||
"linux": {
|
||||
"command": "dotnet publish Launcher/Launcher.csproj --nologo --verbosity minimal --runtime linux-x64 --configuration Release -p:PublishSingleFile=true --no-self-contained"
|
||||
"command": "dotnet publish Launcher/Launcher.csproj /p:PublishProfile=Launcher/Properties/PublishProfiles/linux-x64.pubxml"
|
||||
},
|
||||
"osx": {
|
||||
"command": "dotnet publish Launcher/Launcher.csproj --nologo --verbosity minimal --runtime osx-x64 --configuration Release -p:PublishSingleFile=true --no-self-contained"
|
||||
"command": "dotnet publish Launcher/Launcher.csproj /p:PublishProfile=Launcher/Properties/PublishProfiles/osx-x64.pubxml"
|
||||
},
|
||||
"windows": {
|
||||
"command": "dotnet publish Launcher/Launcher.csproj --nologo --verbosity minimal --runtime win-x64 --configuration Release -p:PublishSingleFile=true --no-self-contained"
|
||||
"command": "dotnet publish Launcher/Launcher.csproj /p:PublishProfile=Launcher/Properties/PublishProfiles/win-x64.pubxml"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
16
Launcher/Properties/PublishProfiles/linux-x64.pubxml
Normal file
16
Launcher/Properties/PublishProfiles/linux-x64.pubxml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\net6.0\publish\linux-x64\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
16
Launcher/Properties/PublishProfiles/osx-x64.pubxml
Normal file
16
Launcher/Properties/PublishProfiles/osx-x64.pubxml
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\net6.0\publish\osx-x64\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
17
Launcher/Properties/PublishProfiles/win-x64.pubxml
Normal file
17
Launcher/Properties/PublishProfiles/win-x64.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\net6.0\publish\win-x64\</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
13
README.md
13
README.md
@ -7,20 +7,9 @@ Prototype server for Escape From Tarkov
|
||||
The goal is to provide a minimal implementation to allow people to play an offline raid.
|
||||
It does not aim at being correct, fast or moddable but instead to be simple.
|
||||
|
||||
## Requirements
|
||||
|
||||
- visual studio 2022
|
||||
- node.js workload
|
||||
- .net desktop workload
|
||||
|
||||
## Setup
|
||||
|
||||
VS2022 > Solution Explorer > Server > npm > install npm Packages
|
||||
|
||||
## Build
|
||||
|
||||
1. VSCode > Terminal > Run Task > release: launcher
|
||||
2. VSCode > Terminal > Run Task > release: server
|
||||
See [getting started](docs/getstarted.md) for more information.
|
||||
|
||||
## License
|
||||
|
||||
|
@ -4,16 +4,16 @@
|
||||
"version": "1.0.0",
|
||||
"license": "NCSA",
|
||||
"scripts": {
|
||||
"build": "tsc --build",
|
||||
"build:ts": "npx tsc --build",
|
||||
"build:babel": "npx babel src --extensions \".ts\" --out-dir obj/babel",
|
||||
"build:bundle": "npx browserify --debug --node obj/babel/main.js > obj/server.js",
|
||||
"build:exe": "npx nexe -t x64-14.15.3 -i obj/server.js -o bin/Server.exe",
|
||||
"build:icon": "cd node_modules/rcedit/bin && rcedit-x64.exe ../../../bin/Server.exe --set-icon ../../../assets/images/favicon.ico",
|
||||
"debug": "npm run build:babel && npm run build:bundle && node --trace-warnings obj/server.js",
|
||||
"build": "npm run release:any && npm run build:icon",
|
||||
"debug": "npm run release:any && node --trace-warnings obj/server.js",
|
||||
"lint:fix": "npx eslint --fix \"./src/**/*.ts\"",
|
||||
"lint:check": "npx eslint \"./src/**/*.ts\"",
|
||||
"release:any": "npm run build:babel && npm run build:bundle && npm run build:exe",
|
||||
"release:win": "npm run release:any && npm run build:icon"
|
||||
"release:any": "npm run build:ts && npm run build:babel && npm run build:bundle && npm run build:exe"
|
||||
},
|
||||
"dependencies": {
|
||||
"source-map-support": "^0.5.0",
|
||||
|
35
docs/getstarted.md
Normal file
35
docs/getstarted.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Getting started
|
||||
|
||||
## Visual Studio 2022
|
||||
|
||||
### Requirements
|
||||
|
||||
- node.js workload
|
||||
- .net desktop workload
|
||||
|
||||
### Setup
|
||||
|
||||
Solution Explorer > Server > npm > install npm Packages
|
||||
|
||||
### Build
|
||||
|
||||
1. Solution Explorer > Launcher > Publish
|
||||
2. Solution Explorer > Server > build
|
||||
|
||||
## Visual Studio Code
|
||||
|
||||
### Requirements
|
||||
|
||||
- visual studio code
|
||||
- dotnet 6.0 sdk
|
||||
- nodejs 14.0.0 or newer
|
||||
- npm
|
||||
|
||||
### Setup
|
||||
|
||||
`npm --prefix Server install`
|
||||
|
||||
### Build
|
||||
|
||||
1. Terminal > Run Task > release: launcher
|
||||
2. Terminal > Run Task > release: server
|
@ -1,5 +1,10 @@
|
||||
# Notes
|
||||
|
||||
## Environment
|
||||
|
||||
- `build` script in `package.json` is configured for `Visual Studio 2022`'s special needs.
|
||||
Building the server project will not work otherwise.
|
||||
|
||||
## Implementation
|
||||
|
||||
- EFT http request / response does not respect headers, data is always zlibbed
|
||||
|
Loading…
x
Reference in New Issue
Block a user