Skip to content

Commit

Permalink
cleanup and build data_* stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
vizicist committed Jul 4, 2024
1 parent 0f92635 commit 0f34c99
Show file tree
Hide file tree
Showing 25 changed files with 48 additions and 759,945 deletions.
23 changes: 7 additions & 16 deletions build/windows/bin_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ rem mkdir %ship%\keykit
rem mkdir %ship%\keykit\bin
rem mkdir %ship%\keykit\lib

copy %PALETTE_SOURCE%\VERSION %ship% >nul
set /p version=<../../VERSION
set PALETTE_VERSION=%version%

echo ================ Upgrading Python
python -m pip install pip | grep -v "already.*satisfied"
pip install --use-pep517 codenamize pip install python-osc requests pip install pyinstaller get-mac mido pyperclip chardet obs-cli | grep -v "already satisfied"
Expand Down Expand Up @@ -86,16 +90,8 @@ copy %PALETTE_SOURCE%\build\windows\vc15\bin\pthreadvc2.dll %ship%\ffgl >nul
copy %PALETTE_SOURCE%\build\windows\vc15\bin\msvcr100.dll %ship%\ffgl >nul
popd

if not "%PALETTE_MMTT%" == "kinect" goto no_mmtt_kinect
echo ================ Compiling mmtt_kinect
pushd %PALETTE_SOURCE%\mmtt_kinect\build\windows
msbuild /t:Build /p:Configuration=Debug /p:Platform="x32" mmtt_kinect.sln
rem Put mmtt_kinect in its own bin directory, to keep 32-bit things separate
mkdir %bin%\mmtt_kinect
copy mmtt_kinect\Debug\mmtt_kinect.exe %bin%\mmtt_kinect\mmtt_kinect.exe >nul
copy mmtt_kinect\*.dll %bin%\mmtt_kinect >nul
popd
:no_mmtt_kinect
rem ======== Kinect (mmtt_kinect) is only built when PALETTE_MMTT is set
if "%PALETTE_MMTT%" == "kinect" call mmtt_build.bat

echo ================ Copying misc binaries
copy %PALETTE_SOURCE%\binaries\nircmdc.exe %bin% >nul
Expand Down Expand Up @@ -132,13 +128,9 @@ copy "%USERPROFILE%\mingw64\bin\libstdc++-6.dll" %bin% >nul
echo ================ Removing unused things
rm -fr %bin%\pyinstalled\tcl\tzdata

copy %PALETTE_SOURCE%\VERSION %ship% >nul
set /p version=<../../VERSION

echo ================ Creating installer for VERSION %version%

sed -e "s/SUBSTITUTE_VERSION_HERE/%version%/" < palette_win_setup.iss > tmp.iss
"c:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q tmp.iss
"c:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q palette_win_setup.iss

if not "%PALETTE_MMTT%" == "kinect" goto no_kinect
move Output\palette_%version%_win_setup.exe %PALETTE_SOURCE%\release\palette_%version%_win_setup_with_kinect.exe >nul
Expand All @@ -150,6 +142,5 @@ move Output\palette_%version%_win_setup.exe %PALETTE_SOURCE%\release >nul
:finish

rmdir Output
rm tmp.iss

:getout
5 changes: 1 addition & 4 deletions build/windows/build.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
echo off
set PALETTE_MMTT=none
echo "BUILDING binaries..."
call bin_build
echo "BUILDING data..."
call data_build
echo "INSTALLING binaries"
call bin_install
echo "INSTALLING data"
call data_install
10 changes: 10 additions & 0 deletions build/windows/buildall.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@echo off
palette stop
echo "====================== creating build with PALETTE_MMTT set to none"
set PALETTE_MMTT=none
call cleanall.bat
call build.bat
echo "====================== creating build with PALETTE_MMTT set to kinect"
set PALETTE_MMTT=kinect
call cleanall.bat
call build.bat
2 changes: 2 additions & 0 deletions build/windows/cleanall.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@echo off

if not "%PALETTE_SOURCE%" == "" goto keepgoing
echo You must set the PALETTE_SOURCE environment variable.
goto getout
Expand Down
13 changes: 7 additions & 6 deletions build/windows/data_build.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
@echo off

