unity_scene_repacker 2.0.1__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. unity_scene_repacker-2.2.1/.clang-format +1 -0
  2. unity_scene_repacker-2.2.1/.github/workflows/release.yml +176 -0
  3. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/.gitignore +8 -3
  4. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/Cargo.lock +151 -270
  5. unity_scene_repacker-2.2.1/Cargo.toml +48 -0
  6. unity_scene_repacker-2.2.1/PKG-INFO +10 -0
  7. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/README.md +32 -21
  8. unity_scene_repacker-2.2.1/cli/Cargo.toml +26 -0
  9. unity_scene_repacker-2.2.1/cli/src/completion.rs +33 -0
  10. unity_scene_repacker-2.2.1/cli/src/locate.rs +59 -0
  11. unity_scene_repacker-2.2.1/cli/src/logger.rs +25 -0
  12. unity_scene_repacker-2.2.1/cli/src/main.rs +286 -0
  13. unity_scene_repacker-2.2.1/docs/demo-cast.svg +1 -0
  14. unity_scene_repacker-2.2.1/docs/demo.cast +121 -0
  15. unity_scene_repacker-2.2.1/docs/release.md +2 -0
  16. unity_scene_repacker-2.2.1/examples/export_monobehaviour_typetrees.rs +230 -0
  17. unity_scene_repacker-2.2.1/justfile +24 -0
  18. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/objects/hk-enemies.jsonc +0 -174
  19. unity_scene_repacker-2.2.1/objects/hk-representative.jsonc +376 -0
  20. unity_scene_repacker-2.2.1/objects/ns-monsters.json +200 -0
  21. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/pyproject.toml +3 -6
  22. unity_scene_repacker-2.2.1/src/env.rs +172 -0
  23. unity_scene_repacker-2.2.1/src/game_files.rs +73 -0
  24. unity_scene_repacker-2.2.1/src/lib.rs +536 -0
  25. unity_scene_repacker-2.2.1/src/merge_serialized.rs +138 -0
  26. unity_scene_repacker-2.2.1/src/monobehaviour_typetree_export.rs +56 -0
  27. unity_scene_repacker-2.2.1/src/prune.rs +129 -0
  28. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/src/scene_lookup.rs +50 -42
  29. unity_scene_repacker-2.2.1/src/trace_pptr.rs +196 -0
  30. unity_scene_repacker-2.2.1/src/typetree_generator_cache.rs +45 -0
  31. unity_scene_repacker-2.2.1/src/unity/types/utils.rs +124 -0
  32. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/src/unity/types.rs +67 -3
  33. unity_scene_repacker-2.2.1/tt-api-lib/TypeTreeGeneratorAPI.lib +0 -0
  34. unity_scene_repacker-2.2.1/typetree-generator-api/Cargo.toml +8 -0
  35. unity_scene_repacker-2.2.1/typetree-generator-api/bindings.h +32 -0
  36. unity_scene_repacker-2.2.1/typetree-generator-api/build.rs +3 -0
  37. unity_scene_repacker-2.2.1/typetree-generator-api/src/generated.rs +82 -0
  38. unity_scene_repacker-2.2.1/typetree-generator-api/src/lib.rs +270 -0
  39. unity_scene_repacker-2.0.1/.github/workflows/release.yml +0 -168
  40. unity_scene_repacker-2.0.1/Cargo.toml +0 -33
  41. unity_scene_repacker-2.0.1/PKG-INFO +0 -101
  42. unity_scene_repacker-2.0.1/build.rs +0 -6
  43. unity_scene_repacker-2.0.1/justfile +0 -14
  44. unity_scene_repacker-2.0.1/objects/hk-palecourt.json +0 -141
  45. unity_scene_repacker-2.0.1/objects/hk-simple.json +0 -53
  46. unity_scene_repacker-2.0.1/objects/ns-bosses.json +0 -17
  47. unity_scene_repacker-2.0.1/objects/ns-monsters.json +0 -244
  48. unity_scene_repacker-2.0.1/resources/lz4.tpk +0 -0
  49. unity_scene_repacker-2.0.1/src/lib.rs +0 -1
  50. unity_scene_repacker-2.0.1/src/main.rs +0 -492
  51. unity_scene_repacker-2.0.1/src/trace_pptr.rs +0 -120
  52. unity_scene_repacker-2.0.1/src/typetree_cache.rs +0 -41
  53. unity_scene_repacker-2.0.1/src/typetree_generator_api.rs +0 -268
  54. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/LICENSE.md +0 -0
  55. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1/cli}/src/utils.rs +0 -0
  56. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/rustfmt.toml +0 -0
  57. {unity_scene_repacker-2.0.1 → unity_scene_repacker-2.2.1}/src/unity/mod.rs +0 -0
