diff --git a/.gitignore b/.gitignore index cd583bf8..8889aa41 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ venv/ *.exe deej-dev deej-release +releases/ diff --git a/scripts/README.md b/scripts/README.md index 33cd9ffe..020d226f 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -2,7 +2,7 @@ This document lists the various scripts in the project and their purposes. -> Note: All scripts are meant to be run from the root of the repository, i.e. from the `deej` directory: `scripts\whatever.bat`. They're not guaranteed to work correctly if run from another directory. +> Note: All scripts are meant to be run from the root of the repository, i.e. from the `deej` directory: `scripts\...\whatever.bat`. They're not guaranteed to work correctly if run from another directory. ### Windows @@ -11,6 +11,7 @@ This document lists the various scripts in the project and their purposes. - [`build-all.bat`](./windows/build-all.bat): Helper script to build all variants - [`make-icon.bat`](./windows/make-icon.bat): Converts a .ico file to an icon byte array in a Go file. Used by our systray library. You shouldn't need to run this unless you change the deej logo - [`make-rsrc.bat`](./windows/make-rsrc.bat): Generates a `rsrc.syso` resource file inside `cmd` alongside `main.go` - This indicates to the Go linker to use the deej application manifest and icon when building. +- [`prepare-release.bat`](./windows/prepare-release.bat): Tags, builds and renames the release binaries in preparation for a GitHub release. Usage: `prepare-release.bat vX.Y.Z` (binaries will be under `releases\vX.Y.Z\`) ### Linux diff --git a/scripts/misc/default-config.yaml b/scripts/misc/default-config.yaml new file mode 100644 index 00000000..60ba6f65 --- /dev/null +++ b/scripts/misc/default-config.yaml @@ -0,0 +1,22 @@ +# process names are case-insensitive +# you can use 'master' to indicate the master channel, or a list of process names to create a group +# you can also use 'system' on windows to control the "system sounds" volume +slider_mapping: + 0: master + 1: chrome.exe + 2: spotify.exe + 3: + - pathofexile_x64.exe + - rocketleague.exe + 4: discord.exe + +# set this to true if you want the controls inverted (i.e. top is 0%, bottom is 100%) +invert_sliders: false + +# settings for connecting to the arduino board +com_port: COM4 +baud_rate: 9600 + +# limits how often deej will look for new processes +# it's recommended to leave this setting at its default value +process_refresh_frequency: 5 diff --git a/scripts/misc/release-notes.txt b/scripts/misc/release-notes.txt new file mode 100644 index 00000000..56e4405d --- /dev/null +++ b/scripts/misc/release-notes.txt @@ -0,0 +1,20 @@ +This release ___________: + +- One awesome thing that happened +- Another awesome thing + +Launch instructions: + +- Download both `config.yaml` and `deej.exe` and place them in the same directory +- Verify that your config has the correct COM port for your Arduino board +- Launch `deej.exe`. You can always edit the config while `deej` is running + +**_Linux users:_** for the time being, please build from source. If there's demand for precompiled release binaries, please [let us know!](https://discord.gg/nf88NJu) + +> _Tip: If `deej.exe` seems to crash or doesn't start, please [send us](https://discord.gg/nf88NJu) the `logs\deej-latest-run.log` file from your `deej` directory. + +> _Tip:_ `deej-debug.exe` is a version with a console window that displays additional logs. If you have trouble getting things to work, [join our Discord](https://discord.gg/nf88NJu) and post a snippet there. + +More detailed instructions and documentation are in the [repo's main page](https://github.com/omriharel/deej). + +Enjoy! diff --git a/scripts/windows/prepare-release.bat b/scripts/windows/prepare-release.bat new file mode 100644 index 00000000..aa9798d8 --- /dev/null +++ b/scripts/windows/prepare-release.bat @@ -0,0 +1,46 @@ +@ECHO OFF + +IF "%1"=="" GOTO NOTAG + +ECHO Preparing release (%1)... +ECHO. + +git tag --delete %1 >NUL 2>&1 +git tag %1 + +REM set windows scripts dir root in relation to script path to avoid cwd dependency +SET "WIN_SCRIPTS_ROOT=%~dp0" + +CALL "%WIN_SCRIPTS_ROOT%build-dev.bat" + +ECHO. + +CALL "%WIN_SCRIPTS_ROOT%build-release.bat" + +REM make this next part nicer by setting the repo root +SET "DEEJ_ROOT=%WIN_SCRIPTS_ROOT%..\.." +PUSHD "%DEEJ_ROOT%" +SET "DEEJ_ROOT=%CD%" +POPD + +MKDIR "%DEEJ_ROOT%\releases\%1" 2> NUL +MOVE /Y "%DEEJ_ROOT%\deej-release.exe" "%DEEJ_ROOT%\releases\%1\deej.exe" >NUL 2>&1 +MOVE /Y "%DEEJ_ROOT%\deej-dev.exe" "%DEEJ_ROOT%\releases\%1\deej-debug.exe" >NUL 2>&1 +COPY /Y "%DEEJ_ROOT%\scripts\misc\default-config.yaml" "%DEEJ_ROOT%\releases\%1\config.yaml" >NUL 2>&1 +COPY /Y "%DEEJ_ROOT%\scripts\misc\release-notes.txt" "%DEEJ_ROOT%\releases\%1\notes.txt" >NUL 2>&1 + +ECHO. +ECHO Release binaries created in %DEEJ_ROOT%\releases\%1 +ECHO Opening release directory and notes for editing. +ECHO When you're done, run "git push origin %1" and draft the release on GitHub. + +START explorer.exe "%DEEJ_ROOT%\releases\%1" +START notepad.exe "%DEEJ_ROOT%\releases\%1\notes.txt" + +GOTO DONE + +:NOTAG +ECHO usage: %0 ^ (use semver i.e. v0.9.3) +GOTO DONE + +:DONE