Skip to content

Commit d8b3ef4

Browse files
authored
chore: new prerelease (#169)
2 parents e9073a8 + bd8cdf1 commit d8b3ef4

File tree

153 files changed

+23791
-644
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+23791
-644
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/build.yml

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,89 @@ jobs:
1212
CAKE_SETTINGS_ENABLESCRIPTCACHE: true
1313

1414
steps:
15+
- name: git credentials
16+
uses: oleksiyrudenko/gha-git-credentials@v2-latest
17+
with:
18+
token: '${{ secrets.GH_TOKEN }}'
19+
global: true
20+
1521
- name: Checkout
16-
uses: actions/checkout@v3
22+
working-directory: c:/
23+
run: |
24+
git clone --single-branch --branch $("${{ github.ref }}".Replace('refs/heads/', '')) ${{ github.server_url }}/${{ github.repository }}.git repo
25+
26+
- name: Setup vcpkg
27+
working-directory: c:/
28+
run: |
29+
git clone https://github.com/microsoft/vcpkg.git
30+
cd vcpkg
31+
bootstrap-vcpkg.bat
32+
vcpkg.exe integrate install
33+
34+
- name: Cache vcpkg packages
35+
uses: actions/cache@v3
1736
with:
18-
fetch-depth: 0
19-
token: ${{ secrets.GH_TOKEN }}
37+
path: c:/repo/vcpkg_installed
38+
key: ${{ runner.os }}-vcpkg-${{ hashFiles('c:/repo/vcpkg.json') }}
39+
restore-keys: |
40+
${{ runner.os }}-vcpkg-
2041
2142
- name: Cache nuget packages
2243
uses: actions/cache@v3
2344
with:
2445
path: ~/.nuget/packages
25-
key: ${{ runner.os }}-nuget-${{ hashFiles('src/*/*.csproj') }}
46+
key: ${{ runner.os }}-nuget-${{ hashFiles('c:/repo/src/*/*.csproj') }}
2647
restore-keys: |
2748
${{ runner.os }}-nuget-
2849
2950
- name: Cache dotnet tools
3051
uses: actions/cache@v3
3152
with:
32-
path: tools
33-
key: ${{ runner.os }}-dotnet-tools-${{ hashFiles('build.cake', '.config/dotnet-tools.json') }}
53+
path: c:/repo/tools
54+
key: ${{ runner.os }}-dotnet-tools-${{ hashFiles('build.cake', 'c:/repo/.config/dotnet-tools.json') }}
3455
restore-keys: |
3556
${{ runner.os }}-dotnet-tools-
3657
58+
- name: Restore dotnet tools
59+
working-directory: c:/repo
60+
run: |
61+
dotnet tool restore
62+
3763
- uses: actions/setup-node@v3
3864
with:
3965
node-version: 18
40-
cache: 'npm'
41-
cache-dependency-path: src/papyrus-lang-vscode/package-lock.json
66+
67+
- name: Get npm cache directory
68+
id: npm-cache-dir
69+
shell: pwsh
70+
run: echo "dir=$(npm config get cache)" >> ${env:GITHUB_OUTPUT}
71+
72+
- name: Cache npm packages
73+
uses: actions/cache@v3
74+
with:
75+
path: ${{ steps.npm-cache-dir.outputs.dir }}
76+
key: ${{ runner.os }}-npm-${{ hashFiles('c:/repo/src/papyrus-lang-vscode/package-lock.json') }}
77+
restore-keys: |
78+
${{ runner.os }}-npm-
4279
4380
- name: Setup Nuget.exe
44-
if: success()
4581
uses: nuget/setup-nuget@v1
4682

83+
- name: Install vcpkg packages
84+
working-directory: c:/repo
85+
run: |
86+
../vcpkg/vcpkg.exe install --x-wait-for-lock --triplet x64-windows-static --x-install-root=c:/repo/vcpkg_installed/skyrim --x-feature=skyrim
87+
../vcpkg/vcpkg.exe install --x-wait-for-lock --triplet x64-windows-static --x-install-root=c:/repo/vcpkg_installed/fallout4 --x-feature=fallout4
88+
4789
- name: Build and Publish
4890
if: success()
49-
uses: ecampidoglio/cake-action@v1
50-
with:
51-
target: default
91+
working-directory: c:/repo
92+
run: |
93+
dotnet cake
5294
env:
5395
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
5496
VSCE_PAT: ${{ secrets.VSCE_TOKEN }}
55-
RELEASE: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/prerelease' }}
56-
PRERELEASE: ${{ github.ref == 'refs/heads/prerelease' }}
97+
# TODO: Rename this stuff for clarity once release build artifacts are being created
98+
# TODO: Cleanup workflows for various event types in general
99+
RELEASE: ${{( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/prerelease') && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' }}
100+
PRERELEASE: ${{ github.ref == 'refs/heads/prerelease' && github.event_name != 'pull_request' && github.event_name != 'pull_request_target' }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,5 @@ ASALocalRun/
333333
tools
334334

335335
send.ps1
336+
337+
vcpkg_installed

.vscode/c_cpp_properties.json

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Skyrim",
5+
"includePath": [
6+
"${workspaceFolder}/dependencies/MetaStuff/include",
7+
"${workspaceFolder}/dependencies",
8+
"${workspaceFolder}/src/DarkId.Papyrus.DebugServer",
9+
"${workspaceFolder}/vcpkg_installed/skyrim/x64-windows-static/include"
10+
],
11+
"defines": [
12+
"WIN32",
13+
"SKYRIM",
14+
"_DEBUG",
15+
"_WINDOWS",
16+
"_USRDLL",
17+
"DARKID_PAPYRUS_DEBUGSERVER_EXPORTS",
18+
"SKSE_SUPPORT_XBYAK"
19+
],
20+
"forcedInclude": ["pdsPCH.h"],
21+
"windowsSdkVersion": "10.0.18362.0",
22+
"compilerPath": "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.34.31933/bin/Hostx64/x64/cl.exe",
23+
"cStandard": "c11",
24+
"cppStandard": "c++20",
25+
"intelliSenseMode": "msvc-x64"
26+
},
27+
{
28+
"name": "Fallout",
29+
"includePath": [
30+
"${workspaceFolder}/dependencies/MetaStuff/include",
31+
"${workspaceFolder}/dependencies",
32+
"${workspaceFolder}/src/DarkId.Papyrus.DebugServer",
33+
"${workspaceFolder}/vcpkg_installed/fallout4/x64-windows-static/include"
34+
],
35+
"defines": [
36+
"WIN32",
37+
"FALLOUT",
38+
"_DEBUG",
39+
"_WINDOWS",
40+
"_USRDLL",
41+
"DARKID_PAPYRUS_DEBUGSERVER_EXPORTS",
42+
"F4SE_SUPPORT_XBYAK"
43+
],
44+
"forcedInclude": [
45+
"${workspaceFolder}/src/DarkId.Papyrus.DebugServer/pdsPCH.h"
46+
],
47+
"windowsSdkVersion": "10.0.18362.0",
48+
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx64/x64/cl.exe",
49+
"cStandard": "c11",
50+
"cppStandard": "c++20",
51+
"intelliSenseMode": "windows-msvc-x64"
52+
}
53+
],
54+
"version": 4
55+
}

