summaryrefslogtreecommitdiffstats
path: root/heimdall-frontend
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/Alerts.cpp0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/Alerts.h0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/FirmwareInfo.cpp0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/FirmwareInfo.h0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/PackageData.cpp0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/PackageData.h0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/Packaging.cpp16
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/Source/Packaging.h10
-rw-r--r--heimdall-frontend/Source/mainwindow.cpp6
-rw-r--r--heimdall-frontend/doc-pak/LICENSE4
-rw-r--r--heimdall-frontend/doc-pak/README2
-rw-r--r--heimdall-frontend/heimdall-frontend.pri16
-rw-r--r--heimdall-frontend/heimdall-frontend.pro8
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/include/zconf.h0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/include/zlib.h0
-rw-r--r--[-rwxr-xr-x]heimdall-frontend/lib/win32/zlib.libbin239312 -> 239312 bytes
-rw-r--r--heimdall-frontend/mainwindow.ui118
17 files changed, 96 insertions, 84 deletions
diff --git a/heimdall-frontend/Source/Alerts.cpp b/heimdall-frontend/Source/Alerts.cpp
index e8e8752..e8e8752 100755..100644
--- a/heimdall-frontend/Source/Alerts.cpp
+++ b/heimdall-frontend/Source/Alerts.cpp
diff --git a/heimdall-frontend/Source/Alerts.h b/heimdall-frontend/Source/Alerts.h
index 95c2b75..95c2b75 100755..100644
--- a/heimdall-frontend/Source/Alerts.h
+++ b/heimdall-frontend/Source/Alerts.h
diff --git a/heimdall-frontend/Source/FirmwareInfo.cpp b/heimdall-frontend/Source/FirmwareInfo.cpp
index aee9313..aee9313 100755..100644
--- a/heimdall-frontend/Source/FirmwareInfo.cpp
+++ b/heimdall-frontend/Source/FirmwareInfo.cpp
diff --git a/heimdall-frontend/Source/FirmwareInfo.h b/heimdall-frontend/Source/FirmwareInfo.h
index 64c73cb..64c73cb 100755..100644
--- a/heimdall-frontend/Source/FirmwareInfo.h
+++ b/heimdall-frontend/Source/FirmwareInfo.h
diff --git a/heimdall-frontend/Source/PackageData.cpp b/heimdall-frontend/Source/PackageData.cpp
index ad25515..ad25515 100755..100644
--- a/heimdall-frontend/Source/PackageData.cpp
+++ b/heimdall-frontend/Source/PackageData.cpp
diff --git a/heimdall-frontend/Source/PackageData.h b/heimdall-frontend/Source/PackageData.h
index 2039a08..2039a08 100755..100644
--- a/heimdall-frontend/Source/PackageData.h
+++ b/heimdall-frontend/Source/PackageData.h
diff --git a/heimdall-frontend/Source/Packaging.cpp b/heimdall-frontend/Source/Packaging.cpp
index 8db5dff..fc41ba6 100755..100644
--- a/heimdall-frontend/Source/Packaging.cpp
+++ b/heimdall-frontend/Source/Packaging.cpp
@@ -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);
diff --git a/heimdall-frontend/Source/Packaging.h b/heimdall-frontend/Source/Packaging.h
index b02637a..402f786 100755..100644
--- a/heimdall-frontend/Source/Packaging.h
+++ b/heimdall-frontend/Source/Packaging.h
@@ -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
diff --git a/heimdall-frontend/Source/mainwindow.cpp b/heimdall-frontend/Source/mainwindow.cpp
index f5880f9..a777c77 100644
--- a/heimdall-frontend/Source/mainwindow.cpp
+++ b/heimdall-frontend/Source/mainwindow.cpp
@@ -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)
diff --git a/heimdall-frontend/doc-pak/LICENSE b/heimdall-frontend/doc-pak/LICENSE
index a18336e..78dc138 100644
--- a/heimdall-frontend/doc-pak/LICENSE
+++ b/heimdall-frontend/doc-pak/LICENSE
@@ -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. \ No newline at end of file
+THE SOFTWARE.
diff --git a/heimdall-frontend/doc-pak/README b/heimdall-frontend/doc-pak/README
index 2c7952f..27fba92 100644
--- a/heimdall-frontend/doc-pak/README
+++ b/heimdall-frontend/doc-pak/README
@@ -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:
diff --git a/heimdall-frontend/heimdall-frontend.pri b/heimdall-frontend/heimdall-frontend.pri
index 63cf202..67ec8c4 100644
--- a/heimdall-frontend/heimdall-frontend.pri
+++ b/heimdall-frontend/heimdall-frontend.pri
@@ -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
diff --git a/heimdall-frontend/heimdall-frontend.pro b/heimdall-frontend/heimdall-frontend.pro
index e784b56..cbb3359 100644
--- a/heimdall-frontend/heimdall-frontend.pro
+++ b/heimdall-frontend/heimdall-frontend.pro
@@ -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
diff --git a/heimdall-frontend/include/zconf.h b/heimdall-frontend/include/zconf.h
index 02ce56c..02ce56c 100755..100644
--- a/heimdall-frontend/include/zconf.h
+++ b/heimdall-frontend/include/zconf.h
diff --git a/heimdall-frontend/include/zlib.h b/heimdall-frontend/include/zlib.h
index bfbba83..bfbba83 100755..100644
--- a/heimdall-frontend/include/zlib.h
+++ b/heimdall-frontend/include/zlib.h
diff --git a/heimdall-frontend/lib/win32/zlib.lib b/heimdall-frontend/lib/win32/zlib.lib
index 9da4aeb..9da4aeb 100755..100644
--- a/heimdall-frontend/lib/win32/zlib.lib
+++ b/heimdall-frontend/lib/win32/zlib.lib
Binary files differ
diff --git a/heimdall-frontend/mainwindow.ui b/heimdall-frontend/mainwindow.ui
index 4ab96a9..510dd1d 100644
--- a/heimdall-frontend/mainwindow.ui
+++ b/heimdall-frontend/mainwindow.ui
@@ -120,9 +120,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>231</width>
- <height>301</height>
+ <height>291</height>
</rect>
</property>
</widget>
@@ -146,7 +146,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>131</width>
<height>21</height>
</rect>
@@ -230,7 +230,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>201</width>
<height>21</height>
</rect>
@@ -259,7 +259,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>391</width>
<height>21</height>
</rect>
@@ -275,7 +275,7 @@
<property name="geometry">
<rect>
<x>410</x>
- <y>20</y>
+ <y>30</y>
<width>71</width>
<height>23</height>
</rect>
@@ -304,7 +304,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>81</width>
<height>21</height>
</rect>
@@ -333,8 +333,8 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
- <width>311</width>
+ <y>30</y>
+ <width>281</width>
<height>21</height>
</rect>
</property>
@@ -349,7 +349,7 @@
<property name="geometry">
<rect>
<x>410</x>
- <y>20</y>
+ <y>30</y>
<width>71</width>
<height>23</height>
</rect>
@@ -364,9 +364,9 @@
</property>
<property name="geometry">
<rect>
- <x>330</x>
- <y>20</y>
- <width>71</width>
+ <x>300</x>
+ <y>30</y>
+ <width>101</width>
<height>23</height>
</rect>
</property>
@@ -400,9 +400,9 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>290</y>
+ <y>280</y>
<width>751</width>
- <height>161</height>
+ <height>171</height>
</rect>
</property>
<property name="title">
@@ -415,7 +415,7 @@
<property name="geometry">
<rect>
<x>320</x>
- <y>120</y>
+ <y>130</y>
<width>311</width>
<height>31</height>
</rect>
@@ -431,7 +431,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>731</width>
<height>91</height>
</rect>
@@ -450,7 +450,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>120</y>
+ <y>130</y>
<width>301</width>
<height>21</height>
</rect>
@@ -475,7 +475,7 @@
<property name="geometry">
<rect>
<x>640</x>
- <y>120</y>
+ <y>130</y>
<width>91</width>
<height>31</height>
</rect>
@@ -503,7 +503,7 @@
<x>10</x>
<y>20</y>
<width>381</width>
- <height>51</height>
+ <height>61</height>
</rect>
</property>
<property name="title">
@@ -516,7 +516,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>281</width>
<height>21</height>
</rect>
@@ -532,7 +532,7 @@
<property name="geometry">
<rect>
<x>300</x>
- <y>20</y>
+ <y>30</y>
<width>71</width>
<height>23</height>
</rect>
@@ -548,9 +548,9 @@
</property>
<property name="geometry">
<rect>
- <x>670</x>
+ <x>660</x>
<y>240</y>
- <width>71</width>
+ <width>81</width>
<height>23</height>
</rect>
</property>
@@ -577,7 +577,7 @@
<property name="geometry">
<rect>
<x>110</x>
- <y>20</y>
+ <y>30</y>
<width>261</width>
<height>22</height>
</rect>
@@ -587,7 +587,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>91</width>
<height>16</height>
</rect>
@@ -600,7 +600,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>50</y>
+ <y>60</y>
<width>91</width>
<height>16</height>
</rect>
@@ -661,7 +661,7 @@
<property name="geometry">
<rect>
<x>110</x>
- <y>50</y>
+ <y>60</y>
<width>261</width>
<height>21</height>
</rect>
@@ -679,7 +679,7 @@
<rect>
<x>400</x>
<y>240</y>
- <width>71</width>
+ <width>81</width>
<height>23</height>
</rect>
</property>
@@ -694,9 +694,9 @@
<property name="geometry">
<rect>
<x>400</x>
- <y>20</y>
+ <y>30</y>
<width>341</width>
- <height>211</height>
+ <height>201</height>
</rect>
</property>
</widget>
@@ -707,7 +707,7 @@
<property name="geometry">
<rect>
<x>150</x>
- <y>80</y>
+ <y>90</y>
<width>121</width>
<height>21</height>
</rect>
@@ -723,7 +723,7 @@
<property name="geometry">
<rect>
<x>20</x>
- <y>80</y>
+ <y>90</y>
<width>121</width>
<height>21</height>
</rect>
@@ -757,7 +757,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>471</width>
<height>151</height>
</rect>
@@ -770,7 +770,7 @@
<property name="geometry">
<rect>
<x>380</x>
- <y>180</y>
+ <y>190</y>
<width>101</width>
<height>23</height>
</rect>
@@ -785,7 +785,7 @@
<rect>
<x>240</x>
<y>10</y>
- <width>111</width>
+ <width>121</width>
<height>61</height>
</rect>
</property>
@@ -799,8 +799,8 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
- <width>91</width>
+ <y>30</y>
+ <width>101</width>
<height>21</height>
</rect>
</property>
@@ -812,7 +812,7 @@
<widget class="QGroupBox" name="createPlatformNameGroup">
<property name="geometry">
<rect>
- <x>490</x>
+ <x>480</x>
<y>10</y>
<width>151</width>
<height>61</height>
@@ -828,7 +828,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>131</width>
<height>21</height>
</rect>
@@ -857,7 +857,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>201</width>
<height>21</height>
</rect>
@@ -939,14 +939,14 @@
</property>
<property name="geometry">
<rect>
- <x>140</x>
+ <x>130</x>
<y>60</y>
- <width>91</width>
+ <width>101</width>
<height>23</height>
</rect>
</property>
<property name="text">
- <string>Add Developer</string>
+ <string>Add</string>
</property>
</widget>
</widget>
@@ -956,14 +956,14 @@
</property>
<property name="geometry">
<rect>
- <x>630</x>
+ <x>640</x>
<y>110</y>
- <width>111</width>
+ <width>101</width>
<height>23</height>
</rect>
</property>
<property name="text">
- <string>Remove Developer</string>
+ <string>Remove</string>
</property>
</widget>
<widget class="QGroupBox" name="createUrlsGroup">
@@ -1041,9 +1041,9 @@
<widget class="QGroupBox" name="createPlatformVersionGroup">
<property name="geometry">
<rect>
- <x>650</x>
+ <x>640</x>
<y>10</y>
- <width>111</width>
+ <width>121</width>
<height>61</height>
</rect>
</property>
@@ -1057,8 +1057,8 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
- <width>91</width>
+ <y>30</y>
+ <width>101</width>
<height>21</height>
</rect>
</property>
@@ -1083,7 +1083,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>50</y>
+ <y>60</y>
<width>91</width>
<height>16</height>
</rect>
@@ -1099,7 +1099,7 @@
<property name="geometry">
<rect>
<x>110</x>
- <y>50</y>
+ <y>60</y>
<width>151</width>
<height>21</height>
</rect>
@@ -1112,7 +1112,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>20</y>
+ <y>30</y>
<width>91</width>
<height>16</height>
</rect>
@@ -1128,7 +1128,7 @@
<property name="geometry">
<rect>
<x>110</x>
- <y>20</y>
+ <y>30</y>
<width>151</width>
<height>21</height>
</rect>
@@ -1141,7 +1141,7 @@
<property name="geometry">
<rect>
<x>10</x>
- <y>80</y>
+ <y>90</y>
<width>91</width>
<height>16</height>
</rect>
@@ -1157,7 +1157,7 @@
<property name="geometry">
<rect>
<x>110</x>
- <y>80</y>
+ <y>90</y>
<width>151</width>
<height>21</height>
</rect>
@@ -1173,7 +1173,7 @@
<property name="geometry">
<rect>
<x>160</x>
- <y>110</y>
+ <y>120</y>
<width>101</width>
<height>23</height>
</rect>
@@ -1190,7 +1190,7 @@
<property name="geometry">
<rect>
<x>580</x>
- <y>410</y>
+ <y>420</y>
<width>121</width>
<height>31</height>
</rect>