Skip to content

Commit

Permalink
Merge pull request #57 from sudara/misc
Browse files Browse the repository at this point in the history
Transparency checkboard, updated icons, timing toggle
  • Loading branch information
sudara committed Aug 22, 2023
2 parents 4e353bd + e7d485a commit e9ed6d6
Show file tree
Hide file tree
Showing 44 changed files with 1,174 additions and 699 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI

on:
workflow_dispatch:
push:

env:
CMAKE_BUILD_PARALLEL_LEVEL: 3 # Use up to 3 cpus to build juceaide, etc

concurrency:
group: ${{ github.workflow }}.${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

permissions:
contents: read

jobs:

BuildAndTest:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
include:
- name: macOS
os: macos-latest
binary: dummy.app/Contents/MacOS/dummy &
- name: Windows
os: windows-latest
binary: ./Debug/dummy.exe &

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Configure
run: cmake -B Builds

- name: Build
run: cmake --build Builds --parallel 4

- name: Run
working-directory: Builds/dummy_artefacts
timeout-minutes: 1
run: |
ls -ahl
${{ matrix.binary }}
- uses: OrbitalOwen/desktop-screenshot-action@0.1
with:
file-name: ${{ matrix.name }}.jpg
Binary file added Assets/dogfood-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/dogfood-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/enabled-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/enabled-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/expand-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/expand-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/timing-off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Assets/timing-on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 51 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,62 @@
cmake_minimum_required (VERSION 3.20)
cmake_minimum_required(VERSION 3.20)

project (MelatoninInspector VERSION 1.3.0 LANGUAGES CXX
DESCRIPTION "JUCE module for inspecting Components"
HOMEPAGE_URL "https://github.com/sudara/melatonin_inspector")
project(MelatoninInspector VERSION 1.3.0 LANGUAGES CXX
DESCRIPTION "JUCE module for inspecting Components"
HOMEPAGE_URL "https://github.com/sudara/melatonin_inspector")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)

include(FetchContent)
if (MelatoninInspector_IS_TOP_LEVEL)
message(STATUS "Cloning JUCE...")

FetchContent_Declare(JUCE
GIT_REPOSITORY https://github.com/juce-framework/JUCE.git
GIT_TAG origin/master
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
FIND_PACKAGE_ARGS 7.0.6)

FetchContent_MakeAvailable(JUCE)

juce_add_gui_app (dummy VERSION 1.0.0)
target_sources(dummy PRIVATE tests/dummy.cpp)
set_target_properties(dummy PROPERTIES COMPILE_WARNING_AS_ERROR ON)
endif ()

if (NOT COMMAND juce_add_module)
message(FATAL_ERROR "JUCE must be added to your project before melatonin_inspector!")
endif ()

set (CMAKE_CXX_STANDARD 17)
set (CMAKE_CXX_STANDARD_REQUIRED YES)

# this makes the assumption the current directory is named melatonin_inspector
juce_add_module ("${CMAKE_CURRENT_LIST_DIR}")

juce_add_module("${CMAKE_CURRENT_LIST_DIR}")
add_library(Melatonin::Inspector ALIAS melatonin_inspector)

if (MelatoninInspector_IS_TOP_LEVEL)
target_link_libraries(dummy PRIVATE melatonin_inspector
juce::juce_recommended_config_flags
juce::juce_recommended_lto_flags
juce::juce_recommended_warning_flags)
endif ()

# Assets are precompiled in the module to make it Projucer friendly
# Uncomment these lines to generate the assets again (then copy over from the build folder)
#
# TODO: We need to automate this.
#
# To work with CMake Assets:
# * Uncomment the following lines to generate the assets again
# * Delete everything in "LatestCompliedAssets" folder so there's no conflict
# * Comment out the manual includes in melatonin_inspector.cpp

# When ready to commit:
# * Comment out these lines again
# * Move the new binary .cpp from your build folder to LatestCompiledAssets
# * Move the latest InspectorBinaryData.h to the main module folder
# (for me the files are in cmake-build-debug/modules/melatonin_inspector/juce_binarydata_MelatoninInspector
# * Add the .cpp includes manually to melatonin_inspector.cpp

# file(GLOB_RECURSE MelatoninInspectorAssetFiles CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/Assets/*")
# juce_add_binary_data(MelatoninInspectorAssets SOURCES ${MelatoninInspectorAssetFiles} HEADER_NAME InspectorBinaryData.h NAMESPACE InspectorBinaryData)
# set_target_properties(MelatoninInspectorAssets PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
# target_link_libraries(melatonin_inspector INTERFACE MelatoninInspectorAssets)
#file(GLOB_RECURSE MelatoninInspectorAssetFiles CONFIGURE_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/Assets/*")
#juce_add_binary_data(MelatoninInspectorAssets SOURCES ${MelatoninInspectorAssetFiles} HEADER_NAME InspectorBinaryData.h NAMESPACE InspectorBinaryData)
#set_target_properties(MelatoninInspectorAssets PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
#target_link_libraries(melatonin_inspector INTERFACE MelatoninInspectorAssets)
69 changes: 69 additions & 0 deletions InspectorBinaryData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/* =========================================================================================
This is an auto-generated file: Any edits you make may be overwritten!
*/

#pragma once

namespace InspectorBinaryData
{
extern const char* _DS_Store;
const int _DS_StoreSize = 6148;

extern const char* clear_png;
const int clear_pngSize = 1419;

extern const char* dogfoodoff_png;
const int dogfoodoff_pngSize = 481;

extern const char* dogfoodon_png;
const int dogfoodon_pngSize = 894;

extern const char* enabledoff_png;
const int enabledoff_pngSize = 1031;

extern const char* enabledon_png;
const int enabledon_pngSize = 1017;

extern const char* expandoff_png;
const int expandoff_pngSize = 301;

extern const char* expandon_png;
const int expandon_pngSize = 303;

extern const char* eyedropperoff_png;
const int eyedropperoff_pngSize = 673;

extern const char* eyedropperon_png;
const int eyedropperon_pngSize = 671;

extern const char* logo_png;
const int logo_pngSize = 25781;

extern const char* search_png;
const int search_pngSize = 941;

extern const char* timingoff_png;
const int timingoff_pngSize = 850;

extern const char* timingon_png;
const int timingon_pngSize = 867;

// Number of elements in the namedResourceList and originalFileNames arrays.
const int namedResourceListSize = 14;

// Points to the start of a list of resource names.
extern const char* namedResourceList[];

// Points to the start of a list of resource filenames.
extern const char* originalFilenames[];

// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding data and its size (or a null pointer if the name isn't found).
const char* getNamedResource (const char* resourceNameUTF8, int& dataSizeInBytes);

// If you provide the name of one of the binary resource variables above, this function will
// return the corresponding original, non-mangled filename (or a null pointer if the name isn't found).
const char* getNamedResourceOriginalFilename (const char* resourceNameUTF8);
}
Loading

0 comments on commit e9ed6d6

Please sign in to comment.