CONTRIBUTING.md

Lines changed: 2 additions & 128 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,3 @@
1-
## Table of Contents
1+
## TODO
22

3-
1. [About the Project](#about-the-project)
4-
1. [Questions and Help](#questions-and-help)
5-
1. [Getting Started](#getting-started)
6-
1. [Modules and Patterns](#modules-and-patterns)
7-
1. [Useful Resources](#useful-resources)
8-
9-
# About the Project
10-
11-
The VSCode extension is written in TypeScript with C# being used for the language server and debug proxy.
12-
13-
Uses the **[Papyrus Debug Adapter](https://github.com/joelday/papyrus-debug-server) xSE plugin** for live debugging.
14-
15-
Also uses [this fork of **Pyro**](https://github.com/rjstone/pyro) for PPJ builds.
16-
17-
# Questions and Help
18-
19-
Do you have questions or need help? Please come visit the....
20-
21-
[![Discord](https://img.shields.io/discord/558746231665328139.svg?color=%23738ADB) Papyrus Language Tools Discord](https://discord.gg/E4dWujQ)
22-
23-
Even if you don't plan to contribute code, it would be good to hear how you are using the extension and get your feedback.
24-
25-
# Getting Started
26-
27-
## Building
28-
29-
First, you will need Windows with the following installed on your system:
30-
31-
- VSCode [Download and install](https://code.visualstudio.com/)
32-
- Node.js [Download and install](https://nodejs.org/)
33-
- Git for Windows [Download and install](https://git-scm.com/download/win)
34-
- One of the following:
35-
- Minimum: .NET Core 2.1 SDK [Download and install](https://dotnet.microsoft.com/download/dotnet-core)
36-
- Recommended: Microsoft Visual Studio 2019 [Download and install](https://visualstudio.microsoft.com/vs/)
37-
38-
Also, building from the shell will be much easier if you use a **Powershell** (powershell.exe) console because the main build script is written in PS, but if you have Visual Studio installed you should be able to build from the solution file.
39-
40-
### 1
41-
42-
First, Fork the `joelday/papyrus-lang` repo on github. Then clone it:
43-
44-
```powershell
45-
git clone https://github.com/<yourusername>/papyrus-lang.git
46-
cd papyrus-lang
47-
```
48-
49-
### 2
50-
51-
Create a branch for your new development:
52-
53-
```powershell
54-
git checkout -b mynewfeature
55-
```
56-
57-
### 3
58-
59-
Set your upstream remote to help you pull changes from main when needed:
60-
61-
```powershell
62-
git remote add upstream https://github.com/joelday/papyrus-lang.git
63-
```
64-
65-
### 4
66-
67-
Make sure your script execution policy allows running unsigned scripts as long as they're already on disk and not executed from the internet:
68-
69-
```powershell
70-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
71-
Get-ExecutionPolicy -List
72-
```
73-
74-
### 5
75-
76-
Run the build script with default targets:
77-
78-
```powershell
79-
.\build.ps1
80-
```
81-
82-
In the same directory, run this to update the bundled third-party packages (which are provided by separate repos):
83-
84-
```powershell
85-
.\build.ps1 -Script build.cake -Target update-debug-plugin
86-
.\build.ps1 -Script build.cake -Target update-pyro-cli
87-
```
88-
89-
### 6
90-
91-
Run VSCode to open the papyrus-lang directory as a folder. If this is still your current directory then just run:
92-
93-
```powershell
94-
code .
95-
```
96-
97-
Hit **Ctrl-Shift-D** to open the Debug panel. At the top select **Launch (Build Extension Only)**.
98-
99-
Hit **F5** to build and launch the extension with debugging. After a little while you will see another VSCode window open. This is the Extension Development Host version of VSCode running the extension that was just built. Any changes you made to the code would be reflected in the debug/test install of the extension running in this window.
100-
101-
### 7
102-
103-
It is not required that you squash your commits before submitting a pull request, so just commit and push your changes to your fork, then submit the pull request for your branch. Please merge from `upstream/master` to your branch before submitting the pull request though to make sure your changes will merge.
104-
105-
```powershell
106-
git merge upstream/main
107-
```
108-
109-
# Modules and Patterns
110-
111-
This is a brief set of links to more info on modules and patterns used in the code.
112-
113-
- [decoration-ioc](https://github.com/joelday/decoration-ioc) is why `InstantiationService` is used to instantiate services and command handlers based on the Service Locator design pattern. It makes it easy to add references to services in the constructor of a class. For example just put `@IExtensionConfigProvider infoProvider: IExtensionConfigProvider` in the argument list of a constructor and it will magically get called with a reference.
114-
- For a simple example of how to add a command, see `src\papyrus-lang-vscode\src\features\commands\ViewAssemblyCommand.ts`
115-
- [rxjs](https://www.npmjs.com/package/rxjs) is used in many places for the reactive Observer/Observable asynchronous pattern.
116-
- [async/await](https://javascript.info/async-await) is used frequently. If possible try to use async functions and `await` on them because this allows other things to happen while a function is blocked on IO etc.
117-
- [deepmerge](https://www.npmjs.com/package/deepmerge) is used in some places.
118-
- Otherwise most of the code is similar to other vscode extensions.
119-
120-
# Useful Resources
121-
122-
- See the [Project Wiki](https://github.com/joelday/papyrus-lang/wiki)
123-
- [The Typescript Programming Language Documentation](https://www.typescriptlang.org/docs/home.html)
124-
- [VSCode Extension Anatomy](https://code.visualstudio.com/api/get-started/extension-anatomy)
125-
- [VSCode Extension Samples](https://github.com/microsoft/vscode-extension-samples) are useful for learning specific APIs
126-
- [Learn RxJS](https://www.learnrxjs.io/) (Reactive eXtensions for Javascript)
127-
- [JavaScript Promises](https://javascript.info/async)
128-
- The [Pro Git](https://git-scm.com/book/en/v2/) book
129-
- The [Contributing](https://github.com/joelday/papyrus-lang/wiki/Contributing) wiki page
3+
Removing for now since the previous version was very out of date.

DarkId.Papyrus.DebugServer.sln

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.4.33110.190
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DarkId.Papyrus.DebugServer.Skyrim", "src\DarkId.Papyrus.DebugServer\DarkId.Papyrus.DebugServer.Skyrim.vcxproj", "{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DarkId.Papyrus.DebugServer.Fallout4", "src\DarkId.Papyrus.DebugServer\DarkId.Papyrus.DebugServer.Fallout4.vcxproj", "{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|x64 = Debug|x64
13+
Debug|x86 = Debug|x86
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}.Debug|x64.ActiveCfg = Debug|x64
19+
{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}.Debug|x64.Build.0 = Debug|x64
20+
{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}.Debug|x86.ActiveCfg = Debug|x64
21+
{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}.Release|x64.ActiveCfg = Release|x64
22+
{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}.Release|x64.Build.0 = Release|x64
23+
{9F44D62A-8A45-4FD3-8142-22A229A8A2F4}.Release|x86.ActiveCfg = Release|x64
24+
{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}.Debug|x64.ActiveCfg = Debug|x64
25+
{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}.Debug|x64.Build.0 = Debug|x64
26+
{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}.Debug|x86.ActiveCfg = Debug|x64
27+
{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}.Release|x64.ActiveCfg = Release|x64
28+
{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}.Release|x64.Build.0 = Release|x64
29+
{69BB4564-BAE0-4D6B-9D36-752C987B1FA6}.Release|x86.ActiveCfg = Release|x64
30+
EndGlobalSection
31+
GlobalSection(SolutionProperties) = preSolution
32+
HideSolutionNode = FALSE
33+
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {10021B3F-6663-4F4D-879E-FB9365290403}
36+
EndGlobalSection
37+
EndGlobal

0 commit comments

Comments
 (0)