Skip to content

Commit

Permalink
Fixes to ensure correct functionality in 32 bits
Browse files Browse the repository at this point in the history
- Fix scripts
- Fix the data alignment issue for 32 bits
- Copy osmid as part of the prebuild
- add the x86 bits.
  • Loading branch information
cmaughan committed Feb 3, 2020
1 parent d288026 commit 3c9f7c7
Show file tree
Hide file tree
Showing 37 changed files with 26 additions and 12 deletions.
11 changes: 3 additions & 8 deletions app/gui/qt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(APP_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(SONIC_PI_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../..)

if(BUILD_32BIT)
if(${BUILD_32BIT})
message(STATUS "Setting up a 32 bit QT Build")
set(CMAKE_PREFIX_PATH $ENV{QT_INSTALL_LOCATION32})
else()
set(CMAKE_PREFIX_PATH $ENV{QT_INSTALL_LOCATION})
Expand Down Expand Up @@ -147,15 +148,9 @@ if(WIN32)
message(STATUS "Copying required Qt libraries and binaries to output directory....")

# Run winddeployqt if it can be found, to ensure installed dependencies
find_program(WINDEPLOYQT_EXECUTABLE NAMES windeployqt HINTS ${QTDIR} ENV QTDIR PATH_SUFFIXES bin)
add_custom_command(TARGET ${APP_NAME} POST_BUILD
COMMAND ${WINDEPLOYQT_EXECUTABLE} $<TARGET_FILE:${APP_NAME}>)
COMMAND ${CMAKE_PREFIX_PATH}/bin/windeployqt $<TARGET_FILE:${APP_NAME}>)

# Copy the built osmid files to the server
add_custom_command(TARGET ${APP_NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${SONIC_PI_ROOT}/app/server/native/osmid
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/external/build/osmid-prefix/src/osmid-build/Release/m2o.exe ${SONIC_PI_ROOT}/app/server/native/osmid
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/external/build/osmid-prefix/src/osmid-build/Release/o2m.exe ${SONIC_PI_ROOT}/app/server/native/osmid)
endif() # Win32

# Make convenient source groups in the IDE
Expand Down
2 changes: 1 addition & 1 deletion app/gui/qt/external/build_externals32.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set CURRENT_DIR=%CD%
cd %~dp0
mkdir build32 > nul
cd build32
cmake -G "Visual Studio 16 2019" -A Win32 ..\
Expand Down
11 changes: 9 additions & 2 deletions app/gui/qt/visualizer/server_shm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,19 @@ class server_shared_memory
}

private:
#if defined(_WIN32)
// Note: this shared memory structure is 32 bytes on the SuperCollider side, at least on a release build which is typically used.
#if defined(WIN64)
// Note: this shared memory structure is 32 bytes on the SuperCollider side in 64 bit
// at least on a release build which is typically used.
// But! A string on windows (or any platform for that matter) does not guarantee that it will consume 32 bytes of memory.
// A debug build of windows has this structure bigger than 32 and breaks
uint8_t shmem_name[32];
#else
#if defined(WIN32)
// ... and on Win32 a debug build has this north of 24, but SC has 24
uint8_t shmem_name[24];
#else
string shmem_name;
#endif
#endif
sh_float_ptr control_busses_; // control busses
scope_buffer_vector scope_buffers;
Expand Down
3 changes: 3 additions & 0 deletions app/gui/qt/win-prebuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ cd %~dp0
copy external\build\aubio-prefix\src\Aubio-build\Release\libaubio-5.dll ..\..\server\native\ruby\bin
rmdir /S /Q ..\..\server\ruby\vendor\ruby-aubio-prerelease

@echo "Copying osmid to the server"
xcopy /Y /I /R /E external\build\osmid-prefix\src\osmid-build\Release\*.exe ..\..\server\native\osmid

@echo "Copying scsynth to server..."
xcopy /Y /I /R /E ..\..\..\prebuilt\windows\x64\*.* ..\..\server\native

Expand Down
11 changes: 10 additions & 1 deletion app/gui/qt/win-prebuild32.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ cd %~dp0
copy external\build32\aubio-prefix\src\Aubio-build\Release\libaubio-5.dll ..\..\server\native\ruby\bin
rmdir /S /Q ..\..\server\ruby\vendor\ruby-aubio-prerelease

@echo "Copying osmid to the server"
xcopy /Y /I /R /E external\build32\osmid-prefix\src\osmid-build\Release\*.exe ..\..\server\native\osmid

@echo "Copying scsynth to server..."
copy /Y ..\..\..\prebuilt\windows\x86\*.* ..\..\server\native

@echo "Translating tutorial..."
..\..\server\native\ruby\bin\ruby ../../server/ruby/bin/i18n-tool.rb -t

@echo "Generating docs for the Qt GUI..."
copy /Y utils\ruby_help.tmpl utils\ruby_help.h
..\..\server\native\ruby\bin\ruby ../../server/ruby/bin/qt-doc.rb -o utils/ruby_help.h

REM Do the language translation
@echo "Updating GUI translation files..."
forfiles /p lang /s /m *.ts /c "cmd /c %QT_INSTALL_LOCATION32%/bin/lrelease @file"
Binary file added prebuilt/windows/x86/libEGL.dll
Binary file not shown.
Binary file added prebuilt/windows/x86/libGLESV2.dll
Binary file not shown.
Binary file added prebuilt/windows/x86/libfftw3f-3.dll
Binary file not shown.
Binary file added prebuilt/windows/x86/libsndfile-1.dll
Binary file not shown.
Binary file added prebuilt/windows/x86/msvcp140.dll
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/BinaryOpUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/ChaosUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/DelayUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/DemandUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/DiskIO_UGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/DynNoiseUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/FFT_UGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/FilterUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/GendynUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/GrainUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/IOUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/LFUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/ML_UGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/MulAddUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/NoiseUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/OscUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/PV_ThirdParty.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/PanUGens.scx
Binary file not shown.
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/ReverbUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/TestUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/TriggerUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/UIUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/UnaryOpUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/plugins/UnpackFFTUGens.scx
Binary file not shown.
Binary file added prebuilt/windows/x86/scsynth.exe
Binary file not shown.
Binary file added prebuilt/windows/x86/vcruntime140.dll
Binary file not shown.

0 comments on commit 3c9f7c7

Please sign in to comment.