Permalink
Browse files

Version 1.3 (beta)

  • Loading branch information...
Benjamin Dobell
Benjamin Dobell committed Jul 9, 2011
1 parent 70c1e8e commit bf17bbf5736e4774b1ac8e18698bc2fcf6ff9a1e
Showing with 85,896 additions and 151 deletions.
  1. 0 OSX/install-kext.sh
  2. BIN Win32/Drivers/zadig.exe
  3. 0 heimdall-frontend/Source/Alerts.cpp
  4. 0 heimdall-frontend/Source/Alerts.h
  5. 0 heimdall-frontend/Source/FirmwareInfo.cpp
  6. 0 heimdall-frontend/Source/FirmwareInfo.h
  7. 0 heimdall-frontend/Source/PackageData.cpp
  8. 0 heimdall-frontend/Source/PackageData.h
  9. +9 −7 heimdall-frontend/Source/Packaging.cpp
  10. +5 −5 heimdall-frontend/Source/Packaging.h
  11. +4 −2 heimdall-frontend/Source/mainwindow.cpp
  12. +2 −2 heimdall-frontend/doc-pak/LICENSE
  13. +1 −1 heimdall-frontend/doc-pak/README
  14. +10 −6 heimdall-frontend/heimdall-frontend.pri
  15. +6 −2 heimdall-frontend/heimdall-frontend.pro
  16. 0 heimdall-frontend/include/zconf.h
  17. 0 heimdall-frontend/include/zlib.h
  18. BIN heimdall-frontend/lib/win32/zlib.lib
  19. +59 −59 heimdall-frontend/mainwindow.ui
  20. +2 −2 heimdall/LICENSE
  21. +8 −9 heimdall/Makefile.am
  22. +14 −20 heimdall/Makefile.in
  23. 0 heimdall/autogen.sh
  24. +10 −10 heimdall/autom4te.cache/output.0
  25. +10 −10 heimdall/autom4te.cache/output.1
  26. +1 −1 heimdall/autom4te.cache/traces.1
  27. 0 heimdall/config.guess
  28. 0 heimdall/config.sub
  29. +10 −10 heimdall/configure
  30. +1 −1 heimdall/configure.ac
  31. 0 heimdall/depcomp
  32. +2 −2 heimdall/doc-pak/LICENSE
  33. +1 −1 heimdall/doc-pak/README
  34. 0 heimdall/install-sh
  35. 0 heimdall/ltmain.sh
  36. 0 heimdall/missing
  37. 0 heimdall/postinstall-pak
  38. 0 heimdall/postremove-pak
  39. +0 −1 heimdall/source/main.cpp
  40. +10 −0 libpit/Makefile.am
  41. +722 −0 libpit/Makefile.in
  42. 0 libpit/Source/libpit.cpp
  43. +4 −0 libpit/Source/libpit.h
  44. +8,957 −0 libpit/aclocal.m4
  45. +3 −0 libpit/autogen.sh
  46. +17,167 −0 libpit/autom4te.cache/output.0
  47. +17,163 −0 libpit/autom4te.cache/output.1
  48. +275 −0 libpit/autom4te.cache/requests
  49. +2,406 −0 libpit/autom4te.cache/traces.0
  50. +613 −0 libpit/autom4te.cache/traces.1
  51. +1,502 −0 libpit/config.guess
  52. +80 −0 libpit/config.h.in
  53. +1,714 −0 libpit/config.sub
  54. +17,163 −0 libpit/configure
  55. +40 −0 libpit/configure.ac
  56. +630 −0 libpit/depcomp
  57. +520 −0 libpit/install-sh
  58. 0 libpit/libpit.vcxproj
  59. 0 libpit/libpit.vcxproj.filters
  60. +8,413 −0 libpit/ltmain.sh
  61. +7,377 −0 libpit/m4/libtool.m4
  62. +368 −0 libpit/m4/ltoptions.m4
  63. +123 −0 libpit/m4/ltsugar.m4
  64. +23 −0 libpit/m4/ltversion.m4
  65. +92 −0 libpit/m4/lt~obsolete.m4
  66. +376 −0 libpit/missing
  67. 0 libusb-1.0/.gitattributes
  68. 0 libusb-1.0/_testing.test
  69. 0 libusb-1.0/autogen.sh
  70. 0 libusb-1.0/configure
  71. 0 libusb-1.0/install-sh
  72. 0 libusb-1.0/libusb/libusb_version.h
  73. 0 libusb-1.0/ltmain.sh
  74. 0 libusb-1.0/ltmain.sh.orig
