Skip to content

Commit

Permalink
fix SConstruct
Browse files Browse the repository at this point in the history
  • Loading branch information
3ddelano committed Dec 26, 2023
1 parent c4d5695 commit fbc3edc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.scons-cache/
key: ${{ matrix.identifier }}-${{ github.ref }}
key: ${{ matrix.identifier }}
# key: ${{ matrix.identifier }}-${{ github.ref }}
restore-keys: |
${{ matrix.identifier }}-${{ github.ref }}
${{ matrix.identifier }}
# ${{ matrix.identifier }}-${{ github.ref }}
${{ matrix.identifier }}
continue-on-error: true

- name: Compile extension
Expand Down
9 changes: 4 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ eos_sdk_folder = "thirdparty/eos-sdk/SDK/"
# Add source files
env.Append(CPPPATH=["src/", eos_sdk_folder + "Include/"])
sources = Glob("src/*.cpp")

platform = env["platform"]

env.Append(LIBPATH=[eos_sdk_folder + "Lib/"])
env.Append(LIBPATH=[eos_sdk_folder + "Bin/"])
Expand Down Expand Up @@ -63,21 +63,20 @@ def copy_file(from_path, to_path):
shutil.copyfile(from_path, to_path)

def on_complete(target, source, env):
if env["platform"] == "windows":
if platform == "windows":
shutil.rmtree(plugin_bin_folder + "/windows/x64", ignore_errors=True)
shutil.copytree(eos_sdk_folder + "Bin/x64", plugin_bin_folder + "/windows/x64")
copy_file(eos_sdk_folder + "Bin/EOSSDK-Win64-Shipping.dll", plugin_bin_folder + "/windows/EOSSDK-Win64-Shipping.dll")

elif env["platform"] == "linux":
elif platform == "linux":
copy_file(eos_sdk_folder + "Bin/libEOSSDK-Linux-Shipping.so", plugin_bin_folder + "/linux/libEOSSDK-Linux-Shipping.so")

elif env["platform"] == "macos":
elif platform == "macos":
copy_file(eos_sdk_folder + "Bin/libEOSSDK-Mac-Shipping.dylib", plugin_bin_folder + "/macos/libEOSSDK-Mac-Shipping.dylib")

# Disable scons cache for source files
NoCache(sources)


complete_command = Command('complete', library, on_complete)
Depends(complete_command, library)
Default(complete_command)

0 comments on commit fbc3edc

Please sign in to comment.