Commit d47c285c authored by springob's avatar springob

* update

git-svn-id: https://svn.code.sf.net/p/robodude/code/bobdude@30 bbe26285-3967-4f0a-9db1-5cc42c1bf15a
parent d7b6e9fa
......@@ -6,7 +6,7 @@
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Release">
<Target title="MSW">
<Option output="bin/Release/BobDude" prefix_auto="1" extension_auto="1" />
<Option working_dir="bin/Release/" />
<Option object_output="obj/Release/" />
......@@ -14,78 +14,103 @@
<Option compiler="gcc" />
<Compiler>
<Add option="-O3" />
<Add option="-g" />
<Add option="-pipe" />
<Add option="-fexceptions" />
<Add option="-mthreads" />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add option="-D__WINDOWS__" />
<Add directory="D:/libs/wxWidgets-3.0.2/lib/wx/include/msw-unicode-static-3.0" />
<Add directory="include" />
<Add directory="D:/libs/wxWidgets-3.0.2/include" />
<Add directory="D:/libs/wxWidgets-3.0.2/contrib/include" />
<Add directory="D:/libs/boost_1_39_0" />
<Add directory="." />
<Add directory="C:/MinGW/msys/1.0/home/nils" />
</Compiler>
<ResourceCompiler>
<Add directory="D:/libs/wxWidgets-2.8.10/include" />
<Add directory="D:/libs/wxWidgets-2.8.10/build-release/lib" />
</ResourceCompiler>
<Linker>
<Add option="-Wl,--enable-auto-import" />
<Add option="-Wl,-Bstatic" />
<Add option="-static" />
<Add library="libwx_mswu-3.0.a" />
<Add library="libwxpng-3.0.a" />
<Add library="libwxjpeg-3.0.a" />
<Add library="libwxtiff-3.0.a" />
<Add library="D:\lib\libboost_program_options-mgw34-mt.lib" />
<Add library="D:\lib\libboost_system-mgw34-mt.lib" />
<Add library="D:\lib\libboost_thread-mgw34-mt.lib" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libgdi32.a" />
<Add library="libwinspool.a" />
<Add library="libcomdlg32.a" />
<Add library="libadvapi32.a" />
<Add library="libshell32.a" />
<Add library="libavrdude.a" />
<Add library="C:\MinGW\msys\1.0\home\nils\libusb-win32-bin-1.2.6.0\lib\gcc\libusb.a" />
<Add library="libole32.a" />
<Add library="liboleaut32.a" />
<Add library="libuuid.a" />
<Add library="libcomctl32.a" />
<Add library="libwsock32.a" />
<Add library="libodbc32.a" />
<Add library="libhid.a" />
<Add library="libsetupapi.a" />
<Add library="stdc++" />
<Add library="libwxscintilla-3.0.a" />
<Add library="libwxregexu-3.0.a" />
<Add library="libwxexpat-3.0.a" />
<Add library="z" />
<Add directory="D:/libs/wxWidgets-3.0.2/lib" />
<Add directory="D:/MinGW/lib/gcc/mingw32/4.4.0" />
<Add directory="C:/MinGW/msys/1.0/home/nils/avrdude" />
<Add directory="D:/libs/libusb-win32-src-0.1.12.2" />
<Add directory="D:/libs/libusb-pbatard/msvc" />
</Linker>
</Target>
<Target title="OSX">
<Option output="bin/OSX/BobDude" prefix_auto="1" extension_auto="1" />
<Option working_dir="bin/OSX/" />
<Option object_output="obj/OSX/" />
<Option type="0" />
<Option compiler="gcc" />
<Compiler>
<Add option="-I/usr/local/lib/wx/include/osx_cocoa-unicode-3.1 -I/usr/local/include/wx-3.1 -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXMAC__ -D__WXOSX__ -D__WXOSX_COCOA__" />
<Add option="-DHAVE_TYPE_TRAITS=1" />
<Add directory="." />
</Compiler>
<Linker>
<Add option="-L/usr/local/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL" />
<Add option="-lwx_osx_cocoau_xrc-3.1" />
<Add option="-lwx_osx_cocoau_html-3.1" />
<Add option="-lwx_osx_cocoau_qa-3.1" />
<Add option="-lwx_osx_cocoau_adv-3.1" />
<Add option="-lwx_osx_cocoau_core-3.1" />
<Add option="-lwx_baseu_xml-3.1" />
<Add option="-lwx_baseu_net-3.1" />
<Add option="-lwx_baseu-3.1" />
<Add option="-lusb-1.0" />
<Add option="-lavrdude" />
<Add option="-lboost_system" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
<Add option="-g" />
<Add option="-pipe" />
<Add option="-fexceptions" />
<Add option="-mthreads" />
<Add option="-D__GNUWIN32__" />
<Add option="-D__WXMSW__" />
<Add directory="D:/libs/wxWidgets-3.0.2/include" />
<Add directory="D:/libs/wxWidgets-3.0.2/contrib/include" />
<Add directory="D:/libs/boost_1_39_0" />
<Add directory="." />
<Add directory="C:/MinGW/msys/1.0/home/nils" />
</Compiler>
<ResourceCompiler>
<Add directory="D:/libs/wxWidgets-2.8.10/include" />
</ResourceCompiler>
<Linker>
<Add option="-Wl,--enable-auto-import" />
<Add option="-Wl,-Bstatic" />
<Add option="-static" />
<Add library="libwx_mswu-3.0.a" />
<Add library="libwxpng-3.0.a" />
<Add library="libwxjpeg-3.0.a" />
<Add library="libwxtiff-3.0.a" />
<Add library="D:\lib\libboost_program_options-mgw34-mt.lib" />
<Add library="D:\lib\libboost_system-mgw34-mt.lib" />
<Add library="D:\lib\libboost_thread-mgw34-mt.lib" />
<Add library="libkernel32.a" />
<Add library="libuser32.a" />
<Add library="libgdi32.a" />
<Add library="libwinspool.a" />
<Add library="libcomdlg32.a" />
<Add library="libadvapi32.a" />
<Add library="libshell32.a" />
<Add library="libavrdude.a" />
<Add library="C:\MinGW\msys\1.0\home\nils\libusb-win32-bin-1.2.6.0\lib\gcc\libusb.a" />
<Add library="libole32.a" />
<Add library="liboleaut32.a" />
<Add library="libuuid.a" />
<Add library="libcomctl32.a" />
<Add library="libwsock32.a" />
<Add library="libodbc32.a" />
<Add library="libhid.a" />
<Add library="libsetupapi.a" />
<Add library="stdc++" />
<Add library="libwxscintilla-3.0.a" />
<Add library="libwxregexu-3.0.a" />
<Add library="libwxexpat-3.0.a" />
<Add library="z" />
<Add directory="D:/libs/wxWidgets-3.0.2/lib" />
<Add directory="D:/MinGW/lib/gcc/mingw32/4.4.0" />
<Add directory="C:/MinGW/msys/1.0/home/nils/avrdude" />
<Add directory="D:/libs/libusb-win32-src-0.1.12.2" />
<Add directory="D:/libs/libusb-pbatard/msvc" />
</Linker>
<Unit filename="BobDudeApp.cpp" />
<Unit filename="BobDudeApp.h" />
<Unit filename="HTMLButton.cpp" />
<Unit filename="HTMLButton.h" />
<Unit filename="MainFrame.cpp" />
<Unit filename="MainFrame.h" />
<Unit filename="PlatformDialog.cpp" />
<Unit filename="PlatformDialog.h" />
<Unit filename="BobDudeApp.cpp" />
<Unit filename="BobDudeApp.h" />
<Unit filename="avrdude.cpp" />
<Unit filename="avrdude.h" />
<Unit filename="part.cpp" />
......
......@@ -24,7 +24,9 @@ MainFrame * frame;
extern MainFrame * frame;
void appendLogLine(const char * text) {
if (frame) {
frame->appendLogLine(text);
}
}
bool BobDudeApp::OnInit() {
......
......@@ -16,7 +16,7 @@
#include <wx/ipc.h>
#define VERSION_STR "1.1.1"
#define VERSION_STR "1.2.0"
#include "avrdude.h"
......
#include "MainFrame.h"
#include "BobDudeApp.h"
#include "xhex.h"
#include <wx/msw/registry.h>
#include <wx/config.h>
#include <wx/msgdlg.h>
#include <wx/icon.h>
#include <wx/filename.h>
......@@ -34,27 +34,30 @@ const long MainFrame::ID_MENUITEM_RESET_MCU = wxNewId();
wxGauge* progressBar;
std::string infoPrefix;
extern MainFrame * frame;
void doAvrdudeProgress(int percent, double etime) {
progressBar->SetValue(percent);
std::string text = infoPrefix;
text += " ";
text += boost::lexical_cast<std::string>(percent);
text += "% done";
if (frame) {
progressBar->SetValue(percent);
std::string text = infoPrefix;
text += " ";
text += boost::lexical_cast<std::string>(percent);
text += "% done";
// infoText->SetLabel(text.c_str());
// infoText->Update();
progressBar->Update();
progressBar->Update();
}
}
extern MainFrame * frame;
void doAvrdudeMessage(int type, const char * msg) {
if (frame) {
if (type>1){
return;
return;
}
wxString text(msg);
if (text.Trim().IsEmpty()) {
return;
return;
}
if (text.Contains("error")) {
text = wxString::Format("[%i]: <font color='#ee0000'>%s</font>", type, text);
......@@ -62,6 +65,7 @@ void doAvrdudeMessage(int type, const char * msg) {
text = wxString::Format("[%i]: <font color='#666666'>%s</font>", type, text);
}
frame->appendLogLine(text);
}
}
BEGIN_EVENT_TABLE(MainFrame,wxFrame)
......@@ -71,19 +75,10 @@ END_EVENT_TABLE()
MainFrame::MainFrame(wxWindow* parent,wxWindowID id) {
xhexfile = 0;
wxRegKey *pRegKey = new wxRegKey("HKEY_CURRENT_USER\\Software\\BobDude");
//will create the Key if it does not exist
if (!pRegKey->Exists()) {
pRegKey->Create();
}
wxConfig *config = new wxConfig("BobDude", wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
wxString strValue = "";
if (pRegKey->HasValue("lastFile")) {
pRegKey->QueryValue("lastFile", strValue);
}
delete pRegKey;
config->Read("lastFile", &strValue);
delete config;
//(*Initialize(MainFrame)
wxBoxSizer* BoxSizer4;
......@@ -486,13 +481,10 @@ void MainFrame::loadFile(const wxString& name) {
HtmlWindowFile->setHTML(getFileHTML());
updateGUI();
wxRegKey *pRegKey = new wxRegKey("HKEY_CURRENT_USER\\Software\\BobDude");
//will create the Key if it does not exist
if( !pRegKey->Exists() )
pRegKey->Create();
pRegKey->SetValue("lastFile", name);
delete pRegKey;
wxConfig *config = new wxConfig("BobDude", wxEmptyString, wxEmptyString, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
wxString strValue = "";
config->Write("lastFile", name);
delete config;
}
void MainFrame::appendLogLine(const wxString& text) {
......
This diff is collapsed.
......@@ -5,7 +5,12 @@
#include <stdarg.h>
extern "C" {
#if defined(__WINDOWS__)
#include "avrdude/libavrdude.h"
#else
#include "libavrdude.h"
#endif
/*
#include "avrdude/avrdude.h"
#include "avrdude/avr.h"
......
......@@ -2,7 +2,12 @@
extern "C" {
#if defined(__WINDOWS__)
#include "avrdude/libavrdude.h"
#else
#include "libavrdude.h"
#endif
/*
#include "avrdude/avrdude.h"
#include "avrdude/avr.h"
......
aaaa ICON "robodude.ico"
RobodudeLogo BITMAP "robotercc.bmp"
//RobodudeLogo BITMAP "robotercc.bmp"
//nicai BITMAP "logo_nicai_systems_klein.bmp"
#include "wx/msw/wx.rc"
1 VERSIONINFO
FILEVERSION 1,1,1,0
PRODUCTVERSION 1,1,1,0
FILEVERSION 1,2,0,0
PRODUCTVERSION 1,2,0,0
BEGIN
BLOCK "StringFileInfo"
BEGIN
......@@ -15,12 +15,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "nicai-systems\0"
VALUE "FileDescription", "Tool to program B-O-B-3\0"
VALUE "FileVersion", "1.1.1\0"
VALUE "FileVersion", "1.2.0\0"
VALUE "InternalName", "BobDude\0"
VALUE "LegalCopyright", "Licensed under GPL\0"
VALUE "OriginalFilename", "BobDude.exe\0"
VALUE "ProductName", "BobDude\0"
VALUE "ProductVersion", "1.1.1\0"
VALUE "ProductVersion", "1.2.0\0"
END
END
BLOCK "VarFileInfo"
......
......@@ -2,7 +2,11 @@
extern "C" {
#if defined(__WINDOWS__)
#include "avrdude/libavrdude.h"
#else
#include "libavrdude.h"
#endif
/*
#include "avrdude/avrdude.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment