Skip to content

Commit

Permalink
rework PALETTE_DATA stuff and create data installer
Browse files Browse the repository at this point in the history
  • Loading branch information
vizicist committed Jun 5, 2024
1 parent 4b207eb commit 75f1006
Show file tree
Hide file tree
Showing 769 changed files with 698 additions and 188 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.96
7.97
4 changes: 4 additions & 0 deletions build/windows/all_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
call bin_build
call bin_install
call data_build
call data_install
52 changes: 23 additions & 29 deletions build/windows/build.bat → build/windows/bin_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ pushd %PALETTE_SOURCE%\python
rm -fr dist
rm -fr build\palette_gui
rm -fr build
pyinstaller -i ..\data\config\palette.ico palette_gui.py > pyinstaller_gui.out 2>&1
pyinstaller -i palette.ico palette_gui.py > pyinstaller_gui.out 2>&1
move dist\palette_gui dist\pyinstalled >nul
copy palette.ico dist\pyinstalled >nul
move dist\pyinstalled %bin% >nul
popd

Expand Down Expand Up @@ -113,35 +114,10 @@ copy palette_killall.bat %bin% >nul
copy palette_onboot.bat %bin% >nul
copy delay.bat %bin% >nul
copy cdlogs.bat %bin% >nul
copy tv_on.bat %bin% >nul
copy tv_off.bat %bin% >nul
popd

echo ================ Copying data
mkdir %ship%\data\config
mkdir %ship%\data\midifiles
mkdir %ship%\data\saved
rem mkdir %ship%\data\keykit
rem mkdir %ship%\data\keykit\liblocal
mkdir %ship%\data\html
copy %PALETTE_SOURCE%\data\config\homepage.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\ffgl.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\param*.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\resolume.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\settings.json %ship%\data\config >nul
rem copy %PALETTE_SOURCE%\data\config\mmtt_*.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\synths.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\morphs.json %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\Palette*.avc %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\EraeTouchLayout.emk %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\*.png %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\consola.ttf %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\OpenSans-Regular.ttf %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\palette.ico %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\config\*.bidule %ship%\data\config >nul
copy %PALETTE_SOURCE%\data\midifiles\*.* %ship%\data\midifiles >nul
xcopy /e /y %PALETTE_SOURCE%\data\saved %ship%\data\saved >nul
rem xcopy /e /y %PALETTE_SOURCE%\data\keykit\liblocal %ship%\data\keykit\liblocal >nul
xcopy /e /y %PALETTE_SOURCE%\data\html %ship%\data\html >nul

echo ================ Copying windows-specific things
copy %PALETTE_SOURCE%\SenselLib\x64\LibSensel.dll %bin% >nul
copy %PALETTE_SOURCE%\SenselLib\x64\LibSenselDecompress.dll %bin% >nul
Expand All @@ -155,6 +131,24 @@ copy "%USERPROFILE%\mingw64\bin\libstdc++-6.dll" %bin% >nul
echo ================ Removing unused things
rm -fr %bin%\pyinstalled\tcl\tzdata

call buildinstaller.bat
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

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
goto finish

:no_kinect
move Output\palette_%version%_win_setup.exe %PALETTE_SOURCE%\release >nul

:finish

rmdir Output
rm tmp.iss

:getout
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ del /q hostname.txt
echo ....................................................
echo Installing Palette version %version%
echo ....................................................
if not "%PALETTE_MMTT%" == "kinect" goto no_mmtt_kinect
..\..\release\palette_%version%_win_setup_with_kinect.exe /SILENT
goto done
:no_mmtt_kinect
..\..\release\palette_%version%_win_setup.exe /SILENT
:done
echo ....................................................
echo Done!
echo ....................................................
2 changes: 0 additions & 2 deletions build/windows/buildinstall.bat

This file was deleted.

21 changes: 0 additions & 21 deletions build/windows/buildinstaller.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/windows/buildinstallnow.bat

This file was deleted.

32 changes: 32 additions & 0 deletions build/windows/data_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off

set datadir=data_omnisphere

if not "%PALETTE_SOURCE%" == "" goto keepgoing1
echo You must set the PALETTE_SOURCE environment variable.
goto getout
:keepgoing1

set ship=%PALETTE_SOURCE%\build\windows\ship

rm -fr %ship% > nul 2>&1
mkdir %ship%

echo ================ Copying %datadir%
mkdir %ship%\%datadir%
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

set filename=%datadir%_%version%
move Output\%filename%.exe %PALETTE_SOURCE%\release >nul

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

:getout
14 changes: 14 additions & 0 deletions build/windows/data_install.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@echo off

set datadir=data_omnisphere

set /p version=<../../VERSION
echo ....................................................
echo Installing %datadir%_%version%
echo ....................................................

..\..\release\%datadir%_%version%.exe /SILENT

echo ....................................................
echo Done!
echo ....................................................
52 changes: 52 additions & 0 deletions build/windows/data_omnisphere.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#include "environment.iss"

