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

[ENHANCEMENT] Replace hmm with HxPKG #3741

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions .github/actions/setup-haxe/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: setup-haxeshit
description: "sets up haxe shit, using HMM!"
description: "sets up haxe shit, using HxPKG!"

inputs:
haxe:
Expand Down Expand Up @@ -60,23 +60,23 @@ runs:
haxelib --debug --never --global install haxelib 4.1.0
haxelib --debug --global set haxelib 4.1.0
haxelib --global remove haxelib git || true
haxelib --global remove hmm || true
haxelib --global remove hxpkg || true
rm -rf .haxelib
haxelib --debug --never --global git haxelib https://github.com/FunkinCrew/haxelib.git funkin-patches --skip-dependencies
haxelib --debug --never --global git hmm https://github.com/FunkinCrew/hmm funkin-patches
haxelib --debug --never --global git hxpkg https://github.com/CobaltBar/HxPKG
haxelib --debug --never newrepo
haxelib version
echo "HAXEPATH=$(haxelib config)" >> "$GITHUB_ENV"
echo "TIMER_DEPS=$(date +%s)" >> "$GITHUB_ENV"

- name: Restore cached dependencies
id: cache-hmm
id: cache-hxpkg
uses: actions/cache@v4
with:
path: .haxelib
key: haxe-hmm-${{ runner.os }}-${{ hashFiles('**/hmm.json') }}
key: haxe-hxpkg-${{ runner.os }}-${{ hashFiles('**/.hxpkg') }}

- if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }}
- if: ${{ steps.cache-hxpkg.outputs.cache-hit != 'true' }}
name: Prep git for dependency install
uses: gacts/run-and-post-run@v1
with:
Expand All @@ -88,11 +88,11 @@ runs:
git config --global 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf' https://github.com/
post: git config --global --unset 'url.https://x-access-token:${{ inputs.gh-token }}@github.com/.insteadOf'

- if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }}
- if: ${{ steps.cache-hxpkg.outputs.cache-hit != 'true' }}
name: Install dependencies
shell: bash
run: |
haxelib --global run hmm install -q
haxelib --global run hxpkg install --quiet
echo "TIMER_DONE=$(date +%s)" >> "$GITHUB_ENV"

# by default use a shared hxcpp cache
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/build-game.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@ jobs:
uses: ./.github/actions/setup-haxe
with:
gh-token: ${{ steps.app_token.outputs.token }}
- name: Setup HXCPP dev commit
run: |
cd .haxelib/hxcpp/git/tools/hxcpp
haxe compile.hxml
cd ../../../../..
- name: Build game
if: ${{ matrix.target == 'windows' }}
run: |
Expand Down Expand Up @@ -117,19 +112,18 @@ jobs:
echo "HAXEPATH=$(haxelib config)" >> "$GITHUB_ENV"

- name: Restore cached dependencies
id: cache-hmm
id: cache-hxpkg
uses: actions/cache@v4
with:
path: .haxelib
key: haxe-hmm-${{ runner.os }}-${{ hashFiles('**/hmm.json') }}
key: haxe-hxpkg-${{ runner.os }}-${{ hashFiles('**/.hxpkg') }}

- if: ${{ steps.cache-hmm.outputs.cache-hit != 'true' }}
- if: ${{ steps.cache-hxpkg.outputs.cache-hit != 'true' }}
name: Install dependencies
run: |
git config --global 'url.https://x-access-token:${{ steps.app_token.outputs.token }}@github.com/.insteadOf' https://github.com/
git config --global advice.detachedHead false
haxelib --global run hmm install -q
cd .haxelib/hxcpp/git/tools/hxcpp && haxe compile.hxml
haxelib --global run hxpkg install --quiet

