Skip to content

Commit

Permalink
Windows Portable, and this time, with feeling!
Browse files Browse the repository at this point in the history
This contains the commit which was missing from  15afd2d
which *actually* makes a portable windows zip;

Closes #7313
  • Loading branch information
baconpaul authored Nov 20, 2023
1 parent 15afd2d commit b66fc14
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
8 changes: 8 additions & 0 deletions resources/surge-shared/README_Portable.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
The Surge XT Windows Portable Distribution

The Surge XT Portable Zip bundles the assets, vst3, clap, and exe into a single directory which is set up
so all assets are self contained. If you re-organize the directory structure, your system may not work
without manual creation of hard links. Please consult the surge manual.

The VST3 spec does not allow installs of VST3 outside prescribed locations. Some DAWs allow this nonetheless,
but FL does not. If you are a FL user, do not use this, but rather use our standard installer.
27 changes: 24 additions & 3 deletions src/cmake/lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,31 @@ function(surge_make_installers)
COMMAND tar cvzf ${SURGE_XT_DIST_OUTPUT_DIR}/surge-xt-linux-${SXTVER}-pluginsonly.tar.gz .
)
elseif(WIN32)
set(SURGE_PORTABLE_DIR ${CMAKE_BINARY_DIR}/surge-xt-portable)
set(portsst "${SURGE_PORTABLE_DIR}/Surge Synth Team")
add_custom_command(TARGET surge-xt-distribution
POST_BUILD
COMMAND 7z a -r ${SURGE_XT_DIST_OUTPUT_DIR}/surge-xt-win${SURGE_BITNESS}-${SXTVER}-pluginsonly.zip ${SURGE_PRODUCT_DIR}
)
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${SURGE_PORTABLE_DIR}
COMMAND ${CMAKE_COMMAND} -E rm -rf "${portsst}"
COMMAND ${CMAKE_COMMAND} -E make_directory "${portsst}"

COMMAND ${CMAKE_COMMAND} -E copy "${SURGE_PRODUCT_DIR}/Surge XT.clap" "${portsst}"
COMMAND ${CMAKE_COMMAND} -E copy "${SURGE_PRODUCT_DIR}/Surge XT Effects.clap" "${portsst}"
COMMAND ${CMAKE_COMMAND} -E copy "${SURGE_PRODUCT_DIR}/Surge XT.exe" "${portsst}"
COMMAND ${CMAKE_COMMAND} -E copy "${SURGE_PRODUCT_DIR}/Surge XT Effects.exe" "${portsst}"
COMMAND ${CMAKE_COMMAND} -E copy "${SURGE_PRODUCT_DIR}/surge-xt-cli.exe" "${portsst}"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${SURGE_PRODUCT_DIR}/Surge XT.vst3" "${portsst}/Surge XT.vst3"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${SURGE_PRODUCT_DIR}/Surge XT Effects.vst3" "${portsst}/Surge XT Effects.vst3"

COMMAND 7z a -r ${SURGE_XT_DIST_OUTPUT_DIR}/surge-xt-win${SURGE_BITNESS}-${SXTVER}-pluginsonly.zip "${portsst}/*"

COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_SOURCE_DIR}/resources/surge-shared/README_Portable.txt" "${SURGE_PORTABLE_DIR}/README.txt"

COMMAND ${CMAKE_COMMAND} -E make_directory "${portsst}/SurgeXTData"
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/resources/data" "${portsst}/SurgeXTData"

COMMAND 7z a -r ${SURGE_XT_DIST_OUTPUT_DIR}/surge-xt-win${SURGE_BITNESS}-${SXTVER}-portable-install.zip "${SURGE_PORTABLE_DIR}/*"
)
find_program(SURGE_NUGET_EXE nuget.exe PATHS ENV "PATH")
if(SURGE_NUGET_EXE)
message(STATUS "Using NUGET from ${SURGE_NUGET_EXE}")
Expand Down

0 comments on commit b66fc14

Please sign in to comment.