Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UE Release Polishing #80

Merged
merged 20 commits into from
Apr 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
inklecate_url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip
proof: false
unreal: false
- os: macos-14
artifact: macos-arm
name: MacOSX-ARM
inklecate_url: https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip
proof: false
unreal: false
- os: windows-latest
artifact: win64
name: Windows x64
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:
run: |
mkdir artifacts
ID=$(gh run list -b master --limit 1 --json databaseId | jq '.[0].databaseId')
gh run download $ID -D artifacts -n linux-cl -n linux-lib -n linux-clib -n unreal -n macos-cl -n macos-lib -n macos-clib -n win64-cl -n win64-lib -n win64-clib -n python-package-distribution
gh run download $ID -D artifacts -n linux-cl -n linux-lib -n linux-clib -n unreal -n macos-cl -n macos-lib -n macos-clib -n macos-arm-cl -n macos-arm-lib -n macos-arm-clib -n win64-cl -n win64-lib -n win64-clib -n python-package-distribution
mv artifacts/python-package-distribution dist
- name: Zip
working-directory: ${{github.workspace}}/artifacts
run: |
for f in linux-cl linux-lib linux-clib unreal macos-cl macos-lib macos-clib win64-cl win64-lib win64-clib; do zip -r ../$f.zip $f; done
for f in linux-cl linux-lib linux-clib unreal macos-cl macos-lib macos-clib macos-arm-cl macos-arm-lib macos-arm-clib win64-cl win64-lib win64-clib; do zip -r ../$f.zip $f; done
- name: List
run: tree
- name: Publish to PyPI
Expand All @@ -45,5 +45,5 @@ jobs:
--repo="$GITHUB_REPOSITORY" \
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
--generate-notes \
"$tag" "linux-cl.zip" "linux-lib.zip" "linux-clib.zip" "unreal.zip" "macos-cl.zip" "macos-lib.zip" "macos-clib.zip" "win64-cl.zip" "win64-lib.zip" "win64-clib.zip"
"$tag" "linux-cl.zip" "linux-lib.zip" "linux-clib.zip" "unreal.zip" "macos-cl.zip" "macos-lib.zip" "macos-clib.zip" "win64-cl.zip" "macos-arm-cl.zip" "macos-arm-lib.zip" "macos-arm-clib.zip "win64-lib.zip" "win64-clib.zip"