- if: ${{ matrix.target != 'html5' }}
name: Restore hxcpp cache
Expand Down
164 changes: 164 additions & 0 deletions .hxpkg
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
[
{
"profile": "unit",
"pkgs": [
{
"name": "hamcrest",
"version": "3.0.0"
},
{
"name": "mconsole",
"link": "https://github.com/massive-oss/mconsole",
"branch": "06c0499ed8f80628a0e6e55ffa32c3cbd688a838"
},
{
"name": "mcover",
"link": "https://github.com/massive-oss/mcover",
"branch": "c3c47cd682b0b202a41caee95321989391b617ef",
"dir": "src"
},
{
"name": "mockatoo",
"link": "https://github.com/FunkinCrew/mockatoo",
"branch": "13d77a0a8eaf5e789ef5dae6cd33eee812deda36",
"dir": "src"
},
{
"name": "munit",
"link": "https://github.com/FunkinCrew/MassiveUnit",
"branch": "f61be7f7ba796595f45023ca65164a485aba0e7e",
"dir": "src"
}
]
},
{
"profile": "default",
"pkgs": [
{
"name": "FlxPartialSound",
"link": "https://github.com/FunkinCrew/FlxPartialSound.git",
"branch": "a1eab7b9bf507b87200a3341719054fe427f3b15"
},
{
"name": "flixel",
"link": "https://github.com/FunkinCrew/flixel",
"branch": "ffa691cb2d2d81de35b900a4411e4062ac84ab58"
},
{
"name": "flixel-addons",
"link": "https://github.com/FunkinCrew/flixel-addons",
"branch": "7424db4e9164ff46f224a7c47de1b732d2542dd7"
},
{
"name": "flixel-text-input",
"link": "https://github.com/FunkinCrew/flixel-text-input",
"branch": "951a0103a17bfa55eed86703ce50b4fb0d7590bc"
},
{
"name": "flxanimate",
"link": "https://github.com/Dot-Stuff/flxanimate",
"branch": "0654797e5eb7cd7de0c1b2dbaa1efe5a1e1d9412"
},
{
"name": "format",
"version": "3.5.0"
},
{
"name": "funkin.vis",
"link": "https://github.com/FunkinCrew/funkVis",
"branch": "22b1ce089dd924f15cdc4632397ef3504d464e90"
},
{
"name": "grig.audio",
"link": "https://gitlab.com/haxe-grig/grig.audio.git",
"branch": "57f5d47f2533fd0c3dcd025a86cb86c0dfa0b6d2",
"dir": "src"
},
{
"name": "haxeui-core",
"link": "https://github.com/haxeui/haxeui-core",
"branch": "51c23588614397089a5ce182cddea729f0be6fa0"
},
{
"name": "haxeui-flixel",
"link": "https://github.com/haxeui/haxeui-flixel",
"branch": "da27e833947f32ef007ed11f523aa5524f5a5d54"
},
{
"name": "hscript",
"link": "https://github.com/FunkinCrew/hscript",
"branch": "12785398e2f07082f05034cb580682e5671442a2"
},
{
"name": "hxCodec",
"link": "https://github.com/FunkinCrew/hxCodec",
"branch": "61b98a7a353b7f529a8fec84ed9afc919a2dffdd"
},
{
"name": "hxcpp",
"link": "https://github.com/cortex-engine/hxcpp",
"branch": "c6bac3d6c7d683f25104296b2f4c50f8c90b8349"
},
{
"name": "hxcpp-debug-server",
"link": "https://github.com/FunkinCrew/hxcpp-debugger",
"branch": "147294123f983e35f50a966741474438069a7a8f",
"dir": "hxcpp-debug-server"
},
{
"name": "hxdiscord_rpc",
"link": "https://github.com/FunkinCrew/hxdiscord_rpc",
"branch": "82c47ecc1a454b7dd644e4fcac7e91155f176dec"
},
{
"name": "hxjsonast",
"link": "https://github.com/nadako/hxjsonast/",
"branch": "20e72cc68c823496359775ac1f06500e67f189d5"
},
{
"name": "hxp",
"version": "1.3.0"
},
{
"name": "json2object",
"link": "https://github.com/FunkinCrew/json2object",
"branch": "a8c26f18463c98da32f744c214fe02273e1823fa"
},
{
"name": "jsonpatch",
"link": "https://github.com/EliteMasterEric/jsonpatch",
"branch": "f9b83215acd586dc28754b4ae7f69d4c06c3b4d3"
},
{
"name": "jsonpath",
"link": "https://github.com/EliteMasterEric/jsonpath",
"branch": "7a24193717b36393458c15c0435bb7c4470ecdda"
},
{
"name": "lime",
"link": "https://github.com/FunkinCrew/lime",
"branch": "fe3368f611a84a19afc03011353945ae4da8fffd"
},
{
"name": "openfl",
"link": "https://github.com/FunkinCrew/openfl",
"branch": "8306425c497766739510ab29e876059c96f77bd2"
},
{
"name": "polymod",
"link": "https://github.com/larsiusprime/polymod",
"branch": "0fbdf27fe124549730accd540cec8a183f8652c0"
},
{
"name": "thx.core",
"link": "https://github.com/fponticelli/thx.core",
"branch": "76d87418fadd92eb8e1b61f004cff27d656e53dd"
},
{
"name": "thx.semver",
"link": "https://github.com/fponticelli/thx.semver",
"branch": "bdb191fe7cf745c02a980749906dbf22719e200b"
}
]
}
]
2 changes: 1 addition & 1 deletion build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ RUN <<EOF
HOME=/etc haxelib setup "$HAXEPATH/lib"
haxelib --global --never install haxelib $haxelib_version
haxelib --global --never git haxelib https://github.com/FunkinCrew/haxelib.git funkin-patches --skip-dependencies
haxelib --global --never git hmm https://github.com/FunkinCrew/hmm funkin-patches
haxelib --global --never git hxpkg https://github.com/CobaltBar/HxPKG
EOF