#define MyAppName "SUBSTITUTE_DATADIR_HERE"
#define MyAppVersion "SUBSTITUTE_VERSION_HERE"
#define MyAppPublisher "Nosuch Media"
#define MyAppURL "https://github.com/vizicist/palette"
#define DataDir "data_omnisphere"
#define DataPath "{commoncf64}/Palette/SUBSTITUTE_DATADIR_HERE"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{443296B2-FB07-4F76-992A-A100D5E51ADF}
AppVersion={#MyAppVersion}
AppName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={#DataPath}
DefaultGroupName={#MyAppName}
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename={#DataDir}_{#MyAppVersion}
; Compression=none
Compression=lzma
SolidCompression=yes
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=6
WizardStyle=modern
ArchitecturesAllowed=x64
ChangesEnvironment=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

; Things in %CommonProgramFiles%\Palette are made writable by anyone, for local changes and config
[Dirs]
Name: "{commoncf64}\{#MyAppName}"; Permissions: users-modify

[Files]
Source: "ship\{#DataDir}\*"; DestDir: "{#DataPath}"; Flags: comparetimestamp ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "PALETTE_DATA_PATH"; ValueData: "{#DataPath}"; Flags: preservestringtype

8 changes: 0 additions & 8 deletions build/windows/palette_win_setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#define MyAppVersion "SUBSTITUTE_VERSION_HERE"
#define MyAppPublisher "Nosuch Media"
#define MyAppURL "https://github.com/vizicist/palette"
#define DataPath "{commoncf64}/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 Expand Up @@ -53,11 +52,6 @@ Source: "ship\bin\mmtt_kinect\*"; DestDir: "{app}\bin\mmtt_kinect"; Flags: ignor
Source: "ship\ffgl\*"; DestDir: "{app}\ffgl"; Flags: ignoreversion recursesubdirs createallsubdirs
; Source: "ship\keykit\*"; DestDir: "{app}\keykit"; Flags: ignoreversion recursesubdirs createallsubdirs

; NOTE - all data_* files go in CommonProgramFiles\Palette
Source: "ship\data\*"; DestDir: "{#DataPath}"; Flags: comparetimestamp ignoreversion recursesubdirs createallsubdirs
Source: "logs_readme.txt"; DestDir: "{#DataPath}\logs"; DestName: "readme.txt"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

; This specifies the Visual C++ Windows Runtime Redistributable to install, it's put in {app}\bin to help debug things.
[Files]
Source: "vc15\bin\VC_redist.x64.exe"; DestDir: {app}\bin
Expand All @@ -76,8 +70,6 @@ Name: "{group}\Stop Palette"; Filename: "{app}\bin\palette.exe"; Parameters: "st
[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "PALETTE"; ValueData: "{app}"; Flags: preservestringtype
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "PALETTE_DATA_PATH"; ValueData: "{commoncf64}\Palette\data"; Flags: preservestringtype

[Code]
procedure CurStepChanged(CurStep: TSetupStep);
Expand Down
52 changes: 52 additions & 0 deletions build/windows/tmp.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#include "environment.iss"

#define MyAppName "data_omnisphere"
#define MyAppVersion "SUBSTITUTE_VERSION_HERE"
#define MyAppPublisher "Nosuch Media"
#define MyAppURL "https://github.com/vizicist/palette"
#define DataDir "data_omnisphere"
#define DataPath "{commoncf64}/Palette/data_omnisphere"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{443296B2-FB07-4F76-992A-A100D5E51ADF}
AppVersion={#MyAppVersion}
AppName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={#DataPath}
DefaultGroupName={#MyAppName}
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename={#DataDir}_{#MyAppVersion}
; Compression=none
Compression=lzma
SolidCompression=yes
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=6
WizardStyle=modern
ArchitecturesAllowed=x64
ChangesEnvironment=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

; Things in %CommonProgramFiles%\Palette are made writable by anyone, for local changes and config
[Dirs]
Name: "{commoncf64}\{#MyAppName}"; Permissions: users-modify

[Files]
Source: "ship\{#DataDir}\*"; DestDir: "{#DataPath}"; Flags: comparetimestamp ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "PALETTE_DATA_PATH"; ValueData: "{#DataPath}"; Flags: preservestringtype

52 changes: 52 additions & 0 deletions build/windows/tmp2.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#include "environment.iss"

#define MyAppName "data_omnisphere"
#define MyAppVersion "7.97"
#define MyAppPublisher "Nosuch Media"
#define MyAppURL "https://github.com/vizicist/palette"
#define DataDir "data_omnisphere"
#define DataPath "{commoncf64}/Palette/data_omnisphere"

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{443296B2-FB07-4F76-992A-A100D5E51ADF}
AppVersion={#MyAppVersion}
AppName={#MyAppName}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={#DataPath}
DefaultGroupName={#MyAppName}
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
OutputBaseFilename={#DataDir}_{#MyAppVersion}
; Compression=none
Compression=lzma
SolidCompression=yes
LZMAUseSeparateProcess=yes
LZMANumBlockThreads=6
WizardStyle=modern
ArchitecturesAllowed=x64
ChangesEnvironment=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

; Things in %CommonProgramFiles%\Palette are made writable by anyone, for local changes and config
[Dirs]
Name: "{commoncf64}\{#MyAppName}"; Permissions: users-modify

[Files]
Source: "ship\{#DataDir}\*"; DestDir: "{#DataPath}"; Flags: comparetimestamp ignoreversion recursesubdirs createallsubdirs

; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Registry]
Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \
ValueType: expandsz; ValueName: "PALETTE_DATA_PATH"; ValueData: "{#DataPath}"; Flags: preservestringtype

2 changes: 2 additions & 0 deletions build/windows/x
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
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
8 changes: 0 additions & 8 deletions data/config/updateconfig.bat

This file was deleted.

Loading

0 comments on commit 75f1006

Please sign in to comment.