Skip to content

Commit

Permalink
Added initial information panel that explains that LinnStrument shoul…
Browse files Browse the repository at this point in the history
…d be connected directly, without USB hub.

Updated version to 1.3.2
  • Loading branch information
gbevin committed Feb 25, 2015
1 parent c301528 commit 0124bda
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 28 deletions.
8 changes: 4 additions & 4 deletions Builds/Linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ ifeq ($(CONFIG),Debug)
TARGET_ARCH := -march=native
endif

CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.1" -D "JUCE_APP_VERSION_HEX=0x10301" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.2" -D "JUCE_APP_VERSION_HEX=0x10302" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -g -ggdb -O0
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.1" -D "JUCE_APP_VERSION_HEX=0x10301" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
RESFLAGS := -D "LINUX=1" -D "DEBUG=1" -D "_DEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.2" -D "JUCE_APP_VERSION_HEX=0x10302" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
TARGET := LinnStrumentUpdater
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
Expand All @@ -39,12 +39,12 @@ ifeq ($(CONFIG),Release)
TARGET_ARCH := -march=native
endif

CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.1" -D "JUCE_APP_VERSION_HEX=0x10301" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CPPFLAGS := $(DEPFLAGS) -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.2" -D "JUCE_APP_VERSION_HEX=0x10302" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
CFLAGS += $(CPPFLAGS) $(TARGET_ARCH) -Os
CXXFLAGS += $(CFLAGS)
LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR) -fvisibility=hidden -L/usr/X11R6/lib/ -lX11 -lXext -lXinerama -ldl -lfreetype -lpthread -lrt
LDDEPS :=
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.1" -D "JUCE_APP_VERSION_HEX=0x10301" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
RESFLAGS := -D "LINUX=1" -D "NDEBUG=1" -D "JUCER_LINUX_MAKE_7346DA2A=1" -D "JUCE_APP_VERSION=1.3.2" -D "JUCE_APP_VERSION_HEX=0x10302" -I /usr/include -I /usr/include/freetype2 -I ../../JuceLibraryCode -I ../../JuceLibraryCode/modules
TARGET := LinnStrumentUpdater
BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)
CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)
Expand Down
4 changes: 2 additions & 2 deletions Builds/MacOSX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>CFBundleVersion</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>NSHumanReadableCopyright</key>
<string>Roger Linn Design</string>
<key>NSHighResolutionCapable</key>
Expand Down
8 changes: 4 additions & 4 deletions Builds/MacOSX/LinnStrument Updater.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2113,8 +2113,8 @@
"_DEBUG=1",
"DEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.3.1",
"JUCE_APP_VERSION_HEX=0x10301",
"JUCE_APP_VERSION=1.3.2",
"JUCE_APP_VERSION_HEX=0x10302",
);
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
HEADER_SEARCH_PATHS = (
Expand Down Expand Up @@ -2148,8 +2148,8 @@
"_NDEBUG=1",
"NDEBUG=1",
"JUCER_XCODE_MAC_F6D2F4CF=1",
"JUCE_APP_VERSION=1.3.1",
"JUCE_APP_VERSION_HEX=0x10301",
"JUCE_APP_VERSION=1.3.2",
"JUCE_APP_VERSION_HEX=0x10302",
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
Expand Down
4 changes: 2 additions & 2 deletions Builds/VisualStudio2013/LinnStrument Updater.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<Optimization>Disabled</Optimization>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;..\..\Serial;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.3.1;JUCE_APP_VERSION_HEX=0x10301;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;DEBUG;_DEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.3.2;JUCE_APP_VERSION_HEX=0x10302;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
Expand Down Expand Up @@ -110,7 +110,7 @@ copy "$(ProjectDir)\..\..\Binaries\windows\bossac.exe" "$(OutDir)\tools";</Comma
<ClCompile>
<Optimization>MinSpace</Optimization>
<AdditionalIncludeDirectories>..\..\JuceLibraryCode;..\..\JuceLibraryCode\modules;..\..\Serial;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.3.1;JUCE_APP_VERSION_HEX=0x10301;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;JUCER_VS2013_78A5020=1;JUCE_APP_VERSION=1.3.2;JUCE_APP_VERSION_HEX=0x10302;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<RuntimeTypeInfo>true</RuntimeTypeInfo>
<PrecompiledHeader />
Expand Down
8 changes: 4 additions & 4 deletions Builds/VisualStudio2013/resources.rc
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,3,1,0
PRODUCTVERSION 1,3,1,0
FILEVERSION 1,3,2,0
PRODUCTVERSION 1,3,2,0
FILEFLAGSMASK 0x0L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -32,9 +32,9 @@ BEGIN
BEGIN
VALUE "CompanyName", "Roger Linn Design"
VALUE "FileDescription", "LinnStrument Updater"
VALUE "FileVersion", "1.3.1"
VALUE "FileVersion", "1.3.2"
VALUE "ProductName", "LinnStrument Updater"
VALUE "ProductVersion", "1.3.1"
VALUE "ProductVersion", "1.3.2"
END
END
BLOCK "VarFileInfo"
Expand Down
4 changes: 2 additions & 2 deletions JuceLibraryCode/JuceHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
namespace ProjectInfo
{
const char* const projectName = "LinnStrument Updater";
const char* const versionString = "1.3.1";
const int versionNumber = 0x10301;
const char* const versionString = "1.3.2";
const int versionNumber = 0x10302;
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion LinnStrumentUpdater.jucer
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>

<JUCERPROJECT id="ibSWwr" name="LinnStrument Updater" projectType="guiapp"
version="1.3.1" bundleIdentifier="com.rogerlinndesign.linnstrument.Updater"
version="1.3.2" bundleIdentifier="com.rogerlinndesign.linnstrument.Updater"
includeBinaryInAppConfig="1" jucerVersion="3.1.0" companyName="Roger Linn Design"
companyWebsite="http://www.rogerlinndesign.com" companyEmail="[email protected]">
<MAINGROUP id="AAWYcK" name="LinnStrument Updater">
Expand Down
38 changes: 31 additions & 7 deletions Source/MainComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Introjucer version: 3.1.0
Created with Introjucer version: 3.1.1
------------------------------------------------------------------------------
Expand Down Expand Up @@ -52,13 +52,20 @@ MainComponent::MainComponent ()
linnstrumentLabel->setColour (TextEditor::textColourId, Colours::black);
linnstrumentLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000));