# hxcpp
Expand Down
17 changes: 8 additions & 9 deletions docs/COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@
- Instead, open a command prompt and do the following steps...
1. Run `cd the\directory\you\want\the\source\code\in` to specify which folder the command prompt is working in.
- For example, `cd C:\Users\YOURNAME\Documents` would instruct the command prompt to perform the next steps in your Documents folder.
2. Run `git clone https://github.com/FunkinCrew/funkin.git` to clone the base repository.
3. Run `cd funkin` to enter the cloned repository's directory.
2. Run `git clone https://github.com/FunkinCrew/Funkin.git` to clone the base repository.
3. Run `cd Funkin` to enter the cloned repository's directory.
4. Run `git submodule update --init --recursive` to download the game's assets.
- NOTE: By performing this operation, you are downloading Content which is proprietary and protected by national and international copyright and trademark laws. See [the LICENSE.md file for the Funkin.assets](https://github.com/FunkinCrew/funkin.assets/blob/main/LICENSE.md) repo for more information.
5. Run `haxelib --global install hmm` and then `haxelib --global run hmm setup` to install hmm.json
6. Run `hmm install` to install all haxelibs of the current branch
7. Run `haxelib run lime setup` to set up lime
8. Perform additional platform setup
- NOTE: By performing this operation, you are downloading Content which is proprietary and protected by national and international copyright and trademark laws. See the LICENSE.md files for `funkin.assets` [here](https://github.com/FunkinCrew/funkin.assets/blob/main/LICENSE.md) and for `funkin.art` [here](https://github.com/FunkinCrew/funkin.art/blob/main/LICENSE.md).
5. Run `haxelib --global install hxpkg` and then `haxelib --global run hxpkg setup` to install `HxPKG`
6. Run `hxpkg install` to install all haxelibs of the current branch
7. Perform additional platform setup
- For Windows, download the [Visual Studio Build Tools](https://aka.ms/vs/17/release/vs_BuildTools.exe)
- When prompted, select "Individual Components" and make sure to download the following:
- MSVC v143 VS 2022 C++ x64/x86 build tools
- Windows 10/11 SDK
- Mac: [`lime setup mac` Documentation](https://lime.openfl.org/docs/advanced-setup/macos/)
- Linux: [`lime setup linux` Documentation](https://lime.openfl.org/docs/advanced-setup/linux/)
- HTML5: Compiles without any extra setup
9. If you are targeting for native, you may need to run `lime rebuild <PLATFORM>` and `lime rebuild <PLATFORM> -debug`
10. `lime test <PLATFORM>` to build and launch the game for your platform (for example, `lime test windows`)
8. If you are targeting for native, you may need to run `lime rebuild <PLATFORM>` and `lime rebuild <PLATFORM> -debug`
9. `lime test <PLATFORM>` to build and launch the game for your platform (for example, `lime test windows`)

## Build Flags

Expand Down
4 changes: 2 additions & 2 deletions docs/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
- This error occurs if the PDB file located in your `export` folder is in use or exceeds 4 GB. Try deleting the `export` folder and building again from scratch.

- `error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)`
- This error can happen during cloning as a result of poor network connectivity. A common fix is to run ` git config --global http.postBuffer 4096M` in your terminal.
- This error can happen during cloning as a result of poor network connectivity. A common fix is to run `git config --global http.postBuffer 4096M` in your terminal.

- Repository is missing an `assets` folder, or `assets` folder is empty.
- You did not clone the repository correctly! Copy the path to your `funkin` folder and run `cd the\path\you\copied`. Then follow the compilation guide starting from **Step 4**.
- You did not clone the repository correctly! Copy the path to your `Funkin` folder and run `cd the\path\you\copied`. Then follow the compilation guide starting from **Step 4**.

- Other compilation issues may be caused by installing bad library versions. Try deleting the `.haxelib` folder and following the guide starting from **Step 5**.
Loading
Loading