diff --git a/README.md b/README.md index e0d1c5b..aff6c43 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Note that this script is expecting the `cmake` command line tool to be in the `P ``` # ./re.sh -h -usage: re.sh [-hnvlbdtR] [ ...] [-- [native-options]] +usage: re.sh [-hnvlbdtRZ] [ ...] [-- [native-options]] positional arguments: command See "Commands" section @@ -184,6 +184,7 @@ optional arguments: -d, --debugging Use 'Debugging' for local45 command -t, --testing Use 'Testing' for local45 command -R, --release Invoke CMake in Release mode (for multi-config generators) + -Z Clears the Recon Graphics Cache (workaround) Commands ---- Native build commands ---- @@ -234,6 +235,9 @@ CMake Target | Script Command | Description `jbox-u45-build` | `universal45` | Builds the universal45 (`.u45`) package with the jbox toolchain ready to be uploaded to Reason servers `jbox-validate45` | `validate45` | Builds the (sandboxed) plugin with the jbox toolchain (`local45`) and runs Recon validation on it +> #### Note +> 2021/10/30: Due to a caching issue with Recon 12 and Hi Res graphics, you can use `-Z` command line argument to delete the cache directory (this is a hack/workaround) + Understanding the different kinds of builds ------------------------------------------- It is pretty critical to understand the various kinds of builds that are available for a Rack Extension. They are very specific to the RE SDK. @@ -291,6 +295,10 @@ It is strongly recommended to check the [re-blank-plugin](https://github.com/pon Release notes ------------- +#### 1.3.8 - 2021/10/30 + +- Added `-Z` command line option to the script to work around the graphics caching issue of Recon 12 + #### 1.3.7 - 2021/10/28 - Added Recon12 name to list of Recon executables diff --git a/re-cmake.py b/re-cmake.py index afe1557..3bc1920 100755 --- a/re-cmake.py +++ b/re-cmake.py @@ -18,6 +18,7 @@ import argparse import platform +import os script_name = '' @@ -28,7 +29,7 @@ parser = argparse.ArgumentParser(allow_abbrev=False, - usage=f'{script_name} [-hnvlbdtR] [ ...] [-- [native-options]]', + usage=f'{script_name} [-hnvlbdtRZ] [ ...] [-- [native-options]]', formatter_class=argparse.RawDescriptionHelpFormatter, epilog=''' Commands @@ -62,10 +63,39 @@ parser.add_argument("-d", "--debugging", help="Use 'Debugging' for local45 command", action="store_true") parser.add_argument("-t", "--testing", help="Use 'Testing' for local45 command", action="store_true") parser.add_argument("-R", "--release", help="Invoke CMake in Release mode (for multi-config generators)", action="store_true") +parser.add_argument("-Z", help="Clears the Recon Graphics Cache (workaround)", action="store_true", dest="clear_recon_graphics_cache") parser.add_argument('command', help='See "Commands" section', nargs=argparse.REMAINDER) args = parser.parse_args() +# compute Recon cache dir path +def recon_cache_dirpath(): + if os.name == 'nt': + dirpath_localappdata = os.path.normpath(os.getenv('LOCALAPPDATA') ) + r = os.path.join(dirpath_localappdata, 'Propellerhead Software', 'Reason Recon', 'GraphicsCache') + else: + dirpath_userprofile = os.path.normpath(os.path.expanduser('~') ) + r = os.path.join(dirpath_userprofile, 'Library', 'Caches', 'Reason Recon', 'GraphicsCache') + + return r + + +# Clear the cache +def clear_recon_graphics_cache(): + import shutil + + dirpath = recon_cache_dirpath() + if os.path.isdir(dirpath): + if args.dry_run: + print(f'Deleting "{dirpath}"') + else: + shutil.rmtree(dirpath) + print(f'Deleted "{dirpath}"') + +# Check for clearing cache +if args.clear_recon_graphics_cache: + clear_recon_graphics_cache() + # determines '--' position commands = args.command native_tool_options = [] @@ -122,7 +152,6 @@ if args.dry_run: print(' '.join(cmake_command)) else: - import os import sys import subprocess diff --git a/sdk.cmake b/sdk.cmake index bd1c21f..792de4d 100755 --- a/sdk.cmake +++ b/sdk.cmake @@ -23,7 +23,7 @@ endif() set(RE_CMAKE_MAJOR_VERSION 1) set(RE_CMAKE_MINOR_VERSION 3) -set(RE_CMAKE_PATCH_VERSION 6) +set(RE_CMAKE_PATCH_VERSION 8) # Capturing this outside function call due to scope... set(BUILD45_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})