addAndMakeVisible (goAheadButton = new TextButton ("go ahead"));
goAheadButton->setButtonText (TRANS("Go Ahead"));
goAheadButton->addListener (this);
goAheadButton->setColour (TextButton::buttonColourId, Colour (0xffd0d0d0));
goAheadButton->setColour (TextButton::buttonOnColourId, Colour (0xff868686));

cachedImage_rogerlinndesign_png = ImageCache::getFromMemory (rogerlinndesign_png, rogerlinndesign_pngSize);

//[UserPreSize]
updateButton->setVisible(false);
updateButton->setEnabled(false);
//[/UserPreSize]

setSize (400, 210);
setSize (400, 218);


//[Constructor] You can add your own custom stuff here..
Expand All @@ -73,6 +80,7 @@ MainComponent::~MainComponent()
progressLabel = nullptr;
updateButton = nullptr;
linnstrumentLabel = nullptr;
goAheadButton = nullptr;


//[Destructor]. You can add your own custom destruction code here..
Expand All @@ -99,9 +107,13 @@ void MainComponent::paint (Graphics& g)

void MainComponent::resized()
{
progressLabel->setBounds ((getWidth() / 2) - (328 / 2), 168, 328, 24);
updateButton->setBounds ((getWidth() / 2) - (136 / 2), 168, 136, 24);
//[UserPreResize] Add your own custom resize code here..
//[/UserPreResize]

progressLabel->setBounds ((getWidth() / 2) - (328 / 2), 176, 328, 24);
updateButton->setBounds ((getWidth() / 2) - (136 / 2), 176, 136, 24);
linnstrumentLabel->setBounds ((getWidth() / 2) - (328 / 2), 96, 328, 64);
goAheadButton->setBounds ((getWidth() / 2) - (136 / 2), 176, 136, 24);
//[UserResized] Add your own custom resize handling here..
//[/UserResized]
}
Expand All @@ -118,6 +130,14 @@ void MainComponent::buttonClicked (Button* buttonThatWasClicked)
UpdaterApplication::getApp().upgradeLinnStrument();
//[/UserButtonCode_updateButton]
}
else if (buttonThatWasClicked == goAheadButton)
{
//[UserButtonCode_goAheadButton] -- add your button handler code here..
updateButton->setVisible(true);
goAheadButton->setVisible(false);
UpdaterApplication::getApp().detectLinnStrument();
//[/UserButtonCode_goAheadButton]
}