View
0 OSX/install-kext.sh 100755 → 100644
No changes.
View
0 Win32/Drivers/zadig.exe 100755 → 100644
No changes.
View
No changes.
View
0 heimdall-frontend/Source/Alerts.h 100755 → 100644
No changes.
View
No changes.
View
No changes.
View
No changes.
View
No changes.
View
@@ -39,6 +39,7 @@
using namespace HeimdallFrontend;
+const qint64 Packaging::kMaxFileSize = 8589934592ll;
const char *Packaging::ustarMagic = "ustar";
bool Packaging::ExtractTar(QTemporaryFile& tarFile, PackageData *packageData)
@@ -81,7 +82,7 @@ bool Packaging::ExtractTar(QTemporaryFile& tarFile, PackageData *packageData)
return (false);
}
- bool ustarFormat = strcmp(tarHeader.fields.magic, ustarMagic) == 0;
+ //bool ustarFormat = strcmp(tarHeader.fields.magic, ustarMagic) == 0;
bool empty = true;
for (int i = 0; i < TarHeader::kBlockLength; i++)
@@ -233,7 +234,7 @@ bool Packaging::WriteTarEntry(const QString& filename, QTemporaryFile *tarFile,
return (false);
}
- if (file.size() > TarHeader::kMaxFileSize)
+ if (file.size() > Packaging::kMaxFileSize)
{
Alerts::DisplayError(QString("File is too large to be packaged:\n%1").arg(file.fileName()));
return (false);
@@ -306,8 +307,8 @@ bool Packaging::WriteTarEntry(const QString& filename, QTemporaryFile *tarFile,
sprintf(tarHeader.fields.groupId, "%07o", 0);
// Note: We don't support base-256 encoding. Support could be added later.
- sprintf(tarHeader.fields.size, "%011o", file.size());
- sprintf(tarHeader.fields.modifiedTime, "%011o", qtFileInfo.lastModified().toMSecsSinceEpoch() / 1000);
+ sprintf(tarHeader.fields.size, "%011llo", file.size());
+ sprintf(tarHeader.fields.modifiedTime, "%011llo", qtFileInfo.lastModified().toMSecsSinceEpoch() / 1000);
// Regular File
tarHeader.fields.typeFlag = '0';
@@ -373,7 +374,8 @@ bool Packaging::CreateTar(const FirmwareInfo& firmwareInfo, QTemporaryFile *tarF
return (false);
}
- firmwareInfo.WriteXml(QXmlStreamWriter(&firmwareXmlFile));
+ QXmlStreamWriter xml(&firmwareXmlFile);
+ firmwareInfo.WriteXml(xml);
firmwareXmlFile.close();
if (!tarFile->open())
@@ -456,7 +458,7 @@ bool Packaging::ExtractPackage(const QString& packagePath, PackageData *packageD
{
FILE *compressedPackageFile = fopen(packagePath.toStdString().c_str(), "rb");
- if (fopen == NULL)
+ if (!compressedPackageFile)
{
Alerts::DisplayError(QString("Failed to open package:\n%1").arg(packagePath));
return (false);
@@ -547,7 +549,7 @@ bool Packaging::BuildPackage(const QString& packagePath, const FirmwareInfo& fir
{
FILE *compressedPackageFile = fopen(packagePath.toStdString().c_str(), "wb");
- if (fopen == NULL)
+ if (!compressedPackageFile)
{
Alerts::DisplayError(QString("Failed to create package:\n%1").arg(packagePath));
return (false);
View
@@ -43,11 +43,6 @@ namespace HeimdallFrontend
kUstarHeaderLength = 500,
};
- enum : quint64
- {
- kMaxFileSize = 8589934592
- };
-
enum
{
kModeOtherExecute = 1,
@@ -92,6 +87,11 @@ namespace HeimdallFrontend
class Packaging
{
+ public:
+
+ // Would definitely prefer to use an enum but VC++ and GCC give conflicting warnings about C++0x or type overflow.
+ static const qint64 kMaxFileSize;
+
private:
enum
@@ -343,12 +343,14 @@ void MainWindow::SelectFirmwarePackage(void)
void MainWindow::OpenDeveloperHomepage(void)
{
- QDesktopServices::openUrl(QUrl(loadedPackageData.GetFirmwareInfo().GetUrl(), QUrl::TolerantMode));
+ if(!QDesktopServices::openUrl(QUrl(loadedPackageData.GetFirmwareInfo().GetUrl(), QUrl::TolerantMode)))
+ Alerts::DisplayWarning(QString("Cannot open invalid URL:\n%1").arg(loadedPackageData.GetFirmwareInfo().GetUrl()));
}
void MainWindow::OpenDeveloperDonationWebpage(void)
{
- QDesktopServices::openUrl(QUrl(loadedPackageData.GetFirmwareInfo().GetDonateUrl(), QUrl::TolerantMode));
+ if (!QDesktopServices::openUrl(QUrl(loadedPackageData.GetFirmwareInfo().GetDonateUrl(), QUrl::TolerantMode)))
+ Alerts::DisplayWarning(QString("Cannot open invalid URL:\n%1").arg(loadedPackageData.GetFirmwareInfo().GetDonateUrl()));
}
void MainWindow::LoadFirmwarePackage(void)
@@ -1,4 +1,4 @@
-Copyright (c) 2010 Benjamin Dobell, Glass Echidna
+Copyright (c) 2010-2011 Benjamin Dobell, Glass Echidna
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
+THE SOFTWARE.
@@ -1,4 +1,4 @@
-Heimdall (c) 2010 Benjamin Dobell, Glass Echidna
+Heimdall (c) 2010-2011 Benjamin Dobell, Glass Echidna
http://www.glassechidna.com.au/products/heimdall/
DISCLAIMER:
@@ -1,12 +1,16 @@
-# ----------------------------------------------------
-# This file is generated by the Qt Visual Studio Add-in.
-# ------------------------------------------------------
-
HEADERS += ./Source/aboutform.h \
- ./Source/mainwindow.h
+ ./Source/Alerts.h \
+ ./Source/FirmwareInfo.h \
+ ./Source/mainwindow.h \
+ ./Source/PackageData.h \
+ ./Source/Packaging.h
SOURCES += ./Source/aboutform.cpp \
+ ./Source/Alerts.cpp \
+ ./Source/FirmwareInfo.cpp \
./Source/main.cpp \
- ./Source/mainwindow.cpp
+ ./Source/mainwindow.cpp \
+ ./Source/PackageData.cpp \
+ ./Source/Packaging.cpp
FORMS += ./mainwindow.ui \
./aboutform.ui
RESOURCES += mainwindow.qrc
@@ -7,7 +7,7 @@ TARGET = heimdall-frontend
macx {
PRIVATE_FRAMEWORKS.files = /Library/Frameworks/QtCore.framework \
- /Library/Frameworks/QtGui.framework
+ /Library/Frameworks/QtGui.framework /Library/Frameworks/QtXml.framework
PRIVATE_FRAMEWORKS.path = Contents/Frameworks
QMAKE_BUNDLE_DATA += PRIVATE_FRAMEWORKS
@@ -44,11 +44,15 @@ macx {
}
}
-QT += core gui
+unix:LIBS += -lz ../libpit/libpit-1.3.a
+win32:LIBS += ../Win32/Release/lib/libpit.lib
+
+QT += core gui xml
CONFIG += release
DEFINES += QT_LARGEFILE_SUPPORT
INCLUDEPATH += ./GeneratedFiles \
./GeneratedFiles/Release \
+ ../libpit/Source \
.
DEPENDPATH += .
MOC_DIR += ./GeneratedFiles/release
View
0 heimdall-frontend/include/zconf.h 100755 → 100644
No changes.
View
0 heimdall-frontend/include/zlib.h 100755 → 100644
No changes.
View
No changes.
Oops, something went wrong.

0 comments on commit bf17bbf

Please sign in to comment.