@@ -0,0 +1 @@
1
+ ColumnLimit: 120
@@ -0,0 +1,176 @@
1
+ name: Build & Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "*"
7
+ workflow_dispatch:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ${{ matrix.runner }}
15
+ strategy:
16
+ matrix:
17
+ include:
18
+ # Linux manylinux
19
+ - runner: ubuntu-22.04
20
+ target: x86_64
21
+ rid: linux-x64
22
+ manylinux: manylinux_2_34
23
+ # - runner: ubuntu-22.04 # disabled: lz c dep doesn't build
24
+ # target: aarch64
25
+ # rid: linux-arm64
26
+ # manylinux: manylinux_2_34
27
+ # # Linux musllinux # disabled: dotnet still references glibc
28
+ # - runner: ubuntu-22.04
29
+ # target: x86_64
30
+ # rid: linux-musl-x64
31
+ # manylinux: musllinux_1_2
32
+ # - runner: ubuntu-22.04
33
+ # target: aarch64
34
+ # rid: linux-musl-arm64
35
+ # manylinux: musllinux_1_2
36
+ # Windows
37
+ - runner: windows-latest
38
+ target: x64
39
+ rid: win-x64
40
+ manylinux: ""
41
+ # MacOS
42
+ - runner: macos-13
43
+ target: x86_64
44
+ rid: osx-x64
45
+ manylinux: ""
46
+ - runner: macos-14
47
+ target: aarch64
48
+ rid: osx-arm64
49
+ manylinux: ""
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - uses: actions/setup-dotnet@v4
53
+ with:
54
+ dotnet-version: "9.x"
55
+
56
+ - name: Clone TypeTreeGeneratorAPI
57
+ uses: actions/checkout@v4
58
+ with:
59
+ repository: jakobhellermann/TypeTreeGeneratorAPI
60
+ submodules: true
61
+ ref: wip
62
+ path: TypeTreeGeneratorAPI
63
+ - name: Publish TypeTreeGeneratorAPI with dotnet
64
+ run: dotnet publish TypeTreeGeneratorAPI/TypeTreeGeneratorAPI -o out --runtime ${{ matrix.rid }} -p:EnableAssetRipper=false -p:EnableAssetStudio=false -p:EnableAssetsTools=true -p:EnableIL2CPP=false
65
+ - name: Copy importlib to out
66
+ if: runner.os == 'windows'
67
+ run: cp TypeTreeGeneratorAPI/TypeTreeGeneratorAPI/bin/Release/net9.0/win-x64/native/TypeTreeGeneratorAPI.lib ./out/
68
+
69
+ - name: Build bindings
70
+ env:
71
+ RUSTFLAGS: "-L out"
72
+ run: cargo build --release -p bindings
73
+ - name: Copy artifacts
74
+ shell: bash # todo: replace this with --artifact-dir when finally stable
75
+ run: |
76
+ if [[ "${{ runner.os }}" == "Windows" ]]; then
77
+ cp target/release/unityscenerepacker.dll out/unityscenerepacker.dll
78
+ elif [[ "${{ runner.os }}" == "macOS" ]]; then
79
+ cp target/release/libunityscenerepacker.dylib out/libunityscenerepacker.dylib
80
+ else
81
+ cp target/release/libunityscenerepacker.so out/libunityscenerepacker.so
82
+ fi
83
+
84
+ - name: Upload bindings
85
+ uses: actions/upload-artifact@v4
86
+ with:
87
+ name: bindings-${{ matrix.rid }}
88
+ path: out/*
89
+
90
+ - name: Build cli wheels
91
+ env:
92
+ RUSTFLAGS: "-L out"
93
+ LD_LIBRARY_PATH: "${{ github.workspace }}/out"
94
+ uses: jakobhellermann/maturin-action@allow-ld-env
95
+ with:
96
+ target: ${{ matrix.target }}
97
+ args: --release --out dist
98
+ sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
99
+ manylinux: ${{ matrix.manylinux }}
100
+
101
+ - name: Upload wheels
102
+ uses: actions/upload-artifact@v4
103
+ with:
104
+ name: ${{ matrix.runner }}-${{ matrix.target }}${{ matrix.manylinux }}
105
+ path: dist
106
+
107
+ sdist:
108
+ runs-on: ubuntu-latest
109
+ steps:
110
+ - uses: actions/checkout@v4
111
+ - name: Build sdist
112
+ uses: PyO3/maturin-action@v1
113
+ with:
114
+ command: sdist
115
+ args: --out dist
116
+ - name: Upload sdist
117
+ uses: actions/upload-artifact@v4
118
+ with:
119
+ name: wheels-sdist
120
+ path: dist
121
+
122
+ nuget:
123
+ name: Pack and Push NuGet Package
124
+ runs-on: ubuntu-latest
125
+ needs: build
126
+
127
+ steps:
128
+ - uses: actions/checkout@v4
129
+ - run: sudo apt install mono-devel # https://github.com/NuGet/setup-nuget/issues/168
130
+ - uses: nuget/setup-nuget@v2
131
+
132
+ - name: Download artifacts
133
+ uses: actions/download-artifact@v4
134
+ with:
135
+ pattern: bindings-*
136
+ path: out
137
+
138
+ - name: List built files
139
+ run: ls -R out
140
+
141
+ - name: Pack NuGet package
142
+ run: nuget pack ./bindings/nuget/unityscenerepacker.nuspec
143
+
144
+ - name: Push to NuGet
145
+ env:
146
+ NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
147
+ run: nuget push unityscenerepacker.*.nupkg --skip-duplicate -Source https://api.nuget.org/v3/index.json -ApiKey $NUGET_API_KEY
148
+
149
+ release:
150
+ name: Release
151
+ runs-on: ubuntu-latest
152
+ if: ${{ startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' }}
153
+ needs: [build, sdist]
154
+ permissions:
155
+ # Use to sign the release artifacts
156
+ id-token: write
157
+ # Used to upload release artifacts
158
+ contents: write
159
+ # Used to generate artifact attestation
160
+ attestations: write
161
+ steps:
162
+ - uses: actions/download-artifact@v4
163
+ with:
164
+ pattern: wheels-*
165
+ - name: Generate artifact attestation
166
+ uses: actions/attest-build-provenance@v2
167
+ with:
168
+ subject-path: "wheels-*/*"
169
+ - name: Publish to PyPI
170
+ if: ${{ startsWith(github.ref, 'refs/tags/') }}
171
+ uses: PyO3/maturin-action@v1
172
+ env:
173
+ MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
174
+ with:
175
+ command: upload
176
+ args: --non-interactive --skip-existing wheels-*/*
@@ -1,11 +1,16 @@
1
1
  /target
2
2
  /uv.lock
3
3
 
4
- /out
4
+ /out*
5
+ *.nupkg
5
6
  /*.unity3d
6
7
  /*.bundle
7
- /*.so
8
- /*.dll
8
+
9
+ *.so
10
+ *.a
11
+ *.dll
12
+ *.lib
13
+ *.pdb
9
14
 
10
15
  __pycache__
11
16
  *.pyc