//[UserbuttonClicked_Post]
//[/UserbuttonClicked_Post]
Expand Down Expand Up @@ -151,25 +171,29 @@ BEGIN_JUCER_METADATA
<JUCER_COMPONENT documentType="Component" className="MainComponent" componentName=""
parentClasses="public Component" constructorParams="" variableInitialisers=""
snapPixels="8" snapActive="1" snapShown="1" overlayOpacity="0.330"
fixedSize="0" initialWidth="400" initialHeight="210">
fixedSize="0" initialWidth="400" initialHeight="218">
<BACKGROUND backgroundColour="ffffffff">
<IMAGE pos="0Cc 20 175 68" resource="rogerlinndesign_png" opacity="1"
mode="1"/>
</BACKGROUND>
<LABEL name="progress label" id="25076abe0a4bd824" memberName="progressLabel"
virtualName="" explicitFocusOrder="0" pos="0Cc 168 328 24" edTextCol="ff000000"
virtualName="" explicitFocusOrder="0" pos="0Cc 176 328 24" edTextCol="ff000000"
edBkgCol="0" labelText="" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TEXTBUTTON name="update button" id="30f4597546a7ddb9" memberName="updateButton"
virtualName="" explicitFocusOrder="0" pos="0Cc 168 136 24" bgColOff="ffd0d0d0"
virtualName="" explicitFocusOrder="0" pos="0Cc 176 136 24" bgColOff="ffd0d0d0"
bgColOn="ff868686" buttonText="Update Firmware" connectedEdges="0"
needsCallback="1" radioGroupId="0"/>
<LABEL name="linnstrument label" id="62da816b2e6b995a" memberName="linnstrumentLabel"
virtualName="" explicitFocusOrder="0" pos="0Cc 96 328 64" edTextCol="ff000000"
edBkgCol="0" labelText="" editableSingleClick="0" editableDoubleClick="0"
focusDiscardsChanges="0" fontname="Default font" fontsize="15"
bold="0" italic="0" justification="36"/>
<TEXTBUTTON name="go ahead" id="47cc25a35e9d524d" memberName="goAheadButton"
virtualName="" explicitFocusOrder="0" pos="0Cc 176 136 24" bgColOff="ffd0d0d0"
bgColOn="ff868686" buttonText="Go Ahead" connectedEdges="0" needsCallback="1"
radioGroupId="0"/>
</JUCER_COMPONENT>

END_JUCER_METADATA
Expand Down
3 changes: 2 additions & 1 deletion Source/MainComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
and re-saved.
Created with Introjucer version: 3.1.0
Created with Introjucer version: 3.1.1
------------------------------------------------------------------------------
Expand Down Expand Up @@ -74,6 +74,7 @@ class MainComponent : public Component,
ScopedPointer<Label> progressLabel;
ScopedPointer<TextButton> updateButton;
ScopedPointer<Label> linnstrumentLabel;
ScopedPointer<TextButton> goAheadButton;
Image cachedImage_rogerlinndesign_png;


Expand Down
14 changes: 13 additions & 1 deletion Source/UpdaterApplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace
enum ApplicationMessageType
{
findFirmware,
connectionWarning,
detectLinnStrument,
readSettings,
prepareDevice,
Expand Down Expand Up @@ -92,7 +93,7 @@ void UpdaterApplication::handleMessage(const juce::Message &message)
{
if (linnStrumentSerial->findFirmwareFile())
{
detectLinnStrument();
connectionWarning();
}
else
{
Expand All @@ -102,6 +103,12 @@ void UpdaterApplication::handleMessage(const juce::Message &message)
break;
}

case ApplicationMessageType::connectionWarning:
{
((MainComponent *)mainWindow->getContentComponent())->setLabelText("Please connect LinnStrument's USB cable.\nDO NOT use a USB hub!\n\nThen activate Update OS mode in Global Settings.", false);
break;
}

case ApplicationMessageType::detectLinnStrument:
{
if (linnStrumentSerial->isDetected() || linnStrumentSerial->detect())
Expand Down Expand Up @@ -200,6 +207,11 @@ void UpdaterApplication::findFirmware()
postMessage(new ApplicationMessage(ApplicationMessageType::findFirmware, (void *)nullptr));
}

void UpdaterApplication::connectionWarning()
{
postMessage(new ApplicationMessage(ApplicationMessageType::connectionWarning, (void *)nullptr));
}

void UpdaterApplication::detectLinnStrument()
{
postMessage(new ApplicationMessage(ApplicationMessageType::detectLinnStrument, (void *)nullptr));
Expand Down
1 change: 1 addition & 0 deletions Source/UpdaterApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class UpdaterApplication : public JUCEApplication,
LinnStrumentSerial &getLinnStrumentSerial();

void findFirmware();
void connectionWarning();
void detectLinnStrument();
void upgradeLinnStrument();
void restoreSettings();
Expand Down

0 comments on commit 0124bda

Please sign in to comment.