5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ inkcpp_cl/*.ink
*.code-workspace

# Doxygen
Documentation/*
!Documentation/cmake_example/
!Documentation/cmake_example.zip
Documentation/html/
Documentation/inkcpp_py.html

# Output
Build/*
Expand Down
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,11 @@ if (DOXYGEN_FOUND)
if (INKCPP_DOC_BlueprintUE)
# TODO: make as dependecy
file(COPY "${PROJECT_SOURCE_DIR}/unreal/blueprint_filter.js" DESTINATION ${PROJECT_BINARY_DIR})
file(DOWNLOAD
"https://blueprintue.com/bue-render/render.css"
"${PROJECT_BINARY_DIR}/render.css"
EXPECTED_HASH SHA256=875364e36f8aa5d6c1d41d58043f13b48a499b5c969e8daef35bd29bbf7c6e8d)
# file(DOWNLOAD
# "https://raw.githubusercontent.com/blueprintue/blueprintue-self-hosted-edition/main/www/bue-render/render.css"
# "${PROJECT_BINARY_DIR}/render.css"
# EXPECTED_HASH SHA256=875364e36f8aa5d6c1d41d58043f13b48a499b5c969e8daef35bd29bbf7c6e8d)
file(COPY "${PROJECT_SOURCE_DIR}/unreal/render.css" DESTINATION ${PROJECT_BINARY_DIR})
file(APPEND "${PROJECT_BINARY_DIR}/render.css" ".bue-render .icon { background-color: unset; }")
file(READ "${PROJECT_SOURCE_DIR}/Doxyfile" DOXYFILE)
string(REPLACE "FILTER_PATTERNS =" "FILTER_PATTERNS = \"*/unreal/*=node ${PROJECT_BINARY_DIR}/blueprint_filter.js\"" DOXYFILE2 ${DOXYFILE})
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ KeyFeatures: snapshots, observers, binding ink functions, support ink [function

## Unreal Plugin

The current version of the UE plugin can be downloaded from the [release page](https://github.com/JBenda/inkcpp/releases/latest) with te corresponding name of the OS (e.g. win64-unreal).
InkCPP is available via the [UE Marketplace](https://www.unrealengine.com/marketplace/product/inkcpp).

Alternativly is the latest version of the UE plugin can be downloaded from the [release page](https://github.com/JBenda/inkcpp/releases/latest) (`unreal.zip`).
Place the content of this file at your plugin folder of your UE project and at the next start up it will be intigrated.

A example project can be found [here](https://cloud.julian-benda.de/index.php/s/cRMBGBWbHPCcdwb).

A example project can be found [here](https://jbenda.github.io/inkcpp/unreal/InkCPP_DEMO.zip). And here the [Documentation](https://jbenda.github.io/inkcpp/html/group__unreal.html).

Code for the Unreal plugin is located in the `unreal` directory. In order to install it, run `cmake --install . --component unreal --prefix Path/To/Unreal/Plugins/` which will add an `inkcpp` folder there with the `.uplugin`, the code for the UClasses, and all the inkcpp source files required. `config.h` will automatically detect it is being built in an Unreal plugin environment and disable STL and enable Unreal extensions (FString support, Unreal asserts, CityHash, etc.).

If you compile the UE Plugin by your self feel free to visit the [wiki page](https://github.com/brwarner/inkcpp/wiki/Unreal) for a more debug oriented build process.
If you compile the UE Plugin by your self feel free to visit the [wiki page](https://github.com/JBenda/inkcpp/wiki/Unreal) for a more debug oriented build process.

## Use standalone

1. Grep the current version from the [release page](https://github.com/brwarner/inkcpp/releases/latest) depending on your OS (e.g. macos-cl).
1. Grep the current version from the [release page](https://github.com/JBenda/inkcpp/releases/latest) depending on your OS (e.g. macos-cl).
2. unpack it to a location found by your path
3. run your story: `inkcpp-cl -p story.json`
4. if you want to compile `.ink` flies directly make sure `inklecate` is in your path. If you not have it you can grep it from the [official page](https://github.com/inkle/ink/releases/latest)
Expand All @@ -56,7 +59,7 @@ Nice features for testing:

Instructions:

1. Download the for your OS macthing lib archive from the [release page](https://github.com/brwarner/inkcpp/releases/latest) (e.g. linux-lib).
1. Download the for your OS macthing lib archive from the [release page](https://github.com/JBenda/inkcpp/releases/latest) (e.g. linux-lib).
2. The following must be linked into your build solution for your C++ to compile correctly:
- `include/ink`: contains important shared headers.
+ For a Visual Studio project, link this directory as an Include Directory in VC++ Directories.
Expand All @@ -70,7 +73,7 @@ Instructions:
#include <ink/runner.h>
#include <ink/choice.h>
```
6. if you use cmake checkout the (wiki)[https://github.com/brwarner/inkcpp/wiki/building#cmake-example] for including the library via cmake
6. if you use cmake checkout the (wiki)[https://github.com/JBenda/inkcpp/wiki/building#cmake-example] for including the library via cmake


### Example
Expand Down Expand Up @@ -129,7 +132,7 @@ To install the different components use `cmake --install . --component <lib|cl|u
+ `cl` command line application
+ `unreal` UE-plugin

For a more in depth installation description please checkout the [wiki](https://github.com/brwarner/inkcpp/wiki/building).
For a more in depth installation description please checkout the [wiki](https://github.com/JBenda/inkcpp/wiki/building).


### Troubleshooting
Expand Down Expand Up @@ -157,8 +160,6 @@ pip install inkcpp

The python bindnigs are defined in `inkcpp_py` subfolder.

A downloadable version of the `inkcpp_py` lib can be found at the [release page](https://github.com/JBenda/inkcpp/releases/latest) with the name `<os>_py` eg `linux_py`.

## Dependencies
The compiler depends on Nlohmann's JSON library and the C++ STL.

Expand Down
3 changes: 2 additions & 1 deletion inkcpp/globals_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ globals_impl::globals_impl(const story_impl* story)
while (*flags != null_flag) {
list_table::list l = _lists.create_permament();
while (*flags != null_flag) {
_lists.add_inplace(l, *flags);
list_flag flag = _lists.external_fvalue_to_internal(*flags);
_lists.add_inplace(l, flag);
++flags;
}
++flags;
Expand Down
Loading
Loading