Skip to content

Commit

Permalink
0.0.8 for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Nov 8, 2017
1 parent 65dd3cd commit 3737ea4
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,7 @@ fastlane/test_output
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
iOSInjectionProject/

qmk_toolbox.exe
qmk_toolbox_install.exe
9 changes: 8 additions & 1 deletion windows/QMK Toolbox/Flashing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum Chipset {
Halfkay,
Caterina,
STM32,
Kiibohd,
NumberOfChipsets
};
public class Flashing {
Expand All @@ -36,7 +37,7 @@ public class Flashing {
"teensy_loader_cli.exe",
"dfu-util.exe",
"libusb-1.0.dll",
"libusb0.dll", // amd64/libusb0.dll
"libusb0.dll", // x86/libusb0_x86.dll
"mcu-list.txt",
"atmega32u4_eeprom_reset.hex"
};
Expand Down Expand Up @@ -91,6 +92,8 @@ public void flash(string mcu, string file) {
flashHalfkay(mcu, file);
if (f.canFlash(Chipset.STM32))
flashSTM32(mcu, file);
if (f.canFlash(Chipset.Kiibohd))
flashKiibohd(file);
}

public void reset(string mcu) {
Expand Down Expand Up @@ -150,6 +153,10 @@ private void resetHalfkay(string mcu) {
private void flashSTM32(string mcu, string file) {
runProcess("dfu-util.exe", "-a 0 -d 0483:df11 -s 0x08000000 -D \"" + file + "\"");
}

private void flashKiibohd(string file) {
runProcess("dfu-util.exe", "-D \"" + file + "\"");
}
}

}
6 changes: 6 additions & 0 deletions windows/QMK Toolbox/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ private void Form1_Load(object sender, EventArgs e) {
printer.printResponse(" - Caterina (Arduino, Pro Micro) via avrdude (http://nongnu.org/avrdude/)\n", MessageType.Info);
printer.printResponse(" - Halfkay (Teensy, Ergodox EZ) via teensy_loader_cli (https://pjrc.com/teensy/loader_cli.html)\n", MessageType.Info);
printer.printResponse(" - STM32 (ARM) via dfu-util (http://dfu-util.sourceforge.net/)\n", MessageType.Info);
printer.printResponse(" - Kiibohd (ARM) via dfu-util (http://dfu-util.sourceforge.net/)\n", MessageType.Info);

List<USBDeviceInfo> devices = new List<USBDeviceInfo>();

Expand Down Expand Up @@ -358,6 +359,8 @@ private bool DetectBootloader(ManagementBaseObject instance, bool connected = tr
var halfkay_nohid = Regex.Match(instance.GetPropertyValue("Name").ToString(), @".*USB.*");
var dfuUtil_pid = Regex.Match(instance.GetPropertyValue("DeviceID").ToString(), @".*VID_0483.*");
var dfuUtil_vid = Regex.Match(instance.GetPropertyValue("DeviceID").ToString(), @".*PID_DF11.*");
var kiibohd_pid = Regex.Match(instance.GetPropertyValue("DeviceID").ToString(), @".*VID_1C11.*");
var kiibohd_vid = Regex.Match(instance.GetPropertyValue("DeviceID").ToString(), @".*PID_B007.*");

Regex deviceid_regex = new Regex("VID_([0-9A-F]+).*PID_([0-9A-F]+)");
var vp = deviceid_regex.Match(instance.GetPropertyValue("DeviceID").ToString());
Expand All @@ -380,6 +383,9 @@ private bool DetectBootloader(ManagementBaseObject instance, bool connected = tr
} else if (dfuUtil_pid.Success && dfuUtil_vid.Success) {
device_name = "STM32";
devicesAvailable[(int)Chipset.STM32] += connected ? 1 : -1;
} else if (kiibohd_pid.Success && kiibohd_vid.Success) {
device_name = "Kiibohd";
devicesAvailable[(int)Chipset.Kiibohd] += connected ? 1 : -1;
} else {
return false;
}
Expand Down
8 changes: 4 additions & 4 deletions windows/QMK Toolbox/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("QMK Toolbox")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("A flashing/debug utility for devices running QMK Firmware")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("QMK")]
[assembly: AssemblyProduct("QMK Toolbox")]
[assembly: AssemblyCopyright("Copyright © 2017 Jack Humbert")]
[assembly: AssemblyTrademark("")]
Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.0.7")]
[assembly: AssemblyFileVersion("0.0.7")]
[assembly: AssemblyVersion("0.0.8")]
[assembly: AssemblyFileVersion("0.0.8")]
2 changes: 1 addition & 1 deletion windows/QMK Toolbox/QMK Toolbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand Down
Binary file modified windows/QMK Toolbox/libusb0.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion windows/install_compiler.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#define MyAppName "QMK Toolbox"
#define MyAppHandle "qmk"
#define MyAppVersion "0.0.5"
#define MyAppVersion "0.0.8"
#define MyAppPublisher "QMK"
#define MyAppURL "http://qmk.fm"
#define MyAppExeName "qmk_toolbox.exe"
Expand Down
2 changes: 2 additions & 0 deletions windows/release.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
COPY "QMK Toolbox\bin\Release\qmk_toolbox.exe" "qmk_toolbox.exe"
COPY "install.exe" "qmk_toolbox_install.exe"

0 comments on commit 3737ea4

Please sign in to comment.