set datadir=data_omnisphere
set data=%PALETTE_DATA%

set /p version=<../../VERSION
set PALETTE_VERSION=%version%

set datadir=data_%data%

if not "%PALETTE_SOURCE%" == "" goto keepgoing1
echo You must set the PALETTE_SOURCE environment variable.
Expand All @@ -18,14 +23,10 @@ xcopy /e /y %PALETTE_SOURCE%\%datadir%\* %ship%\%datadir% >nul

echo ================ Creating installer for %datadir%

set /p version=<../../VERSION
sed -e "s/SUBSTITUTE_DATADIR_HERE/%datadir%/" < %datadir%.iss > tmp.iss
sed -e "s/SUBSTITUTE_VERSION_HERE/%version%/" < tmp.iss > tmp2.iss
"c:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q tmp2.iss
"c:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q data_omnisphere.iss

move Output\%datadir%_%version%.exe %PALETTE_SOURCE%\release\palette_%version%_%datadir%.exe >nul

rm -fr Output > nul 2>&1
rm tmp.iss tmp2.iss

:getout
6 changes: 3 additions & 3 deletions build/windows/data_omnisphere.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

#include "environment.iss"

#define MyAppName "SUBSTITUTE_DATADIR_HERE"
#define MyAppVersion "SUBSTITUTE_VERSION_HERE"
#define MyAppName "data_"+GetEnv('PALETTE_DATA')
#define MyAppVersion GetEnv('PALETTE_VERSION')
#define MyAppPublisher "Nosuch Media"
#define MyAppURL "https://github.com/vizicist/palette"
#define DataDir "data_omnisphere"
#define DataPath "{commoncf64}/Palette/SUBSTITUTE_DATADIR_HERE"
#define DataPath "{commoncf64}/Palette/data_"+GetEnv('PALETTE_DATA')

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
Expand Down
8 changes: 8 additions & 0 deletions build/windows/install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
echo off
set PALETTE_MMTT=none
echo "STOPPING palette"
palette stop
echo "INSTALLING binaries"
call bin_install
echo "INSTALLING data"
call data_install
16 changes: 8 additions & 8 deletions build/windows/mmtt_build.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
echo ================ Compiling mmtt_kinect
pushd %PALETTE_SOURCE%\mmtt_kinect\build\windows
msbuild /t:Build /p:Configuration=Debug /p:Platform="x32" mmtt_kinect.sln
rem Put mmtt_kinect in its own bin directory, to keep 32-bit things separate
mkdir %bin%\mmtt_kinect
copy mmtt_kinect\Debug\mmtt_kinect.exe %bin%\mmtt_kinect\mmtt_kinect.exe >nul
copy mmtt_kinect\*.dll %bin%\mmtt_kinect >nul
popd
echo ================ Compiling mmtt_kinect
pushd %PALETTE_SOURCE%\mmtt_kinect\build\windows
msbuild /target:mmtt_kinect /p:Configuration=Debug /p:Platform="win32" mmtt_kinect.sln
rem Put mmtt_kinect in its own bin directory, to keep 32-bit things separate
mkdir %bin%\mmtt_kinect
copy mmtt_kinect\Debug\mmtt_kinect.exe %bin%\mmtt_kinect\mmtt_kinect.exe >nul
copy mmtt_kinect\*.dll %bin%\mmtt_kinect >nul
popd
2 changes: 1 addition & 1 deletion build/windows/palette_win_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "environment.iss"

#define MyAppName "Palette"
#define MyAppVersion "SUBSTITUTE_VERSION_HERE"
#define MyAppVersion GetEnv('PALETTE_VERSION')
#define MyAppPublisher "Nosuch Media"
#define MyAppURL "https://github.com/vizicist/palette"

Expand Down
2 changes: 0 additions & 2 deletions build/windows/x

This file was deleted.

1 change: 0 additions & 1 deletion build/windows/x.bat

This file was deleted.

Loading

0 comments on commit 0f34c99

Please sign in to comment.