Compare commits
143 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
02b577ec77 | |
![]() |
14f3521a6b | |
![]() |
0cf817a591 | |
![]() |
c3516307d2 | |
![]() |
f6c4698c8b | |
![]() |
d81e0f5bc2 | |
![]() |
62368adc7d | |
![]() |
0f1843c93c | |
![]() |
172ab65cbe | |
![]() |
1e7ff3b659 | |
![]() |
e916c679ed | |
![]() |
e9a68f6862 | |
![]() |
990ce68f5c | |
![]() |
c939ab18d1 | |
![]() |
1385b183d2 | |
![]() |
95e5c1cdcb | |
![]() |
622067f284 | |
![]() |
9b0e9ff174 | |
![]() |
225164f87e | |
![]() |
91802883a0 | |
![]() |
40be58b43e | |
![]() |
60ab9bbaff | |
![]() |
e51c9119f1 | |
![]() |
31745c287a | |
![]() |
cedfcd8c80 | |
![]() |
6441c6a6c5 | |
![]() |
af87b7b7e4 | |
![]() |
761c2db4d2 | |
![]() |
719edaff9e | |
![]() |
f0594beaf6 | |
![]() |
2ecc98020c | |
![]() |
6317e88503 | |
![]() |
74c498d61e | |
![]() |
f3bdacf03d | |
![]() |
53466cbd51 | |
![]() |
df83a4b010 | |
![]() |
64bd479db6 | |
![]() |
4fadfe9c5d | |
![]() |
82f7241133 | |
![]() |
07a14d4aa8 | |
![]() |
6d17eb5178 | |
![]() |
54d58b8244 | |
![]() |
6ede1f1f33 | |
![]() |
af3f0d6ac9 | |
![]() |
ccafa21e64 | |
![]() |
220f90a4fe | |
![]() |
094f715c4d | |
![]() |
9bff064d40 | |
![]() |
92ea948323 | |
![]() |
c87f5bf210 | |
![]() |
bfe1a68512 | |
![]() |
f6b618c435 | |
![]() |
a2cfdaa5ed | |
![]() |
af5b574042 | |
![]() |
5377b6286c | |
![]() |
4a9259b477 | |
![]() |
9bcc42da35 | |
![]() |
cc44b3497d | |
![]() |
3b4f34e2a9 | |
![]() |
699549e3c6 | |
![]() |
663bb80f22 | |
![]() |
bf891c9366 | |
![]() |
8709370bc4 | |
![]() |
5b90f09625 | |
![]() |
aa40b07450 | |
![]() |
259f5f8973 | |
![]() |
b6fe7f8535 | |
![]() |
9784dd2e2a | |
![]() |
d2e2f76556 | |
![]() |
7ebee1e877 | |
![]() |
e8a77e6686 | |
![]() |
86b7be8329 | |
![]() |
05d4c747a9 | |
![]() |
2bab8d9473 | |
![]() |
34c4636ee0 | |
![]() |
46c4f8be14 | |
![]() |
6d7d35fa76 | |
![]() |
a813fee3a0 | |
![]() |
a59a290e23 | |
![]() |
8e45fd81c9 | |
![]() |
4be0c30302 | |
![]() |
f789e25d85 | |
![]() |
d0526a3b74 | |
![]() |
8cb7f3dd87 | |
![]() |
2ad53a5100 | |
![]() |
b75bdcbc52 | |
![]() |
d3335dec58 | |
![]() |
fae5f627a0 | |
![]() |
e98281afb7 | |
![]() |
b5f771346e | |
![]() |
30f1968ff3 | |
![]() |
625fdf2736 | |
![]() |
e2f0470faf | |
![]() |
df988075c7 | |
![]() |
67c17cc48b | |
![]() |
b22ae7b89f | |
![]() |
39b48f2357 | |
![]() |
09ba183922 | |
![]() |
69c3aafd81 | |
![]() |
b9e722768f | |
![]() |
ee53613ec1 | |
![]() |
1ddfdc1a88 | |
![]() |
d613a87cdb | |
![]() |
fbebc394f4 | |
![]() |
082fb091f1 | |
![]() |
46d9a51e18 | |
![]() |
7d6ddcd5d5 | |
![]() |
7e29d7ef9a | |
![]() |
cadb167e0c | |
![]() |
900161750e | |
![]() |
d1a7f8d693 | |
![]() |
fd23c07ef5 | |
![]() |
fc0d542bc2 | |
![]() |
bd9b2bdee6 | |
![]() |
b62d66b297 | |
![]() |
ac8fd8500f | |
![]() |
ba8600a6c3 | |
![]() |
abea6dbbe0 | |
![]() |
e6fdafd482 | |
![]() |
150e3344de | |
![]() |
e28d6c0768 | |
![]() |
b518fdc9f6 | |
![]() |
d5cd49b73c | |
![]() |
ce486f7ecb | |
![]() |
9b56396ba1 | |
![]() |
9f957a1937 | |
![]() |
32383b994d | |
![]() |
7d0d608473 | |
![]() |
ca6db9a647 | |
![]() |
a5452e884a | |
![]() |
0767cff624 | |
![]() |
3dae56a596 | |
![]() |
1e345bcd7c | |
![]() |
a934ad2608 | |
![]() |
3af0c3ad63 | |
![]() |
4435da4a8a | |
![]() |
f7d8c18636 | |
![]() |
0624b2fb3b | |
![]() |
3277922cb6 | |
![]() |
cdd53cdb9b | |
![]() |
5cd4141c98 | |
![]() |
f95619028f | |
![]() |
e9311908a0 |
Linux
OSX
heimdall.kext/Contents
Win32
Drivers
heimdall-frontend
lib/win32
heimdall
source
|
@ -0,0 +1,24 @@
|
|||
image: alpine/edge
|
||||
|
||||
sources:
|
||||
- https://git.sr.ht/~grimler/Heimdall
|
||||
|
||||
artifacts:
|
||||
- Heimdall/build/bin/heimdall
|
||||
- Heimdall/build/bin/heimdall-frontend
|
||||
|
||||
packages:
|
||||
- make
|
||||
- cmake
|
||||
- gcc
|
||||
- g++
|
||||
- libc-dev
|
||||
- qt5-qtbase-dev
|
||||
- libusb-dev
|
||||
|
||||
tasks:
|
||||
- build: |
|
||||
cd Heimdall
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j8
|
|
@ -0,0 +1,20 @@
|
|||
image: archlinux
|
||||
|
||||
sources:
|
||||
- https://git.sr.ht/~grimler/Heimdall
|
||||
|
||||
artifacts:
|
||||
- Heimdall/build/bin/heimdall
|
||||
- Heimdall/build/bin/heimdall-frontend
|
||||
|
||||
packages:
|
||||
- cmake
|
||||
- libusb
|
||||
- qt5-base
|
||||
|
||||
tasks:
|
||||
- build: |
|
||||
cd Heimdall
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j8
|
|
@ -0,0 +1,23 @@
|
|||
image: ubuntu/lts
|
||||
|
||||
sources:
|
||||
- https://git.sr.ht/~grimler/Heimdall
|
||||
|
||||
artifacts:
|
||||
- Heimdall/build/bin/heimdall
|
||||
- Heimdall/build/bin/heimdall-frontend
|
||||
|
||||
packages:
|
||||
- cmake
|
||||
- g++
|
||||
- pkg-config
|
||||
- libusb-1.0-0-dev
|
||||
- qtbase5-dev
|
||||
- zlib1g-dev
|
||||
|
||||
tasks:
|
||||
- build: |
|
||||
cd Heimdall
|
||||
mkdir build && cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j8
|
|
@ -1,10 +1,5 @@
|
|||
.DS_Store
|
||||
._*
|
||||
Debug/
|
||||
Release/
|
||||
GeneratedFiles/
|
||||
autom4te.cache/
|
||||
*.vcxproj.user
|
||||
*.suo
|
||||
*.sdf
|
||||
*.opensdf
|
||||
.idea/
|
||||
/build/
|
||||
*~
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
cmake_minimum_required(VERSION 3.0.0)
|
||||
|
||||
set(CMAKE_MODULE_PATH
|
||||
${CMAKE_SOURCE_DIR}/cmake
|
||||
${CMAKE_MODULE_PATH})
|
||||
|
||||
project(Heimdall)
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
option(DISABLE_FRONTEND "Disable GUI frontend" OFF)
|
||||
|
||||
add_subdirectory(libpit)
|
||||
add_subdirectory(heimdall)
|
||||
if(NOT DISABLE_FRONTEND)
|
||||
add_subdirectory(heimdall-frontend)
|
||||
add_dependencies(heimdall-frontend heimdall)
|
||||
endif()
|
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
Copyright (c) 2010-2017 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
|
||||
|
|
70
Linux/README
70
Linux/README
|
@ -1,5 +1,5 @@
|
|||
Heimdall (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
http://www.glassechidna.com.au/products/heimdall/
|
||||
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
|
||||
https://www.glassechidna.com.au/products/heimdall/
|
||||
|
||||
DISCLAIMER:
|
||||
|
||||
|
@ -147,7 +147,7 @@ Performing a Custom Flash with Heimdall Frontend:
|
|||
clicking the "Remove" button. Removing a partition from the list doesn't
|
||||
remove it from your device, it simply means it will not be flashed.
|
||||
|
||||
10. Repeat steps 7-9 as often as needed to specify all the partions/files
|
||||
10. Repeat steps 7-9 as often as needed to specify all the partitions/files
|
||||
that you wish to flash.
|
||||
|
||||
11. Now you can chose whether you would like to repartition your device as
|
||||
|
@ -289,8 +289,8 @@ How to Create a Heimdall Firmware Package:
|
|||
Homepage - Here you can enter your personal URL or a URL particularly
|
||||
pertaining to the firmware being packaged. The URL must be well
|
||||
formed for it to work. An example of a well formed URL is
|
||||
"http://www.glassechidna.com.au/products/heimdall/". It is
|
||||
important to include "http://" in order to specify the protocol as
|
||||
"https://www.glassechidna.com.au/products/heimdall/". It is
|
||||
important to include "https://" in order to specify the protocol as
|
||||
other protocols such as "ftp://" are equally valid although
|
||||
unlikely to be used.
|
||||
|
||||
|
@ -298,8 +298,8 @@ How to Create a Heimdall Firmware Package:
|
|||
make donations for the effort you've put into developing your
|
||||
firmware. Once again the URL must be well formed but there is no
|
||||
requirement on how your donation page should work. For instance
|
||||
both "http://www.glassechidna.com.au/donate/" and
|
||||
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
|
||||
both "https://www.glassechidna.com.au/donate/" and
|
||||
"https://forum.xda-developers.com/donatetome.php?u=2710388" are
|
||||
equally valid.
|
||||
|
||||
Developer Info:
|
||||
|
@ -391,8 +391,8 @@ Nonetheless the following is an example of a valid firmware.xml file.
|
|||
<name>Benjamin Dobell</name>
|
||||
<name>Hedonism Bot</name>
|
||||
</developers>
|
||||
<url>http://www.glassechidna.com.au/</url>
|
||||
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
|
||||
<url>https://www.glassechidna.com.au/</url>
|
||||
<donateurl>https://www.glassechidna.com.au/donate/</donateurl>
|
||||
<devices>
|
||||
<device>
|
||||
<manufacturer>Samsung</manufacturer>
|
||||
|
@ -472,57 +472,21 @@ be included.
|
|||
|
||||
|
||||
|
||||
Appendix B - Installing Heimdall from Source:
|
||||
Appendix B - Installing Heimdall Suite from Source:
|
||||
|
||||
1. First make sure you have installed build-tools, pkgconfig, zlib-dev and
|
||||
libusbx.
|
||||
1. First make sure you have installed build-essential, cmake, zlib1g-dev,
|
||||
qt5-default, libusb-1.0-0-dev and OpenGL (e.g libgl1-mesa-glx and
|
||||
libgl1-mesa-dev).
|
||||
|
||||
NOTE: Package names may not be absolutely identical to those above.
|
||||
|
||||
2. Open a terminal and navigate to the directory you downloaded,
|
||||
or extracted, Heimdall to.
|
||||
|
||||
3. Enter the following commands to compile libpit:
|
||||
3. Enter the following commands to compile Heimdall Suite:
|
||||
|
||||
cd libpit
|
||||
./configure
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
cd ..
|
||||
|
||||
NOTE: There is no need to run "sudo make install".
|
||||
|
||||
4. Enter the following commands to compile and install Heimdall:
|
||||
|
||||
cd heimdall
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
5. Done
|
||||
|
||||
|
||||
|
||||
Appendix C - Installing Heimdall Frontend from Source:
|
||||
|
||||
1. Compile and install Heimdall, see Appendix B.
|
||||
|
||||
2. First make sure you have installed Qt (4.7 or later, but prior to 5.0).
|
||||
You can typically install Qt through your platforms package manager, or
|
||||
alternatively download it from:
|
||||
|
||||
http://qt-project.org/downloads
|
||||
|
||||
3. Open a terminal and navigate to the directory you extracted Heimdall to.
|
||||
|
||||
4. Enter the following commands to compile and install Heimdall Frontend:
|
||||
|
||||
cd heimdall-frontend
|
||||
qmake-qt4
|
||||
make
|
||||
sudo make install
|
||||
|
||||
NOTE: If qmake-qt4 does not exist on your platform, try qmake instead.
|
||||
|
||||
5. Done
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
Heimdall (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
http://www.glassechidna.com.au/products/heimdall/
|
||||
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
|
||||
https://www.glassechidna.com.au/products/heimdall/
|
||||
|
||||
DISCLAIMER:
|
||||
|
||||
|
@ -151,7 +151,7 @@ Performing a Custom Flash with Heimdall Frontend:
|
|||
clicking the "Remove" button. Removing a partition from the list doesn't
|
||||
remove it from your device, it simply means it will not be flashed.
|
||||
|
||||
10. Repeat steps 7-9 as often as needed to specify all the partions/files
|
||||
10. Repeat steps 7-9 as often as needed to specify all the partitions/files
|
||||
that you wish to flash.
|
||||
|
||||
11. Now you can chose whether you would like to repartition your device as
|
||||
|
@ -295,8 +295,8 @@ How to Create a Heimdall Firmware Package:
|
|||
Homepage - Here you can enter your personal URL or a URL particularly
|
||||
pertaining to the firmware being packaged. The URL must be well
|
||||
formed for it to work. An example of a well formed URL is
|
||||
"http://www.glassechidna.com.au/products/heimdall/". It is
|
||||
important to include "http://" in order to specify the protocol as
|
||||
"https://www.glassechidna.com.au/products/heimdall/". It is
|
||||
important to include "https://" in order to specify the protocol as
|
||||
other protocols such as "ftp://" are equally valid although
|
||||
unlikely to be used.
|
||||
|
||||
|
@ -304,8 +304,8 @@ How to Create a Heimdall Firmware Package:
|
|||
make donations for the effort you've put into developing your
|
||||
firmware. Once again the URL must be well formed but there is no
|
||||
requirement on how your donation page should work. For instance
|
||||
both "http://www.glassechidna.com.au/donate/" and
|
||||
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
|
||||
both "https://www.glassechidna.com.au/donate/" and
|
||||
"https://forum.xda-developers.com/donatetome.php?u=2710388" are
|
||||
equally valid.
|
||||
|
||||
Developer Info:
|
||||
|
@ -396,8 +396,8 @@ Nonetheless the following is an example of a valid firmware.xml file.
|
|||
<name>Benjamin Dobell</name>
|
||||
<name>Hedonism Bot</name>
|
||||
</developers>
|
||||
<url>http://www.glassechidna.com.au/</url>
|
||||
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
|
||||
<url>https://www.glassechidna.com.au/</url>
|
||||
<donateurl>https://www.glassechidna.com.au/donate/</donateurl>
|
||||
<devices>
|
||||
<device>
|
||||
<manufacturer>Samsung</manufacturer>
|
||||
|
@ -477,79 +477,15 @@ be included.
|
|||
|
||||
|
||||
|
||||
Appendix B - Installing Heimdall from Source:
|
||||
Appendix B - Installing Heimdall Suite from Source
|
||||
|
||||
PREREQUISITES:
|
||||
|
||||
Heimdall requires C++11 (aka C++0x) functionality in order to compile.
|
||||
Unfortunately, XCode includes an old version of GCC which does not
|
||||
include support for C++11. XCode does include clang, which does
|
||||
support C++11. However, clang's C++11 can only target OS X 10.7 or
|
||||
newer. There are also slight compatibility issues between clang and
|
||||
Qt, which is required in order to compile Heimdall Frontend. As such
|
||||
these instructions will utilise GCC 4.7 installed via Homebrew.
|
||||
|
||||
Xcode can be downloaded through the App store or from Apple's
|
||||
developer website:
|
||||
|
||||
https://developer.apple.com/xcode/
|
||||
|
||||
Homebrew install instructions are available at:
|
||||
|
||||
http://mxcl.github.io/homebrew/
|
||||
|
||||
1. First make sure you have installed XCode and Homebrew (see above). Then
|
||||
open a terminal and install GCC 4.7, pkgconfig and libusbx via Homebrew:
|
||||
|
||||
brew tap homebrew/versions
|
||||
brew install gcc47 pkgconfig libusbx
|
||||
|
||||
NOTE: Installing GCC 4.7 will take a long time.
|
||||
1. Open Terminal and install dependencies using Homebrew (https://brew.sh)
|
||||
|
||||
2. In a terminal navigate to the directory you downloaded (or extracted)
|
||||
Heimdall to.
|
||||
brew install libusb qt5 cmake
|
||||
|
||||
3. Enter the following commands to compile libpit.
|
||||
2. Build Heimdall & Heimdall Frontend
|
||||
|
||||
cd libpit
|
||||
./configure CC=gcc-4.7 CXX=g++-4.7
|
||||
make
|
||||
cd ..
|
||||
|
||||
NOTE: There is no need to run "sudo make install".
|
||||
|
||||
4. Enter the following commands to compile and install Heimdall:
|
||||
|
||||
cd heimdall
|
||||
./configure CC=gcc-4.7 CXX=g++-4.7
|
||||
make
|
||||
sudo make install
|
||||
cd ..
|
||||
|
||||
5. If you haven't installed the driver before, do the following:
|
||||
|
||||
cd OSX
|
||||
sudo ./install-kext.sh
|
||||
|
||||
6. Done
|
||||
|
||||
|
||||
|
||||
Appendix C - Installing Heimdall Frontend from Source:
|
||||
|
||||
1. Compile and install Heimdall, see Appendix B.
|
||||
|
||||
2. Heimdall Frontend requires Qt (4.7 or later, but prior to 5.0), available
|
||||
from:
|
||||
|
||||
http://qt-project.org/downloads
|
||||
|
||||
3. Open a terminal and navigate to the directory you extracted Heimdall to.
|
||||
|
||||
4. Enter the following commands to compile and install Heimdall Frontend:
|
||||
|
||||
cd heimdall-frontend
|
||||
qmake -spec macx-g++ QMAKE_CC=gcc-4.7 QMAKE_CXX=g++-4.7
|
||||
make
|
||||
|
||||
5. Done
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/usr/local/opt/qt5/lib/cmake/Qt5Widgets ..
|
||||
make
|
||||
|
|
|
@ -3,38 +3,44 @@
|
|||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key> <string>English</string>
|
||||
<key>CFBundleGetInfoString</key> <string>Galaxy S Download Mode (Heimdall)</string>
|
||||
<key>CFBundleIdentifier</key> <string>au.com.glassechidna.heimdall_usb_shield</string>
|
||||
<key>CFBundleGetInfoString</key> <string>Heimdall Download Mode</string>
|
||||
<key>CFBundleIdentifier</key> <string>au.com.glassechidna.heimdall.usb_shield</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key> <string>6.0</string>
|
||||
<key>CFBundleName</key> <string>Galaxy S Download Mode (Heimdall)</string>
|
||||
<key>CFBundleName</key> <string>Heimdall Download Mode</string>
|
||||
<key>CFBundlePackageType</key> <string>KEXT</string>
|
||||
<key>CFBundleSignature</key> <string>????</string>
|
||||
<key>CFBundleVersion</key> <string>6.0</string>
|
||||
<key>IOKitPersonalities</key>
|
||||
<dict>
|
||||
<key>GalaxyS</key>
|
||||
<key>0x6001</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key> <string>com.apple.driver.AppleUSBComposite</string>
|
||||
<key>IOClass</key> <string>AppleUSBComposite</string>
|
||||
<key>IOProbeScore</key> <integer>300000</integer>
|
||||
<key>IOProviderClass</key> <string>IOUSBDevice</string>
|
||||
<key>idVendor</key> <integer>1256</integer>
|
||||
<key>idProduct</key> <integer>26113</integer>
|
||||
<key>bcdDevice</key> <integer>256</integer>
|
||||
</dict>
|
||||
<key>GalaxyS2</key>
|
||||
<key>0x685D</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key> <string>com.apple.driver.AppleUSBComposite</string>
|
||||
<key>IOClass</key> <string>AppleUSBComposite</string>
|
||||
<key>IOProbeScore</key> <integer>300000</integer>
|
||||
<key>IOProviderClass</key> <string>IOUSBDevice</string>
|
||||
<key>idVendor</key> <integer>1256</integer>
|
||||
<key>idProduct</key> <integer>26717</integer>
|
||||
<key>bcdDevice</key> <integer>256</integer>
|
||||
</dict>
|
||||
<key>DroidCharge</key>
|
||||
<key>0x68C3</key>
|
||||
<dict>
|
||||
<key>CFBundleIdentifier</key> <string>com.apple.driver.AppleUSBComposite</string>
|
||||
<key>IOClass</key> <string>AppleUSBComposite</string>
|
||||
<key>IOProbeScore</key> <integer>300000</integer>
|
||||
<key>IOProviderClass</key> <string>IOUSBDevice</string>
|
||||
<key>idVendor</key> <integer>1256</integer>
|
||||
<key>idProduct</key> <integer>26819</integer>
|
||||
<key>bcdDevice</key> <integer>256</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>OSBundleCompatibleVersion</key> <string>1.8</string>
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>files</key>
|
||||
<dict/>
|
||||
<key>files2</key>
|
||||
<dict/>
|
||||
<key>rules</key>
|
||||
<dict>
|
||||
<key>^Resources/</key>
|
||||
<true/>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^version.plist$</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>rules2</key>
|
||||
<dict>
|
||||
<key>.*\.dSYM($|/)</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>11</real>
|
||||
</dict>
|
||||
<key>^(.*/)?\.DS_Store$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>2000</real>
|
||||
</dict>
|
||||
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^.*</key>
|
||||
<true/>
|
||||
<key>^Info\.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^PkgInfo$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/</key>
|
||||
<dict>
|
||||
<key>optional</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1000</real>
|
||||
</dict>
|
||||
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
||||
<dict>
|
||||
<key>omit</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>1100</real>
|
||||
</dict>
|
||||
<key>^[^/]+$</key>
|
||||
<dict>
|
||||
<key>nested</key>
|
||||
<true/>
|
||||
<key>weight</key>
|
||||
<real>10</real>
|
||||
</dict>
|
||||
<key>^embedded\.provisionprofile$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
<key>^version\.plist$</key>
|
||||
<dict>
|
||||
<key>weight</key>
|
||||
<real>20</real>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
|
@ -1,7 +1,8 @@
|
|||
#!/bin/bash
|
||||
echo 'Installing Driver...'
|
||||
sudo cp -R heimdall.kext /System/Library/Extensions
|
||||
sudo chmod -R 755 /System/Library/Extensions/heimdall.kext
|
||||
sudo chown -R root:wheel /System/Library/Extensions/heimdall.kext
|
||||
sudo kextload /System/Library/Extensions/heimdall.kext
|
||||
echo 'Installation complete. If Heimdall cannot recognise your device a reboot may be required.'
|
||||
#!/bin/bash
|
||||
BASEDIR=$(dirname $0)
|
||||
echo 'Installing Driver...'
|
||||
sudo cp -R "$BASEDIR/heimdall.kext" /System/Library/Extensions
|
||||
sudo chmod -R 755 /System/Library/Extensions/heimdall.kext
|
||||
sudo chown -R root:wheel /System/Library/Extensions/heimdall.kext
|
||||
sudo kextload /System/Library/Extensions/heimdall.kext
|
||||
echo 'Installation complete. If Heimdall cannot recognise your device a reboot may be required.'
|
||||
|
|
27
README
27
README
|
@ -1,27 +0,0 @@
|
|||
--------------------------------------------------------------------------------
|
||||
Heimdall (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
http://www.glassechidna.com.au/products/heimdall/
|
||||
|
||||
DISCLAIMER:
|
||||
|
||||
This software attempts to flash your Galaxy S device. The very nature of
|
||||
flashing is dangerous. As with all flashing software, Heimdall has the
|
||||
potential to damage (brick) your phone if not used carefully. If you're
|
||||
concerned, don't use this software. Flashing ROMs onto your phone may also
|
||||
void your warranty. Benjamin Dobell and Glass Echidna are not responsible
|
||||
for the result of your actions.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
For more details about how to compile and install Heimdall please refer to the
|
||||
appropriate platform specific README:
|
||||
|
||||
- Linux:
|
||||
Linux/README
|
||||
|
||||
- OS X
|
||||
OSX/README.txt
|
||||
|
||||
- Windows
|
||||
Win32/README.txt
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
# Heimdall
|
||||
|
||||
[](https://builds.sr.ht/~grimler/Heimdall/commits/ubuntu.yml?)
|
||||
[](https://builds.sr.ht/~grimler/Heimdall/commits/archlinux.yml?)
|
||||
[](https://builds.sr.ht/~grimler/Heimdall/commits/alpine.yml?)
|
||||
|
||||
Heimdall is a cross-platform open-source tool suite used to flash
|
||||
firmware (aka ROMs) onto Samsung mobile devices.
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
Heimdall should work on AMD64/x86-64 (64-bit) or x86 (32-bit)
|
||||
computers running GNU/Linux, macOS or Windows.
|
||||
|
||||
However, several third-parties have reported success running Heimdall
|
||||
on ARM chipsets (in particular Raspberry Pi), as well as additional
|
||||
operating systems such as FreeBSD.
|
||||
|
||||
## How does Heimdall work?
|
||||
|
||||
Heimdall connects to a mobile device over USB and interacts with
|
||||
low-level software running on the device, known as Loke. Loke and
|
||||
Heimdall communicate via the custom Samsung-developed protocol
|
||||
typically referred to as the 'Odin 3 protocol'.
|
||||
|
||||
USB communication in Heimdall is handled by the popular open-source
|
||||
USB library, [libusb](https://libusb.info).
|
||||
|
||||
## Free & Open Source
|
||||
|
||||
Heimdall is both free and open source. It is licensed under the MIT
|
||||
license (see LICENSE).
|
||||
|
||||
Heimdall is maintained and predominantly developed by [Glass
|
||||
Echidna](https://glassechidna.com.au/), a _tiny_ independent software
|
||||
development company. If you appreciate our work and would like to
|
||||
support future development please consider making a
|
||||
[donation](https://glassechidna.com.au/donate/).
|
||||
|
||||
## Documentation
|
||||
|
||||
For more details about how to compile and install Heimdall please
|
||||
refer to the appropriate platform specific README:
|
||||
|
||||
#### Linux
|
||||
|
||||
- Linux/README ([online](Linux/README))
|
||||
|
||||
#### OS X
|
||||
|
||||
- OSX/README.txt ([online](OSX/README.txt))
|
||||
|
||||
#### Windows
|
||||
|
||||
- Win32/README.txt ([online](Win32/README.txt))
|
||||
|
||||
### Odin protocol and PIT format
|
||||
|
||||
For more details on the Odin protocol, and the PIT files, see the
|
||||
external project [samsung-loki/samsung-docs](https://samsung-loki.github.io/samsung-docs/).
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
Heimdall (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
http://www.glassechidna.com.au/products/heimdall/
|
||||
Heimdall (c) 2010-2017 Benjamin Dobell, Glass Echidna
|
||||
https://www.glassechidna.com.au/products/heimdall/
|
||||
|
||||
DISCLAIMER:
|
||||
|
||||
|
@ -12,30 +12,15 @@ DISCLAIMER:
|
|||
|
||||
|
||||
These instructions were written for Windows 7 / Vista / Server 2008 however the
|
||||
producedure should be essentially the same for all supported versions of
|
||||
procedure should be essentially the same for all supported versions of
|
||||
Windows (XP onwards).
|
||||
|
||||
|
||||
Troubleshooting:
|
||||
|
||||
1. If when you try launch Heimdall or Heimdall Frontend you receive a
|
||||
similar to:
|
||||
|
||||
The program can't start because MSVCP110.dll is missing from your
|
||||
computer.
|
||||
|
||||
This means that you haven't installed the Microsoft Visual C++ 2012
|
||||
runtimes. The runtimes can be downloaded from Microsoft's website:
|
||||
|
||||
http://www.microsoft.com/en-au/download/details.aspx?id=30679
|
||||
|
||||
|
||||
|
||||
Driver Installation Instructions:
|
||||
|
||||
1. Put your device into download mode and plug it in.
|
||||
|
||||
2. Run zadig.exe included in the Drivers subdirectory.
|
||||
2. Download zadig from https://zadig.akeo.ie/downloads/, and run zadig.exe.
|
||||
|
||||
3. From the menu chose Options -> List All Devices.
|
||||
|
||||
|
@ -198,7 +183,7 @@ Performing a Custom Flash with Heimdall Frontend:
|
|||
clicking the "Remove" button. Removing a partition from the list doesn't
|
||||
remove it from your device, it simply means it will not be flashed.
|
||||
|
||||
10. Repeat steps 7-9 as often as needed to specify all the partions/files
|
||||
10. Repeat steps 7-9 as often as needed to specify all the partitions/files
|
||||
that you wish to flash.
|
||||
|
||||
11. Now you can chose whether you would like to repartition your device as
|
||||
|
@ -348,8 +333,8 @@ How to Create a Heimdall Firmware Package:
|
|||
Homepage - Here you can enter your personal URL or a URL particularly
|
||||
pertaining to the firmware being packaged. The URL must be well
|
||||
formed for it to work. An example of a well formed URL is
|
||||
"http://www.glassechidna.com.au/products/heimdall/". It is
|
||||
important to include "http://" in order to specify the protocol as
|
||||
"https://www.glassechidna.com.au/products/heimdall/". It is
|
||||
important to include "https://" in order to specify the protocol as
|
||||
other protocols such as "ftp://" are equally valid although
|
||||
unlikely to be used.
|
||||
|
||||
|
@ -357,8 +342,8 @@ How to Create a Heimdall Firmware Package:
|
|||
make donations for the effort you've put into developing your
|
||||
firmware. Once again the URL must be well formed but there is no
|
||||
requirement on how your donation page should work. For instance
|
||||
both "http://www.glassechidna.com.au/donate/" and
|
||||
"http://forum.xda-developers.com/donatetome.php?u=2710388" are
|
||||
both "https://www.glassechidna.com.au/donate/" and
|
||||
"https://forum.xda-developers.com/donatetome.php?u=2710388" are
|
||||
equally valid.
|
||||
|
||||
Developer Info:
|
||||
|
@ -449,8 +434,8 @@ Nonetheless the following is an example of a valid firmware.xml file.
|
|||
<name>Benjamin Dobell</name>
|
||||
<name>Hedonism Bot</name>
|
||||
</developers>
|
||||
<url>http://www.glassechidna.com.au/</url>
|
||||
<donateurl>http://www.glassechidna.com.au/donate/</donateurl>
|
||||
<url>https://www.glassechidna.com.au/</url>
|
||||
<donateurl>https://www.glassechidna.com.au/donate/</donateurl>
|
||||
<devices>
|
||||
<device>
|
||||
<manufacturer>Samsung</manufacturer>
|
||||
|
@ -532,31 +517,31 @@ be included.
|
|||
|
||||
Appendix B - Installing Heimdall Suite from Source
|
||||
|
||||
1. Ensure that you have both a version of Visual Studio 2012 with C++
|
||||
support and Qt Developer Framework (4.7 or later, but prior to 5.0)
|
||||
installed on your system.
|
||||
Heimdall and Heimdall Frontend both utilise CMake for managing the build
|
||||
process. CMake can generate files for various build systems including GNU
|
||||
Make and Visual Studio. However, official packages are compiled with GNU
|
||||
Make and MinGW-W64 GCC/G++.
|
||||
|
||||
A free version (Visual C++ 2012 Express) can be downloaded from
|
||||
Microsoft's website:
|
||||
NOTE: Official builds use MinGW-W64 simply because on-going cross-platform
|
||||
development is simpler when using just the one IDE (Jetbrain's CLion)
|
||||
and similar toolchains.
|
||||
|
||||
http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-products
|
||||
1. Setup a MinGW-W64 build environment by utilising MSYS2:
|
||||
|
||||
Qt can also be downloaded freely from:
|
||||
https://msys2.github.io/
|
||||
|
||||
http://qt-project.org/downloads
|
||||
2. After installing MSYS2 a command prompt will launch, enter:
|
||||
|
||||
2. Open msvc2012.sln
|
||||
Pacman -Syu
|
||||
Pacman -S mingw-w64-x86_64 mingw-w64-x86_64-clang mingw-w64-x86_64-cmake mingw-w64-x86_64-libusb mingw-w64-x86_64-qt5-static make
|
||||
|
||||
3. From the Solutions Configuration drop-down change from "Debug" to
|
||||
"Release".
|
||||
3. Add the MinGW-W64 binaries to your PATH environment variable:
|
||||
|
||||
4. In the Solution Explorer right-click on the heimdall-frontend project
|
||||
and chose "Build".
|
||||
export PATH="/mingw64/bin:$PATH"
|
||||
|
||||
5. Depending on how you've installed Qt on your system you may need to copy
|
||||
"QtCore4.dll, "QtGui4.dll" and "QtXml4.dll" from your Qt bin/
|
||||
sub-directory to Heimdall's Win32/Release sub-directory.
|
||||
|
||||
6. Heimdall Frontend can then be run from Win32/Release or command line can
|
||||
be used to run Heimdall (command line) from the same directory.
|
||||
4. Build Heimdall & Heimdall Frontend
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=Release -DQt5Widgets_DIR=/c/msys64/mingw64/qt5-static/lib/cmake/Qt5Widgets ..
|
||||
make
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
# CMake support for fseeko
|
||||
#
|
||||
# Based on FindLFS.cmake by
|
||||
# Copyright (C) 2016 Julian Andres Klode <jak@debian.org>.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
# (the "Software"), to deal in the Software without restriction,
|
||||
# including without limitation the rights to use, copy, modify, merge,
|
||||
# publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
# and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, 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.
|
||||
#
|
||||
# This defines the following variables
|
||||
#
|
||||
# FSEEKO_DEFINITIONS - List of definitions to pass to add_definitions()
|
||||
# FSEEKO_COMPILE_OPTIONS - List of definitions to pass to add_compile_options()
|
||||
# FSEEKO_LIBRARIES - List of libraries and linker flags
|
||||
# FSEEKO_FOUND - If there is Large files support
|
||||
#
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(CMakePushCheckState)
|
||||
|
||||
# Check for the availability of fseeko()
|
||||
# The cases handled are:
|
||||
#
|
||||
# * Native fseeko()
|
||||
# * Preprocessor flag -D_LARGEFILE_SOURCE
|
||||
#
|
||||
function(_fseeko_check)
|
||||
set(_fseeko_cppflags)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${LFS_DEFINITIONS})
|
||||
message(STATUS "Looking for native fseeko support")
|
||||
check_symbol_exists(fseeko stdio.h fseeko_native)
|
||||
cmake_pop_check_state()
|
||||
if (fseeko_native)
|
||||
message(STATUS "Looking for native fseeko support - found")
|
||||
set(FSEEKO_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "Looking for native fseeko support - not found")
|
||||
endif()
|
||||
|
||||
if (NOT FSEEKO_FOUND)
|
||||
# See if it's available with _LARGEFILE_SOURCE.
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${LFS_DEFINITIONS} "-D_LARGEFILE_SOURCE")
|
||||
check_symbol_exists(fseeko stdio.h fseeko_need_largefile_source)
|
||||
cmake_pop_check_state()
|
||||
if (fseeko_need_largefile_source)
|
||||
message(STATUS "Looking for fseeko support with _LARGEFILE_SOURCE - found")
|
||||
set(FSEEKO_FOUND TRUE)
|
||||
set(_fseeko_cppflags "-D_LARGEFILE_SOURCE")
|
||||
else()
|
||||
message(STATUS "Looking for fseeko support with _LARGEFILE_SOURCE - not found")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(FSEEKO_DEFINITIONS ${_fseeko_cppflags} CACHE STRING "Extra definitions for fseeko support")
|
||||
set(FSEEKO_COMPILE_OPTIONS "" CACHE STRING "Extra compiler options for fseeko support")
|
||||
set(FSEEKO_LIBRARIES "" CACHE STRING "Extra definitions for fseeko support")
|
||||
set(FSEEKO_FOUND ${FSEEKO_FOUND} CACHE INTERNAL "Found fseeko")
|
||||
endfunction()
|
||||
|
||||
if (NOT FSEEKO_FOUND)
|
||||
_fseeko_check()
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(FSEEKO "Could not find fseeko. Set FSEEKO_DEFINITIONS, FSEEKO_COMPILE_OPTIONS, FSEEKO_LIBRARIES." FSEEKO_FOUND)
|
|
@ -0,0 +1,153 @@
|
|||
# CMake support for large files
|
||||
#
|
||||
# Copyright (C) 2016 Julian Andres Klode <jak@debian.org>.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person
|
||||
# obtaining a copy of this software and associated documentation files
|
||||
# (the "Software"), to deal in the Software without restriction,
|
||||
# including without limitation the rights to use, copy, modify, merge,
|
||||
# publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
# and to permit persons to whom the Software is furnished to do so,
|
||||
# subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be
|
||||
# included in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, 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.
|
||||
#
|
||||
# This defines the following variables
|
||||
#
|
||||
# LFS_DEFINITIONS - List of definitions to pass to add_definitions()
|
||||
# LFS_COMPILE_OPTIONS - List of definitions to pass to add_compile_options()
|
||||
# LFS_LIBRARIES - List of libraries and linker flags
|
||||
# LFS_FOUND - If there is Large files support
|
||||
#
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
include(CMakePushCheckState)
|
||||
|
||||
# Test program to check for LFS. Requires that off_t has at least 8 byte large
|
||||
set(_lfs_test_source
|
||||
"
|
||||
#include <sys/types.h>
|
||||
typedef char my_static_assert[sizeof(off_t) >= 8 ? 1 : -1];
|
||||
int main(void) { return 0; }
|
||||
"
|
||||
)
|
||||
|
||||
# Check if the given options are needed
|
||||
#
|
||||
# This appends to the variables _lfs_cppflags, _lfs_cflags, and _lfs_ldflags,
|
||||
# it also sets LFS_FOUND to 1 if it works.
|
||||
function(_lfs_check_compiler_option var options definitions libraries)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} ${options})
|
||||
set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${definitions})
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_DEFINITIONS} ${libraries})
|
||||
|
||||
message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries}")
|
||||
check_c_source_compiles("${_lfs_test_source}" ${var})
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(${var})
|
||||
message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries} - found")
|
||||
set(_lfs_cppflags ${_lfs_cppflags} ${definitions} PARENT_SCOPE)
|
||||
set(_lfs_cflags ${_lfs_cflags} ${options} PARENT_SCOPE)
|
||||
set(_lfs_ldflags ${_lfs_ldflags} ${libraries} PARENT_SCOPE)
|
||||
set(LFS_FOUND TRUE PARENT_SCOPE)
|
||||
else()
|
||||
message(STATUS "Looking for LFS support using ${options} ${definitions} ${libraries} - not found")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
# Check for the availability of LFS.
|
||||
# The cases handled are:
|
||||
#
|
||||
# * Native LFS
|
||||
# * Output of getconf LFS_CFLAGS; getconf LFS_LIBS; getconf LFS_LDFLAGS
|
||||
# * Preprocessor flag -D_FILE_OFFSET_BITS=64
|
||||
# * Preprocessor flag -D_LARGE_FILES
|
||||
#
|
||||
function(_lfs_check)
|
||||
set(_lfs_cflags)
|
||||
set(_lfs_cppflags)
|
||||
set(_lfs_ldflags)
|
||||
set(_lfs_libs)
|
||||
cmake_push_check_state()
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
message(STATUS "Looking for native LFS support")
|
||||
check_c_source_compiles("${_lfs_test_source}" lfs_native)
|
||||
cmake_pop_check_state()
|
||||
if (lfs_native)
|
||||
message(STATUS "Looking for native LFS support - found")
|
||||
set(LFS_FOUND TRUE)
|
||||
else()
|
||||
message(STATUS "Looking for native LFS support - not found")
|
||||
endif()
|
||||
|
||||
if (NOT LFS_FOUND)
|
||||
# Check using getconf. If getconf fails, don't worry, the check in
|
||||
# _lfs_check_compiler_option will fail as well.
|
||||
execute_process(COMMAND getconf LFS_CFLAGS
|
||||
OUTPUT_VARIABLE _lfs_cflags_raw
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
execute_process(COMMAND getconf LFS_LIBS
|
||||
OUTPUT_VARIABLE _lfs_libs_tmp
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
execute_process(COMMAND getconf LFS_LDFLAGS
|
||||
OUTPUT_VARIABLE _lfs_ldflags_tmp
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
separate_arguments(_lfs_cflags_raw)
|
||||
separate_arguments(_lfs_ldflags_tmp)
|
||||
separate_arguments(_lfs_libs_tmp)
|
||||
|
||||
# Move -D flags to the place they are supposed to be
|
||||
foreach(flag ${_lfs_cflags_raw})
|
||||
if (flag MATCHES "-D.*")
|
||||
list(APPEND _lfs_cppflags_tmp ${flag})
|
||||
else()
|
||||
list(APPEND _lfs_cflags_tmp ${flag})
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Check if the flags we received (if any) produce working LFS support
|
||||
_lfs_check_compiler_option(lfs_getconf_works
|
||||
"${_lfs_cflags_tmp}"
|
||||
"${_lfs_cppflags_tmp}"
|
||||
"${_lfs_libs_tmp};${_lfs_ldflags_tmp}")
|
||||
endif()
|
||||
|
||||
if(NOT LFS_FOUND) # IRIX stuff
|
||||
_lfs_check_compiler_option(lfs_need_n32 "-n32" "" "")
|
||||
endif()
|
||||
if(NOT LFS_FOUND) # Linux and friends
|
||||
_lfs_check_compiler_option(lfs_need_file_offset_bits "" "-D_FILE_OFFSET_BITS=64" "")
|
||||
endif()
|
||||
if(NOT LFS_FOUND) # AIX
|
||||
_lfs_check_compiler_option(lfs_need_large_files "" "-D_LARGE_FILES=1" "")
|
||||
endif()
|
||||
|
||||
set(LFS_DEFINITIONS ${_lfs_cppflags} CACHE STRING "Extra definitions for large file support")
|
||||
set(LFS_COMPILE_OPTIONS ${_lfs_cflags} CACHE STRING "Extra definitions for large file support")
|
||||
set(LFS_LIBRARIES ${_lfs_libs} ${_lfs_ldflags} CACHE STRING "Extra definitions for large file support")
|
||||
set(LFS_FOUND ${LFS_FOUND} CACHE INTERNAL "Found LFS")
|
||||
endfunction()
|
||||
|
||||
if (NOT LFS_FOUND)
|
||||
_lfs_check()
|
||||
endif()
|
||||
|
||||
find_package_handle_standard_args(LFS "Could not find LFS. Set LFS_DEFINITIONS, LFS_COMPILE_OPTIONS, LFS_LIBRARIES." LFS_FOUND)
|
|
@ -0,0 +1,130 @@
|
|||
# Based on module from bladeRF: https://github.com/Nuand/bladeRF/blob/e09200c38e1b273ebe43cd789839e66b0506aead/host/cmake/modules/FindLibUSB.cmake
|
||||
|
||||
# This is a modified version of the file written by Hedrik Sattler,
|
||||
# from the OpenOBEX project (licensed GPLv2/LGPL). (If this is not correct,
|
||||
# please contact us so we can attribute the author appropriately.)
|
||||
#
|
||||
# https://github.com/zuckschwerdt/openobex/blob/master/CMakeModules/FindLibUSB.cmake
|
||||
# http://dev.zuckschwerdt.org/openobex/
|
||||
#
|
||||
# Find libusb-1.0
|
||||
#
|
||||
# It will use PkgConfig if present and supported, otherwise this
|
||||
# script searches for binary distribution in the path defined by
|
||||
# the LIBUSB_PATH variable.
|
||||
#
|
||||
# The following standard variables get defined:
|
||||
# LIBUSB_FOUND: true if LibUSB was found
|
||||
# LIBUSB_HEADER_FILE: the location of the C header file
|
||||
# LIBUSB_INCLUDE_DIRS: the directorys that contain headers
|
||||
# LIBUSB_LIBRARIES: the library files
|
||||
# LIBUSB_VERSION the detected libusb version
|
||||
# LIBUSB_HAVE_GET_VERSION True if libusb has libusb_get_version()
|
||||
|
||||
include(CheckLibraryExists)
|
||||
include(CheckIncludeFile)
|
||||
|
||||
|
||||
# In Linux, folks should generally be able to simply fetch the libusb library and
|
||||
# development packages from their distros package repository. Windows users will
|
||||
# likely want to fetch a binary distribution, hence the Windows-oriented default.
|
||||
#
|
||||
# See http://www.libusb.org/wiki/windows_backend#LatestBinarySnapshots
|
||||
if(WIN32)
|
||||
set(LIBUSB_PATH
|
||||
"C:/Program Files (x86)/libusb-1.0.20"
|
||||
CACHE
|
||||
PATH
|
||||
"Path to libusb files. (This is generally only needed for Windows users who downloaded binary distributions.)"
|
||||
)
|
||||
endif()
|
||||
|
||||
# FreeBSD has built-in libusb since 800069
|
||||
if((${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") OR (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") )
|
||||
exec_program(sysctl ARGS -n kern.osreldate OUTPUT_VARIABLE FREEBSD_VERSION)
|
||||
set(LIBUSB_FOUND TRUE)
|
||||
set(LIBUSB_SKIP_VERSION_CHECK TRUE)
|
||||
set(LIBUSB_INCLUDE_DIRS "/usr/include")
|
||||
set(LIBUSB_HEADER_FILE "${LIBUSB_INCLUDE_DIRS}/libusb.h")
|
||||
set(LIBUSB_LIBRARIES "usb")
|
||||
set(LIBUSB_LIBRARY_DIRS "/usr/lib/")
|
||||
endif((${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") OR (${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD") )
|
||||
|
||||
find_package(PkgConfig)
|
||||
if(PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(PKGCONFIG_LIBUSB QUIET libusb-1.0 libusb)
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
|
||||
if(PKGCONFIG_LIBUSB_FOUND AND NOT LIBUSB_FOUND)
|
||||
set(LIBUSB_INCLUDE_DIRS ${PKGCONFIG_LIBUSB_INCLUDE_DIRS})
|
||||
foreach(i ${PKGCONFIG_LIBUSB_LIBRARIES})
|
||||
string(REGEX MATCH "[^-]*" ibase "${i}")
|
||||
find_library(${ibase}_LIBRARY
|
||||
NAMES ${i}
|
||||
PATHS ${PKGCONFIG_LIBUSB_LIBRARY_DIRS}
|
||||
)
|
||||
if(${ibase}_LIBRARY)
|
||||
list(APPEND LIBUSB_LIBRARIES ${${ibase}_LIBRARY})
|
||||
endif(${ibase}_LIBRARY)
|
||||
mark_as_advanced(${ibase}_LIBRARY)
|
||||
endforeach(i)
|
||||
|
||||
else(PKGCONFIG_LIBUSB_FOUND)
|
||||
if(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
# The libusbx binary distribution contains several libs.
|
||||
# Use the lib that got compiled with the same compiler.
|
||||
if(MSVC)
|
||||
if(CMAKE_CL_64)
|
||||
set(LIBUSB_LIBRARY_PATH_SUFFIX MS64/dll)
|
||||
else(CMAKE_CL_64)
|
||||
set(LIBUSB_LIBRARY_PATH_SUFFIX MS32/dll)
|
||||
endif(CMAKE_CL_64)
|
||||
elseif(CMAKE_COMPILER_IS_GNUCC)
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(LIBUSB_LIBRARY_PATH_SUFFIX MinGW32/dll)
|
||||
else(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(LIBUSB_LIBRARY_PATH_SUFFIX MinGW64/dll)
|
||||
endif(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
endif(MSVC)
|
||||
else()
|
||||
set(LIBUSB_LIBRARY_PATH_SUFFIX lib)
|
||||
set(LIBUSB_EXTRA_PATHS /usr /usr/local /opt/local)
|
||||
endif(${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
|
||||
find_file(LIBUSB_HEADER_FILE
|
||||
NAMES
|
||||
libusb.h
|
||||
PATHS
|
||||
${LIBUSB_PATH}
|
||||
${LIBUSB_EXTRA_PATHS}
|
||||
PATH_SUFFIXES
|
||||
include include/libusbx-1.0 include/libusb-1.0
|
||||
)
|
||||
mark_as_advanced(LIBUSB_HEADER_FILE)
|
||||
get_filename_component(LIBUSB_INCLUDE_DIRS "${LIBUSB_HEADER_FILE}" PATH)
|
||||
|
||||
|
||||
find_library(usb_LIBRARY
|
||||
NAMES
|
||||
libusb-1.0 usb-1.0
|
||||
PATHS
|
||||
${LIBUSB_PATH}
|
||||
${LIBUSB_EXTRA_PATHS}
|
||||
PATH_SUFFIXES
|
||||
${LIBUSB_LIBRARY_PATH_SUFFIX}
|
||||
)
|
||||
mark_as_advanced(usb_LIBRARY)
|
||||
if(usb_LIBRARY)
|
||||
set(LIBUSB_LIBRARIES ${usb_LIBRARY})
|
||||
endif(usb_LIBRARY)
|
||||
|
||||
endif(PKGCONFIG_LIBUSB_FOUND AND NOT LIBUSB_FOUND)
|
||||
|
||||
if(LIBUSB_INCLUDE_DIRS AND LIBUSB_LIBRARIES)
|
||||
set(LIBUSB_FOUND TRUE)
|
||||
endif(LIBUSB_INCLUDE_DIRS AND LIBUSB_LIBRARIES)
|
||||
|
||||
if(LIBUSB_FOUND)
|
||||
set(CMAKE_REQUIRED_INCLUDES "${LIBUSB_INCLUDE_DIRS}")
|
||||
check_include_file("{LIBUSB_HEADER_FILE}" LIBUSB_FOUND)
|
||||
endif(LIBUSB_FOUND)
|
|
@ -0,0 +1,89 @@
|
|||
cmake_minimum_required(VERSION 3.0.0)
|
||||
|
||||
project(heimdall-frontend)
|
||||
|
||||
set(LIBPIT_INCLUDE_DIRS
|
||||
../libpit/source)
|
||||
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON) # moc files are generated in build (current) directory
|
||||
|
||||
find_package(Qt5Widgets REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lobjc -framework IOKit -framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
|
||||
endif(MINGW)
|
||||
|
||||
include_directories(${LIBPIT_INCLUDE_DIRS})
|
||||
|
||||
set(HEIMDALL_FRONTEND_SOURCE_FILES
|
||||
source/aboutform.cpp
|
||||
source/Alerts.cpp
|
||||
source/FirmwareInfo.cpp
|
||||
source/main.cpp
|
||||
source/mainwindow.cpp
|
||||
source/PackageData.cpp
|
||||
source/Packaging.cpp)
|
||||
|
||||
qt5_wrap_ui(HEIMDALL_FRONTEND_FORMS
|
||||
mainwindow.ui
|
||||
aboutform.ui)
|
||||
|
||||
qt5_add_resources(HEIMDALL_FRONTEND_RESOURCES
|
||||
mainwindow.qrc)
|
||||
|
||||
add_executable(heimdall-frontend WIN32
|
||||
MACOSX_BUNDLE
|
||||
${HEIMDALL_FRONTEND_SOURCE_FILES}
|
||||
${HEIMDALL_FRONTEND_FORMS}
|
||||
${HEIMDALL_FRONTEND_RESOURCES})
|
||||
|
||||
target_compile_features(heimdall-frontend PRIVATE cxx_std_11)
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
#
|
||||
# Large file support on UN*X, a/k/a LFS.
|
||||
#
|
||||
# On Windows, we require _fseeki64() and _ftelli64(). Visual Studio
|
||||
# has had supported them since Visual Studio 2005/MSVCR80.
|
||||
#
|
||||
if(NOT WIN32)
|
||||
include(FindLFS)
|
||||
if(LFS_FOUND)
|
||||
#
|
||||
# Add the required #defines.
|
||||
#
|
||||
add_definitions(${LFS_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
#
|
||||
# Check for fseeko as well.
|
||||
#
|
||||
include(FindFseeko)
|
||||
if(FSEEKO_FOUND)
|
||||
set(HAVE_FSEEKO ON)
|
||||
|
||||
#
|
||||
# Add the required #defines.
|
||||
#
|
||||
add_definitions(${FSEEKO_DEFINITIONS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET heimdall-frontend
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS "QT_LARGEFILE_SUPPORT")
|
||||
|
||||
target_link_libraries(heimdall-frontend pit)
|
||||
target_link_libraries(heimdall-frontend Qt5::Widgets)
|
||||
target_link_libraries(heimdall-frontend z)
|
||||
install (TARGETS heimdall-frontend
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
BUNDLE DESTINATION /Applications)
|
|
@ -1,13 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ImportGroup Label="PropertySheets" />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup />
|
||||
<ItemDefinitionGroup />
|
||||
<ItemGroup>
|
||||
<BuildMacro Include="QTDIR">
|
||||
<Value>$(QTDIR)</Value>
|
||||
<EnvironmentVariable>true</EnvironmentVariable>
|
||||
</BuildMacro>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,455 +1,455 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutForm</class>
|
||||
<widget class="QWidget" name="AboutForm">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>581</width>
|
||||
<height>491</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>581</width>
|
||||
<height>491</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>581</width>
|
||||
<height>491</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About Heimdall Frontend</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="okPushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>460</y>
|
||||
<width>75</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>561</width>
|
||||
<height>441</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-701</y>
|
||||
<width>542</width>
|
||||
<height>1140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="versionCopyrightLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall Frontend</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 1.4.0</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2010-2013 Benjamin Dobell, Glass Echidna</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall (command line)</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%HEIMDALL-VERSION%Copyright © 2010-2013 Benjamin Dobell, Glass Echidna</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">If you appreciate this software and you would like to support future development please consider donating:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/donate/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/donate/</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Glass Echidna Homepage:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall Homepage:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/products/heimdall/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/products/heimdall/</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall and Heimdall Frontend are licensed under the following license:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 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.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall Frontend's user interface is powered by the Qt Framework:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Copyright © 2008-2011 Nokia Corporation</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Qt is licensed under the </span><a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">Lesser General Public License v2.1.</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall Frontend utilises zlib for package compression:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">zlib is licensed under the following license:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Copyright © 1995-2010 Jean-loup Gailly and Mark Adler</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">3. This notice may not be removed or altered from any source distribution.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Heimdall (command line) utilises libusbx for all USB communication:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">libusbx is licensed under the </span><a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Lesser General Public License v2.1.</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okPushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutForm</receiver>
|
||||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>287</x>
|
||||
<y>470</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>290</x>
|
||||
<y>245</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AboutForm</class>
|
||||
<widget class="QWidget" name="AboutForm">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>581</width>
|
||||
<height>491</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>581</width>
|
||||
<height>491</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>581</width>
|
||||
<height>491</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>About Heimdall Frontend</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="okPushButton">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>460</y>
|
||||
<width>75</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QScrollArea" name="scrollArea">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>10</y>
|
||||
<width>561</width>
|
||||
<height>441</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-701</y>
|
||||
<width>542</width>
|
||||
<height>1140</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="versionCopyrightLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall Frontend</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 2.0.2</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2010-2017 Benjamin Dobell, Glass Echidna</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall (command line)</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">%HEIMDALL-VERSION%Copyright © 2010-2017 Benjamin Dobell, Glass Echidna</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">If you appreciate this software and you would like to support future development please consider donating:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/donate/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/donate/</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Glass Echidna Homepage:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>10</pointsize>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall Homepage:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><a href="http://www.glassechidna.com.au/products/heimdall/"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">http://www.glassechidna.com.au/products/heimdall/</span></a></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<pointsize>9</pointsize>
|
||||
<kerning>true</kerning>
|
||||
</font>
|
||||
</property>
|
||||
<property name="autoFillBackground">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall and Heimdall Frontend are licensed under the following license:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 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.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="scaledContents">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall Frontend's user interface is powered by the Qt Framework:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Copyright © 2008-2011 Nokia Corporation</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Qt is licensed under the </span><a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; text-decoration: underline; color:#0000ff;">Lesser General Public License v2.1.</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_7">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Lucida Grande'; font-size:13pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:600;">Heimdall Frontend utilises zlib for package compression:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">zlib is licensed under the following license:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Copyright © 1995-2010 Jean-loup Gailly and Mark Adler</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:10pt;">3. This notice may not be removed or altered from any source distribution.</span></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>15</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Heimdall (command line) utilises libusbx for all USB communication:</span></p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">libusbx is licensed under the </span><a href="http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Lesser General Public License v2.1.</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::RichText</enum>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>okPushButton</sender>
|
||||
<signal>clicked()</signal>
|
||||
<receiver>AboutForm</receiver>
|
||||
<slot>close()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>287</x>
|
||||
<y>470</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>290</x>
|
||||
<y>245</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Heimdall Frontend is the official graphical user interface for the Heimdall tool suite.
|
|
@ -1,16 +0,0 @@
|
|||
HEADERS += ./Source/aboutform.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/PackageData.cpp \
|
||||
./Source/Packaging.cpp
|
||||
FORMS += ./mainwindow.ui \
|
||||
./aboutform.ui
|
||||
RESOURCES += mainwindow.qrc
|
|
@ -1,109 +0,0 @@
|
|||
# ----------------------------------------------------
|
||||
# This file is generated by the Qt Visual Studio Add-in.
|
||||
# ------------------------------------------------------
|
||||
|
||||
TEMPLATE = app
|
||||
TARGET = heimdall-frontend
|
||||
|
||||
isEmpty(OUTPUTDIR) {
|
||||
OUTPUTDIR = $$(OUTPUTDIR)
|
||||
}
|
||||
|
||||
macx {
|
||||
message("")
|
||||
|
||||
isEmpty(QT_FRAMEWORKS_DIR) {
|
||||
QT_FRAMEWORKS_DIR = $$(QT_FRAMEWORKS_DIR)
|
||||
}
|
||||
|
||||
isEmpty(QT_FRAMEWORKS_DIR) {
|
||||
message("QT_FRAMEWORKS_DIR not specified, using default:")
|
||||
QT_FRAMEWORKS_DIR = /Library/Frameworks
|
||||
}
|
||||
|
||||
message("QT_FRAMEWORKS_DIR = $$QT_FRAMEWORKS_DIR")
|
||||
message("")
|
||||
|
||||
isEmpty(QMAKE_MACOSX_DEPLOYMENT_TARGET) {
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = $$(QMAKE_MACOSX_DEPLOYMENT_TARGET)
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_MACOSX_DEPLOYMENT_TARGET) {
|
||||
message("QMAKE_MACOSX_DEPLOYMENT_TARGET not specified, using default:")
|
||||
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.4
|
||||
}
|
||||
|
||||
message("QMAKE_MACOSX_DEPLOYMENT_TARGET = $$QMAKE_MACOSX_DEPLOYMENT_TARGET")
|
||||
message("")
|
||||
|
||||
isEmpty(QMAKE_MAC_SDK) {
|
||||
QMAKE_MAC_SDK = $$(QMAKE_MAC_SDK)
|
||||
}
|
||||
|
||||
isEmpty(QMAKE_MAC_SDK) {
|
||||
message("QMAKE_MAC_SDK not specified, using default:")
|
||||
QMAKE_MAC_SDK = /Developer/SDKs/MacOSX10.7.sdk
|
||||
}
|
||||
|
||||
message("QMAKE_MAC_SDK = $$QMAKE_MAC_SDK")
|
||||
message("")
|
||||
|
||||
PRIVATE_FRAMEWORKS.files = $$QT_FRAMEWORKS_DIR/QtCore.framework \
|
||||
$$QT_FRAMEWORKS_DIR//QtGui.framework $$QT_FRAMEWORKS_DIR/QtXml.framework
|
||||
PRIVATE_FRAMEWORKS.path = Contents/Frameworks
|
||||
|
||||
QMAKE_BUNDLE_DATA += PRIVATE_FRAMEWORKS
|
||||
LIBS += -L/usr/lib
|
||||
|
||||
config += x86 x86_64 ppc
|
||||
|
||||
QMAKE_CFLAGS_X86_64 = -m64 -mmacosx-version-min=10.5
|
||||
QMAKE_CXXFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
|
||||
QMAKE_LFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64
|
||||
|
||||
isEmpty(OUTPUTDIR) {
|
||||
DESTDIR = /Applications
|
||||
} else {
|
||||
DESTDIR = $$OUTPUTDIR
|
||||
}
|
||||
|
||||
} else {
|
||||
win32 { # It is recommended that Windows users compile via VS2010, but just in case...
|
||||
DESTDIR = ../Win32
|
||||
|
||||
!isEmpty(OUTPUTDIR) {
|
||||
target.path = $$OUTPUTDIR
|
||||
INSTALLS += target
|
||||
}
|
||||
} else {
|
||||
DESTDIR = ../Linux
|
||||
|
||||
isEmpty(OUTPUTDIR) {
|
||||
target.path = /usr/local/bin
|
||||
} else {
|
||||
target.path = $$OUTPUTDIR
|
||||
}
|
||||
|
||||
INSTALLS += target
|
||||
}
|
||||
}
|
||||
|
||||
QMAKE_CXXFLAGS += -std=c++0x
|
||||
|
||||
unix:LIBS += -lz ../libpit/libpit-1.4.a
|
||||
win32:LIBS += ../Win32/Release/lib/libpit.lib
|
||||
|
||||
QT += core gui xml
|
||||
CONFIG += release
|
||||
DEFINES += QT_LARGEFILE_SUPPORT
|
||||
INCLUDEPATH += ./GeneratedFiles \
|
||||
./GeneratedFiles/Release \
|
||||
../libpit/Source \
|
||||
.
|
||||
unix:INCLUDEPATH += /usr/include
|
||||
DEPENDPATH += .
|
||||
MOC_DIR += ./GeneratedFiles/release
|
||||
OBJECTS_DIR += release
|
||||
UI_DIR += ./GeneratedFiles
|
||||
RCC_DIR += ./GeneratedFiles
|
||||
include(heimdall-frontend.pri)
|
|
@ -1,201 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{EAD352DF-7CDE-478C-8D70-B0E42A951DEF}</ProjectGuid>
|
||||
<Keyword>Qt4VSv1.0</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="Qt4VSPropertySheet.props" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
<Import Project="Qt4VSPropertySheet.props" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
|
||||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)include;$(SolutionDir)libpit\Source;$(IncludePath)</IncludePath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)lib\win32;$(LibraryPath)</LibraryPath>
|
||||
<LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)lib\win32;$(LibraryPath)</LibraryPath>
|
||||
<SourcePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SourcePath)</SourcePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtXml;..\libpit\Source;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<MinimalRebuild>true</MinimalRebuild>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>qtmaind.lib;QtCored4.lib;QtGuid4.lib;QtXmld4.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<PreprocessorDefinitions>UNICODE;WIN32;QT_LARGEFILE_SUPPORT;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>.\GeneratedFiles;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\qtmain;$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtXml;..\libpit\Source;.\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWChar_tAsBuiltInType>false</TreatWChar_tAsBuiltInType>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<OutputFile>$(OutDir)$(TargetName)$(TargetExt)</OutputFile>
|
||||
<AdditionalLibraryDirectories>$(QTDIR)\lib;$(SolutionDir)$(Platform)\$(Configuration)\lib\;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<GenerateDebugInformation>false</GenerateDebugInformation>
|
||||
<AdditionalDependencies>qtmain.lib;QtCore4.lib;QtGui4.lib;QtXml4.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_aboutform.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_mainwindow.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\qrc_mainwindow.cpp">
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
</PrecompiledHeader>
|
||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
</PrecompiledHeader>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_aboutform.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_mainwindow.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\aboutform.cpp" />
|
||||
<ClCompile Include="Source\Alerts.cpp" />
|
||||
<ClCompile Include="Source\FirmwareInfo.cpp" />
|
||||
<ClCompile Include="Source\main.cpp" />
|
||||
<ClCompile Include="Source\mainwindow.cpp" />
|
||||
<ClCompile Include="Source\PackageData.cpp" />
|
||||
<ClCompile Include="Source\Packaging.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="mainwindow.ui">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GeneratedFiles\ui_aboutform.h" />
|
||||
<ClInclude Include="GeneratedFiles\ui_mainwindow.h" />
|
||||
<CustomBuild Include="Source\aboutform.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtXml" "-I." "-I.\..\libpit\Source" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." -D_UNICODE -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DUNICODE -DWIN32</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-I$(QTDIR)\include" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtXml" "-I." "-I.\..\libpit\Source" "-I.\GeneratedFiles" "-I.\GeneratedFiles\$(ConfigurationName)\." -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DUNICODE -DWIN32</Command>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="Source\Alerts.h" />
|
||||
<ClInclude Include="Source\FirmwareInfo.h" />
|
||||
<ClInclude Include="Source\PackageData.h" />
|
||||
<ClInclude Include="Source\Packaging.h" />
|
||||
<CustomBuild Include="Source\mainwindow.h">
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_CORE_LIB -DQT_GUI_LIB -D_UNICODE "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB "-I." "-I.\GeneratedFiles" "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\qtmain" "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtXml" "-I.\..\libpit\Source" "-I." "-I." "-I." "-I." "-I." "Source\mainwindow.h" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"</Command>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="mainwindow.qrc">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rcc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rcc%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="aboutform.ui">
|
||||
<FileType>Document</FileType>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
|
||||
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
|
||||
<SubType>Designer</SubType>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties UicDir=".\GeneratedFiles" MocDir=".\GeneratedFiles\$(ConfigurationName)" MocOptions="" RccDir=".\GeneratedFiles" lupdateOnBuild="0" QtVersion_x0020_Win32="qt" />
|
||||
</VisualStudio>
|
||||
</ProjectExtensions>
|
||||
</Project>
|
|
@ -1,108 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Form Files">
|
||||
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
|
||||
<Extensions>ui</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
|
||||
<Extensions>qrc;*</Extensions>
|
||||
<ParseFiles>false</ParseFiles>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files">
|
||||
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
|
||||
<Extensions>moc;h;cpp</Extensions>
|
||||
<SourceControlFiles>False</SourceControlFiles>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files\Debug">
|
||||
<UniqueIdentifier>{ead127e5-64ec-4f27-8f35-5fb8f8b0b46e}</UniqueIdentifier>
|
||||
<Extensions>cpp;moc</Extensions>
|
||||
<SourceControlFiles>False</SourceControlFiles>
|
||||
</Filter>
|
||||
<Filter Include="Generated Files\Release">
|
||||
<UniqueIdentifier>{2a437972-0e31-44d0-be90-ea5d62a68ff5}</UniqueIdentifier>
|
||||
<Extensions>cpp;moc</Extensions>
|
||||
<SourceControlFiles>False</SourceControlFiles>
|
||||
</Filter>
|
||||
<Filter Include="Source">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;cxx;c;def</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="GeneratedFiles\qrc_mainwindow.cpp">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\main.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\mainwindow.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_mainwindow.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_mainwindow.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\aboutform.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\Packaging.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\PackageData.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\FirmwareInfo.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Source\Alerts.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Debug\moc_aboutform.cpp">
|
||||
<Filter>Generated Files\Debug</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="GeneratedFiles\Release\moc_aboutform.cpp">
|
||||
<Filter>Generated Files\Release</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="mainwindow.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="mainwindow.qrc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="Source\mainwindow.h">
|
||||
<Filter>Source</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="AboutForm.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="Source\aboutform.h">
|
||||
<Filter>Source</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="GeneratedFiles\ui_mainwindow.h">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="GeneratedFiles\ui_AboutForm.h">
|
||||
<Filter>Generated Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Source\Packaging.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Source\PackageData.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Source\FirmwareInfo.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Source\Alerts.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,428 +0,0 @@
|
|||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2010 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# define uncompress z_uncompress
|
||||
# define zError z_zError
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# define gzFile z_gzFile
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
# ifdef ZLIB_DLL
|
||||
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXTERN extern __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXTERN extern __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
# endif /* ZLIB_DLL */
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# define ZEXPORT WINAPI
|
||||
# ifdef WIN32
|
||||
# define ZEXPORTVA WINAPIV
|
||||
# else
|
||||
# define ZEXPORTVA FAR CDECL
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined (__BEOS__)
|
||||
# ifdef ZLIB_DLL
|
||||
# ifdef ZLIB_INTERNAL
|
||||
# define ZEXPORT __declspec(dllexport)
|
||||
# define ZEXPORTVA __declspec(dllexport)
|
||||
# else
|
||||
# define ZEXPORT __declspec(dllimport)
|
||||
# define ZEXPORTVA __declspec(dllimport)
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ZEXTERN
|
||||
# define ZEXTERN extern
|
||||
#endif
|
||||
#ifndef ZEXPORT
|
||||
# define ZEXPORT
|
||||
#endif
|
||||
#ifndef ZEXPORTVA
|
||||
# define ZEXPORTVA
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# include <sys/types.h> /* for off_t */
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_* and off_t */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef SEEK_SET
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# define z_off64_t z_off_t
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__)
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(__MVS__)
|
||||
# define NO_vsnprintf
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
<RCC>
|
||||
<qresource prefix="MainWindow">
|
||||
</qresource>
|
||||
</RCC>
|
||||
<RCC>
|
||||
<qresource prefix="MainWindow">
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -32,6 +32,7 @@
|
|||
#include <QDateTime>
|
||||
#include <QDir>
|
||||
#include <QProgressDialog>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "Alerts.h"
|
||||
|
@ -689,118 +690,116 @@ QString Packaging::ClashlessFilename(const QList<FileInfo>& fileInfos, int fileI
|
|||
renameIndex++;
|
||||
}
|
||||
|
||||
if (renameIndex > 0)
|
||||
if (renameIndex <= 0)
|
||||
{
|
||||
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
|
||||
QString shortFilename;
|
||||
QString fileType;
|
||||
return (filename);
|
||||
}
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
|
||||
QString shortFilename;
|
||||
QString fileType;
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
{
|
||||
shortFilename = filename.left(lastPeriodIndex);
|
||||
fileType = filename.mid(lastPeriodIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
shortFilename = filename;
|
||||
}
|
||||
|
||||
unsigned int renameIndexOffset = 0;
|
||||
bool validIndexOffset = true;
|
||||
|
||||
// Before we append a rename index we must ensure it doesn't produce further collisions.
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
|
||||
|
||||
if (otherFilename.length() > filename.length() + 1)
|
||||
{
|
||||
shortFilename = filename.left(lastPeriodIndex);
|
||||
fileType = filename.mid(lastPeriodIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
shortFilename = filename;
|
||||
}
|
||||
QString trimmedOtherFilename = otherFilename.left(shortFilename.length());
|
||||
|
||||
unsigned int renameIndexOffset = 0;
|
||||
bool validIndexOffset = true;
|
||||
|
||||
// Before we append a rename index we must ensure it doesn't produce further collisions.
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
|
||||
|
||||
if (otherFilename.length() > filename.length() + 1)
|
||||
if (shortFilename == trimmedOtherFilename)
|
||||
{
|
||||
QString trimmedOtherFilename = otherFilename.left(shortFilename.length());
|
||||
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
|
||||
QString shortOtherFilename;
|
||||
|
||||
if (shortFilename == trimmedOtherFilename)
|
||||
if (lastPeriodIndex >= 0)
|
||||
shortOtherFilename = otherFilename.left(lastPeriodIndex);
|
||||
else
|
||||
shortOtherFilename = otherFilename;
|
||||
|
||||
QRegExp renameExp("-[0-9]+");
|
||||
|
||||
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
|
||||
{
|
||||
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
|
||||
QString shortOtherFilename;
|
||||
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
shortOtherFilename = otherFilename.left(lastPeriodIndex);
|
||||
else
|
||||
shortOtherFilename = otherFilename;
|
||||
if (!validIndexOffset)
|
||||
break;
|
||||
|
||||
QRegExp renameExp("-[0-9]+");
|
||||
|
||||
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
|
||||
{
|
||||
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
|
||||
|
||||
if (!validIndexOffset)
|
||||
break;
|
||||
|
||||
if (trailingInteger > renameIndexOffset)
|
||||
renameIndexOffset = trailingInteger;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
// Ensure renaming won't involve integer overflow!
|
||||
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
|
||||
validIndexOffset = false;
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
shortFilename.append(QChar('-'));
|
||||
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
|
||||
|
||||
return (shortFilename + fileType);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback behaviour... an absolutely terrible brute force implementation!
|
||||
QString filename;
|
||||
QString renamePrefix;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
renamePrefix.append(QChar('+'));
|
||||
|
||||
for (unsigned int i = 0; i < static_cast<unsigned int>(-1); i++)
|
||||
{
|
||||
filename = shortFilename + renamePrefix + QString::number(i) + fileType;
|
||||
|
||||
bool valid = true;
|
||||
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
|
||||
{
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid)
|
||||
return (filename);
|
||||
if (trailingInteger > renameIndexOffset)
|
||||
renameIndexOffset = trailingInteger;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
// Ensure renaming won't involve integer overflow!
|
||||
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
|
||||
validIndexOffset = false;
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
shortFilename.append(QChar('-'));
|
||||
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
|
||||
|
||||
return (shortFilename + fileType);
|
||||
}
|
||||
else
|
||||
{
|
||||
return (filename);
|
||||
// Fallback behaviour... an absolutely terrible brute force implementation!
|
||||
QString filename;
|
||||
QString renamePrefix;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
renamePrefix.append(QChar('+'));
|
||||
|
||||
for (unsigned int i = 0; i < static_cast<unsigned int>(-1); i++)
|
||||
{
|
||||
filename = shortFilename + renamePrefix + QString::number(i) + fileType;
|
||||
|
||||
bool valid = true;
|
||||
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
|
||||
{
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (valid)
|
||||
return (filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -822,113 +821,111 @@ QString Packaging::ClashlessFilename(const QList<FileInfo>& fileInfos, const QSt
|
|||
renameIndex++;
|
||||
}
|
||||
|
||||
if (renameIndex > 0)
|
||||
{
|
||||
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
|
||||
QString shortFilename;
|
||||
QString fileType;
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
{
|
||||
shortFilename = filename.left(lastPeriodIndex);
|
||||
fileType = filename.mid(lastPeriodIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
shortFilename = filename;
|
||||
}
|
||||
|
||||
unsigned int renameIndexOffset = 0;
|
||||
bool validIndexOffset = true;
|
||||
|
||||
// Before we append a rename index we must ensure it doesn't produce further collisions.
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
|
||||
|
||||
if (otherFilename.length() > filename.length() + 1)
|
||||
{
|
||||
QString trimmedOtherFilename = otherFilename.left(filename.length());
|
||||
|
||||
if (filename == trimmedOtherFilename)
|
||||
{
|
||||
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
|
||||
QString shortOtherFilename;
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
shortOtherFilename = otherFilename.left(lastPeriodIndex);
|
||||
else
|
||||
shortOtherFilename = otherFilename;
|
||||
|
||||
QRegExp renameExp("-[0-9]+");
|
||||
|
||||
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
|
||||
{
|
||||
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
|
||||
|
||||
if (!validIndexOffset)
|
||||
break;
|
||||
|
||||
if (trailingInteger > renameIndexOffset)
|
||||
renameIndexOffset = trailingInteger;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
// Ensure renaming won't involve integer overflow!
|
||||
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
|
||||
validIndexOffset = false;
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
shortFilename.append(QChar('-'));
|
||||
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
|
||||
|
||||
return (shortFilename + fileType);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback behaviour, brute-force/semi-random.
|
||||
bool valid;
|
||||
QString filename;
|
||||
|
||||
do
|
||||
{
|
||||
valid = true;
|
||||
|
||||
filename = shortFilename + "-";
|
||||
for (int i = 0; i < 8; i++)
|
||||
filename.append(QChar(qrand() % ('Z' - 'A' + 1) + 'A'));
|
||||
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
|
||||
{
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (!valid);
|
||||
|
||||
return (filename);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (renameIndex <= 0)
|
||||
{
|
||||
return (filename);
|
||||
}
|
||||
|
||||
int lastPeriodIndex = filename.lastIndexOf(QChar('.'));
|
||||
QString shortFilename;
|
||||
QString fileType;
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
{
|
||||
shortFilename = filename.left(lastPeriodIndex);
|
||||
fileType = filename.mid(lastPeriodIndex);
|
||||
}
|
||||
else
|
||||
{
|
||||
shortFilename = filename;
|
||||
}
|
||||
|
||||
unsigned int renameIndexOffset = 0;
|
||||
bool validIndexOffset = true;
|
||||
|
||||
// Before we append a rename index we must ensure it doesn't produce further collisions.
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
QString otherFilename = fileInfos[i].GetFilename().mid(lastSlash + 1);
|
||||
|
||||
if (otherFilename.length() > filename.length() + 1)
|
||||
{
|
||||
QString trimmedOtherFilename = otherFilename.left(filename.length());
|
||||
|
||||
if (filename == trimmedOtherFilename)
|
||||
{
|
||||
lastPeriodIndex = otherFilename.lastIndexOf(QChar('.'));
|
||||
QString shortOtherFilename;
|
||||
|
||||
if (lastPeriodIndex >= 0)
|
||||
shortOtherFilename = otherFilename.left(lastPeriodIndex);
|
||||
else
|
||||
shortOtherFilename = otherFilename;
|
||||
|
||||
QRegExp renameExp("-[0-9]+");
|
||||
|
||||
if (renameExp.lastIndexIn(shortOtherFilename) == shortFilename.length())
|
||||
{
|
||||
unsigned int trailingInteger = shortOtherFilename.mid(shortFilename.length() + 1).toUInt(&validIndexOffset);
|
||||
|
||||
if (!validIndexOffset)
|
||||
break;
|
||||
|
||||
if (trailingInteger > renameIndexOffset)
|
||||
renameIndexOffset = trailingInteger;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
// Ensure renaming won't involve integer overflow!
|
||||
if (renameIndex > static_cast<unsigned int>(-1) - renameIndexOffset)
|
||||
validIndexOffset = false;
|
||||
}
|
||||
|
||||
if (validIndexOffset)
|
||||
{
|
||||
shortFilename.append(QChar('-'));
|
||||
shortFilename.append(QString::number(renameIndexOffset + renameIndex));
|
||||
|
||||
return (shortFilename + fileType);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fallback behaviour, brute-force/semi-random.
|
||||
bool valid;
|
||||
QString filename;
|
||||
|
||||
do
|
||||
{
|
||||
valid = true;
|
||||
|
||||
filename = shortFilename + "-";
|
||||
for (int i = 0; i < 8; i++)
|
||||
filename.append(QChar(QRandomGenerator::global()->bounded(('Z' - 'A' + 1) + 'A')));
|
||||
|
||||
for (int i = 0; i < fileInfos.length(); i++)
|
||||
{
|
||||
int lastSlash = fileInfos[i].GetFilename().lastIndexOf('/');
|
||||
|
||||
if (lastSlash < 0)
|
||||
lastSlash = fileInfos[i].GetFilename().lastIndexOf('\\');
|
||||
|
||||
if (filename == fileInfos[i].GetFilename().mid(lastSlash + 1))
|
||||
{
|
||||
valid = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} while (!valid);
|
||||
|
||||
return (filename);
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
|
@ -1,124 +1,126 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
// Qt
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "aboutform.h"
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
using namespace HeimdallFrontend;
|
||||
|
||||
AboutForm::AboutForm(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
// Heimdall Command Line
|
||||
QObject::connect(&heimdallProcess, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout()));
|
||||
QObject::connect(&heimdallProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus)));
|
||||
QObject::connect(&heimdallProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError)));
|
||||
|
||||
heimdallFailed = false;
|
||||
|
||||
RetrieveHeimdallVersion();
|
||||
}
|
||||
|
||||
void AboutForm::RetrieveHeimdallVersion(void)
|
||||
{
|
||||
heimdallProcess.setReadChannel(QProcess::StandardOutput);
|
||||
|
||||
heimdallProcess.start("heimdall", QStringList("version"));
|
||||
heimdallProcess.waitForFinished(350);
|
||||
|
||||
// OS X was playing up and not finding heimdall, so we're manually checking the PATH.
|
||||
if (heimdallFailed)
|
||||
{
|
||||
QStringList environment = QProcess::systemEnvironment();
|
||||
|
||||
QStringList paths;
|
||||
|
||||
// Ensure /usr/bin is in PATH
|
||||
for (int i = 0; i < environment.length(); i++)
|
||||
{
|
||||
if (environment[i].left(5) == "PATH=")
|
||||
{
|
||||
paths = environment[i].mid(5).split(':');
|
||||
paths.prepend("/usr/bin");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int pathIndex = -1;
|
||||
|
||||
while (heimdallFailed && ++pathIndex < paths.length())
|
||||
{
|
||||
QString heimdallPath = paths[pathIndex];
|
||||
|
||||
if (heimdallPath.length() > 0)
|
||||
{
|
||||
heimdallFailed = false;
|
||||
|
||||
if (heimdallPath[heimdallPath.length() - 1] != QDir::separator())
|
||||
heimdallPath += QDir::separator();
|
||||
|
||||
heimdallPath += "heimdall";
|
||||
|
||||
heimdallProcess.start(heimdallPath, QStringList("version"));
|
||||
heimdallProcess.waitForFinished(350);
|
||||
}
|
||||
}
|
||||
|
||||
if (heimdallFailed)
|
||||
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", ""));
|
||||
}
|
||||
}
|
||||
|
||||
void AboutForm::HandleHeimdallStdout(void)
|
||||
{
|
||||
QString version = heimdallProcess.readAll();
|
||||
|
||||
if (version.length() > 0)
|
||||
{
|
||||
if (version.at(0) == QChar('v'))
|
||||
version = version.mid(1);
|
||||
|
||||
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", "Version " + version + "<br />"));
|
||||
}
|
||||
}
|
||||
|
||||
void AboutForm::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
UNUSED(exitCode);
|
||||
UNUSED(exitStatus);
|
||||
|
||||
// If for some reason %HEIMDALL-VERSION% hasn't been replaced yet, we'll replace it with an empty string.
|
||||
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", ""));
|
||||
}
|
||||
|
||||
void AboutForm::HandleHeimdallError(QProcess::ProcessError error)
|
||||
{
|
||||
UNUSED(error);
|
||||
|
||||
heimdallFailed = true;
|
||||
}
|
||||
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
// Qt
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "aboutform.h"
|
||||
|
||||
#include <QStringList>
|
||||
|
||||
#define UNUSED(x) (void)(x)
|
||||
|
||||
using namespace HeimdallFrontend;
|
||||
|
||||
AboutForm::AboutForm(QWidget *parent) : QWidget(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
|
||||
// Heimdall Command Line
|
||||
QObject::connect(&heimdallProcess, SIGNAL(readyRead()), this, SLOT(HandleHeimdallStdout()));
|
||||
QObject::connect(&heimdallProcess, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(HandleHeimdallReturned(int, QProcess::ExitStatus)));
|
||||
QObject::connect(&heimdallProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(HandleHeimdallError(QProcess::ProcessError)));
|
||||
|
||||
heimdallFailed = false;
|
||||
|
||||
RetrieveHeimdallVersion();
|
||||
}
|
||||
|
||||
void AboutForm::RetrieveHeimdallVersion(void)
|
||||
{
|
||||
heimdallProcess.setReadChannel(QProcess::StandardOutput);
|
||||
|
||||
heimdallProcess.start("heimdall", QStringList("version"));
|
||||
heimdallProcess.waitForFinished(350);
|
||||
|
||||
// OS X was playing up and not finding heimdall, so we're manually checking the PATH.
|
||||
if (heimdallFailed)
|
||||
{
|
||||
QStringList environment = QProcess::systemEnvironment();
|
||||
|
||||
QStringList paths;
|
||||
|
||||
// Ensure /usr/bin is in PATH
|
||||
for (int i = 0; i < environment.length(); i++)
|
||||
{
|
||||
if (environment[i].left(5) == "PATH=")
|
||||
{
|
||||
paths = environment[i].mid(5).split(':');
|
||||
paths.prepend("/usr/bin");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int pathIndex = -1;
|
||||
|
||||
while (heimdallFailed && ++pathIndex < paths.length())
|
||||
{
|
||||
QString heimdallPath = paths[pathIndex];
|
||||
|
||||
if (heimdallPath.length() > 0)
|
||||
{
|
||||
heimdallFailed = false;
|
||||
|
||||
if (heimdallPath[heimdallPath.length() - 1] != QDir::separator())
|
||||
heimdallPath += QDir::separator();
|
||||
|
||||
heimdallPath += "heimdall";
|
||||
|
||||
heimdallProcess.start(heimdallPath, QStringList("version"));
|
||||
heimdallProcess.waitForFinished(350);
|
||||
}
|
||||
}
|
||||
|
||||
if (heimdallFailed)
|
||||
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", ""));
|
||||
}
|
||||
}
|
||||
|
||||
void AboutForm::HandleHeimdallStdout(void)
|
||||
{
|
||||
QString version = heimdallProcess.readAll();
|
||||
|
||||
if (version.length() > 0)
|
||||
{
|
||||
if (version.at(0) == QChar('v'))
|
||||
version = version.mid(1);
|
||||
|
||||
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", "Version " + version + "<br />"));
|
||||
}
|
||||
}
|
||||
|
||||
void AboutForm::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
|
||||
{
|
||||
UNUSED(exitCode);
|
||||
UNUSED(exitStatus);
|
||||
|
||||
// If for some reason %HEIMDALL-VERSION% hasn't been replaced yet, we'll replace it with an empty string.
|
||||
versionCopyrightLabel->setText(versionCopyrightLabel->text().replace("%HEIMDALL-VERSION%", ""));
|
||||
}
|
||||
|
||||
void AboutForm::HandleHeimdallError(QProcess::ProcessError error)
|
||||
{
|
||||
UNUSED(error);
|
||||
|
||||
heimdallFailed = true;
|
||||
}
|
||||
|
|
@ -1,52 +1,58 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
// Qt
|
||||
#include <QProcess>
|
||||
#include <QWidget>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "ui_aboutform.h"
|
||||
|
||||
namespace HeimdallFrontend
|
||||
{
|
||||
class AboutForm : public QWidget, public Ui::AboutForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
|
||||
bool heimdallFailed;
|
||||
QProcess heimdallProcess;
|
||||
|
||||
void RetrieveHeimdallVersion(void);
|
||||
|
||||
public:
|
||||
|
||||
explicit AboutForm(QWidget *parent = 0);
|
||||
|
||||
public slots:
|
||||
|
||||
// Heimdall Command Line
|
||||
void HandleHeimdallStdout(void);
|
||||
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void HandleHeimdallError(QProcess::ProcessError error);
|
||||
};
|
||||
}
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ABOUTFORM_H
|
||||
#define ABOUTFORM_H
|
||||
|
||||
// Qt
|
||||
#include <QProcess>
|
||||
#include <QWidget>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "ui_aboutform.h"
|
||||
|
||||
namespace HeimdallFrontend
|
||||
{
|
||||
class AboutForm : public QWidget, public Ui::AboutForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
|
||||
bool heimdallFailed;
|
||||
QProcess heimdallProcess;
|
||||
|
||||
void RetrieveHeimdallVersion(void);
|
||||
|
||||
public:
|
||||
|
||||
explicit AboutForm(QWidget *parent = 0);
|
||||
|
||||
public slots:
|
||||
|
||||
// Heimdall Command Line
|
||||
void HandleHeimdallStdout(void);
|
||||
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void HandleHeimdallError(QProcess::ProcessError error);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,37 +1,42 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
// Qt
|
||||
#include <QtGui/QApplication>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "mainwindow.h"
|
||||
|
||||
using namespace HeimdallFrontend;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication application(argc, argv);
|
||||
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
||||
return (application.exec());
|
||||
}
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
// Qt
|
||||
#include <QApplication>
|
||||
#include <QtPlugin>
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "mainwindow.h"
|
||||
|
||||
#if defined(QT_STATIC)
|
||||
Q_IMPORT_PLUGIN (QWindowsIntegrationPlugin);
|
||||
#endif
|
||||
|
||||
using namespace HeimdallFrontend;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication application(argc, argv);
|
||||
|
||||
MainWindow window;
|
||||
window.show();
|
||||
|
||||
return (application.exec());
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,183 +1,206 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
// Qt
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QProcess>
|
||||
#include <QTemporaryFile>
|
||||
|
||||
// libpit
|
||||
#include "libpit.h"
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "aboutform.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "PackageData.h"
|
||||
|
||||
using namespace libpit;
|
||||
|
||||
namespace HeimdallFrontend
|
||||
{
|
||||
class MainWindow : public QMainWindow, public Ui::MainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
|
||||
enum class HeimdallState
|
||||
{
|
||||
Stopped = 0,
|
||||
Flashing,
|
||||
DetectingDevice,
|
||||
ClosingPcScreen,
|
||||
PrintingPit,
|
||||
DownloadingPit
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kPrintPitSourceDevice = 0,
|
||||
kPrintPitSourceLocalFile
|
||||
};
|
||||
|
||||
AboutForm aboutForm;
|
||||
|
||||
QString lastDirectory;
|
||||
|
||||
int tabIndex;
|
||||
|
||||
bool heimdallFailed;
|
||||
HeimdallState heimdallState;
|
||||
QProcess heimdallProcess;
|
||||
|
||||
PackageData loadedPackageData;
|
||||
|
||||
PitData currentPitData;
|
||||
PackageData workingPackageData;
|
||||
|
||||
bool populatingPartitionNames;
|
||||
QList<unsigned int> unusedPartitionIds;
|
||||
|
||||
bool verboseOutput;
|
||||
bool resume;
|
||||
|
||||
|
||||
void StartHeimdall(const QStringList& arguments);
|
||||
|
||||
void UpdateUnusedPartitionIds(void);
|
||||
bool ReadPit(QFile *file);
|
||||
|
||||
void UpdatePackageUserInterface(void);
|
||||
|
||||
bool IsArchive(QString path);
|
||||
|
||||
QString PromptFileSelection(const QString& caption = QString("Select File"), const QString& filter = QString());
|
||||
QString PromptFileCreation(const QString& caption = QString("Save File"), const QString& filter = QString());
|
||||
|
||||
void UpdateLoadPackageInterfaceAvailability(void);
|
||||
void UpdateFlashInterfaceAvailability(void);
|
||||
void UpdateCreatePackageInterfaceAvailability(void);
|
||||
void UpdateUtilitiesInterfaceAvailability(void);
|
||||
void UpdateInterfaceAvailability(void);
|
||||
|
||||
void UpdatePartitionNamesInterface(void);
|
||||
|
||||
public:
|
||||
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
|
||||
void OpenDonationWebpage(void);
|
||||
void SetVerboseOutput(bool enabled);
|
||||
void ShowAbout(void);
|
||||
|
||||
void FunctionTabChanged(int index);
|
||||
|
||||
// Load Package Tab
|
||||
void SelectFirmwarePackage(void);
|
||||
void OpenDeveloperHomepage(void);
|
||||
void OpenDeveloperDonationWebpage(void);
|
||||
void LoadFirmwarePackage(void);
|
||||
|
||||
// Flash Tab
|
||||
void SelectPartitionName(int index);
|
||||
void SelectPartitionFile(void);
|
||||
|
||||
void SelectPartition(int row);
|
||||
void AddPartition(void);
|
||||
void RemovePartition(void);
|
||||
|
||||
void SelectPit(void);
|
||||
|
||||
void SetRepartition(int enabled);
|
||||
|
||||
void SetNoReboot(int enabled);
|
||||
void SetResume(bool enabled);
|
||||
void SetResume(int enabled);
|
||||
|
||||
void StartFlash(void);
|
||||
|
||||
// Create Package Tab
|
||||
void FirmwareNameChanged(const QString& text);
|
||||
void FirmwareVersionChanged(const QString& text);
|
||||
void PlatformNameChanged(const QString& text);
|
||||
void PlatformVersionChanged(const QString& text);
|
||||
|
||||
void HomepageUrlChanged(const QString& text);
|
||||
void DonateUrlChanged(const QString& text);
|
||||
|
||||
void DeveloperNameChanged(const QString& text);
|
||||
void SelectDeveloper(int row);
|
||||
void AddDeveloper(void);
|
||||
void RemoveDeveloper(void);
|
||||
|
||||
void DeviceInfoChanged(const QString& text);
|
||||
void SelectDevice(int row);
|
||||
void AddDevice(void);
|
||||
void RemoveDevice(void);
|
||||
|
||||
void BuildPackage(void);
|
||||
|
||||
// Utilities Tab
|
||||
void DetectDevice(void);
|
||||
void ClosePcScreen(void);
|
||||
|
||||
void SelectPitDestination(void);
|
||||
void DownloadPit(void);
|
||||
|
||||
void DevicePrintPitToggled(bool checked);
|
||||
void LocalFilePrintPitToggled(bool checked);
|
||||
void SelectPrintPitFile(void);
|
||||
void PrintPit(void);
|
||||
|
||||
// Heimdall Command Line
|
||||
void HandleHeimdallStdout(void);
|
||||
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void HandleHeimdallError(QProcess::ProcessError error);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
// Qt
|
||||
#include <QList>
|
||||
#include <QMainWindow>
|
||||
#include <QProcess>
|
||||
#include <QTemporaryFile>
|
||||
|
||||
// libpit
|
||||
#include "libpit.h"
|
||||
|
||||
// Heimdall Frontend
|
||||
#include "aboutform.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "PackageData.h"
|
||||
|
||||
using namespace libpit;
|
||||
|
||||
namespace HeimdallFrontend
|
||||
{
|
||||
enum class HeimdallState : int
|
||||
{
|
||||
Stopped = 1,
|
||||
Flashing = (int)Stopped << 1,
|
||||
DetectingDevice = (int)Flashing << 1,
|
||||
ClosingPcScreen = (int)DetectingDevice << 1,
|
||||
PrintingPit = (int)ClosingPcScreen << 1,
|
||||
DownloadingPit = (int)PrintingPit << 1,
|
||||
NoReboot = (int)DownloadingPit << 1
|
||||
};
|
||||
|
||||
inline HeimdallState operator|(HeimdallState lhs, HeimdallState rhs)
|
||||
{
|
||||
return (HeimdallState)((int)lhs | (int)rhs);
|
||||
}
|
||||
|
||||
inline HeimdallState& operator|=(HeimdallState& lhs, HeimdallState rhs)
|
||||
{
|
||||
lhs = lhs | rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
inline HeimdallState operator&(HeimdallState lhs, HeimdallState rhs)
|
||||
{
|
||||
lhs = (HeimdallState)((int)lhs & (int)rhs);
|
||||
return lhs;
|
||||
}
|
||||
|
||||
inline bool operator!(HeimdallState state)
|
||||
{
|
||||
return (int)state == 0;
|
||||
}
|
||||
|
||||
class MainWindow : public QMainWindow, public Ui::MainWindow
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
|
||||
enum
|
||||
{
|
||||
kPrintPitSourceDevice = 0,
|
||||
kPrintPitSourceLocalFile
|
||||
};
|
||||
|
||||
AboutForm aboutForm;
|
||||
|
||||
QString lastDirectory;
|
||||
|
||||
int tabIndex;
|
||||
|
||||
bool heimdallFailed;
|
||||
HeimdallState heimdallState;
|
||||
QProcess heimdallProcess;
|
||||
|
||||
PackageData loadedPackageData;
|
||||
|
||||
PitData currentPitData;
|
||||
PackageData workingPackageData;
|
||||
|
||||
bool populatingPartitionNames;
|
||||
QList<unsigned int> unusedPartitionIds;
|
||||
|
||||
bool verboseOutput;
|
||||
bool resume;
|
||||
|
||||
|
||||
void StartHeimdall(const QStringList& arguments);
|
||||
|
||||
void UpdateUnusedPartitionIds(void);
|
||||
bool ReadPit(QFile *file);
|
||||
|
||||
void UpdatePackageUserInterface(void);
|
||||
|
||||
bool IsArchive(QString path);
|
||||
|
||||
QString PromptFileSelection(const QString& caption = QString("Select File"), const QString& filter = QString());
|
||||
QString PromptFileCreation(const QString& caption = QString("Save File"), const QString& filter = QString());
|
||||
|
||||
void UpdateLoadPackageInterfaceAvailability(void);
|
||||
void UpdateFlashInterfaceAvailability(void);
|
||||
void UpdateCreatePackageInterfaceAvailability(void);
|
||||
void UpdateUtilitiesInterfaceAvailability(void);
|
||||
void UpdateInterfaceAvailability(void);
|
||||
|
||||
void UpdatePartitionNamesInterface(void);
|
||||
|
||||
public:
|
||||
|
||||
explicit MainWindow(QWidget *parent = 0);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
|
||||
void OpenDonationWebpage(void);
|
||||
void SetVerboseOutput(bool enabled);
|
||||
void ShowAbout(void);
|
||||
|
||||
void FunctionTabChanged(int index);
|
||||
|
||||
// Load Package Tab
|
||||
void SelectFirmwarePackage(void);
|
||||
void OpenDeveloperHomepage(void);
|
||||
void OpenDeveloperDonationWebpage(void);
|
||||
void LoadFirmwarePackage(void);
|
||||
|
||||
// Flash Tab
|
||||
void SelectPartitionName(int index);
|
||||
void SelectPartitionFile(void);
|
||||
|
||||
void SelectPartition(int row);
|
||||
void AddPartition(void);
|
||||
void RemovePartition(void);
|
||||
|
||||
void SelectPit(void);
|
||||
|
||||
void SetRepartition(int enabled);
|
||||
|
||||
void SetNoReboot(int enabled);
|
||||
void SetResume(bool enabled);
|
||||
void SetResume(int enabled);
|
||||
|
||||
void StartFlash(void);
|
||||
|
||||
// Create Package Tab
|
||||
void FirmwareNameChanged(const QString& text);
|
||||
void FirmwareVersionChanged(const QString& text);
|
||||
void PlatformNameChanged(const QString& text);
|
||||
void PlatformVersionChanged(const QString& text);
|
||||
|
||||
void HomepageUrlChanged(const QString& text);
|
||||
void DonateUrlChanged(const QString& text);
|
||||
|
||||
void DeveloperNameChanged(const QString& text);
|
||||
void SelectDeveloper(int row);
|
||||
void AddDeveloper(void);
|
||||
void RemoveDeveloper(void);
|
||||
|
||||
void DeviceInfoChanged(const QString& text);
|
||||
void SelectDevice(int row);
|
||||
void AddDevice(void);
|
||||
void RemoveDevice(void);
|
||||
|
||||
void BuildPackage(void);
|
||||
|
||||
// Utilities Tab
|
||||
void DetectDevice(void);
|
||||
void ClosePcScreen(void);
|
||||
|
||||
void SelectPitDestination(void);
|
||||
void DownloadPit(void);
|
||||
|
||||
void DevicePrintPitToggled(bool checked);
|
||||
void LocalFilePrintPitToggled(bool checked);
|
||||
void SelectPrintPitFile(void);
|
||||
void PrintPit(void);
|
||||
|
||||
// Heimdall Command Line
|
||||
void HandleHeimdallStdout(void);
|
||||
void HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void HandleHeimdallError(QProcess::ProcessError error);
|
||||
};
|
||||
}
|
||||
|
||||
#endif // MAINWINDOW_H
|
|
@ -0,0 +1,80 @@
|
|||
cmake_minimum_required(VERSION 3.0.0)
|
||||
|
||||
project(heimdall)
|
||||
|
||||
find_package(libusb REQUIRED)
|
||||
|
||||
set(LIBPIT_INCLUDE_DIRS
|
||||
../libpit/source)
|
||||
|
||||
if(APPLE)
|
||||
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libc++")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lobjc -framework IOKit -framework CoreFoundation")
|
||||
endif()
|
||||
|
||||
if(MINGW)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++ -static")
|
||||
endif(MINGW)
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
add_definitions(-DOS_LINUX)
|
||||
endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
|
||||
include_directories(SYSTEM ${LIBUSB_INCLUDE_DIRS})
|
||||
|
||||
include_directories(${LIBPIT_INCLUDE_DIRS})
|
||||
|
||||
set(HEIMDALL_SOURCE_FILES
|
||||
source/Arguments.cpp
|
||||
source/BridgeManager.cpp
|
||||
source/ClosePcScreenAction.cpp
|
||||
source/DetectAction.cpp
|
||||
source/DownloadPitAction.cpp
|
||||
source/FlashAction.cpp
|
||||
source/HelpAction.cpp
|
||||
source/InfoAction.cpp
|
||||
source/Interface.cpp
|
||||
source/main.cpp
|
||||
source/PrintPitAction.cpp
|
||||
source/Utility.cpp
|
||||
source/VersionAction.cpp)
|
||||
|
||||
include(CheckSymbolExists)
|
||||
|
||||
#
|
||||
# Large file support on UN*X, a/k/a LFS.
|
||||
#
|
||||
# On Windows, we require _fseeki64() and _ftelli64(). Visual Studio
|
||||
# has had supported them since Visual Studio 2005/MSVCR80.
|
||||
#
|
||||
if(NOT WIN32)
|
||||
include(FindLFS)
|
||||
if(LFS_FOUND)
|
||||
#
|
||||
# Add the required #defines.
|
||||
#
|
||||
add_definitions(${LFS_DEFINITIONS})
|
||||
endif()
|
||||
|
||||
#
|
||||
# Check for fseeko as well.
|
||||
#
|
||||
include(FindFseeko)
|
||||
if(FSEEKO_FOUND)
|
||||
set(HAVE_FSEEKO ON)
|
||||
|
||||
#
|
||||
# Add the required #defines.
|
||||
#
|
||||
add_definitions(${FSEEKO_DEFINITIONS})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(heimdall ${HEIMDALL_SOURCE_FILES})
|
||||
target_compile_features(heimdall PRIVATE cxx_std_11)
|
||||
|
||||
target_link_libraries(heimdall PRIVATE pit)
|
||||
target_link_libraries(heimdall PRIVATE ${LIBUSB_LIBRARIES})
|
||||
install (TARGETS heimdall
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
|
@ -1,41 +0,0 @@
|
|||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
AM_CPPFLAGS = $(DEPS_CFLAGS) -std=c++0x -I../libpit/Source
|
||||
STATIC_LIBS = ../libpit/libpit-1.4.a
|
||||
|
||||
bin_PROGRAMS = heimdall
|
||||
heimdall_SOURCES = source/Arguments.cpp \
|
||||
source/BridgeManager.cpp \
|
||||
source/ClosePcScreenAction.cpp \
|
||||
source/DetectAction.cpp \
|
||||
source/DownloadPitAction.cpp \
|
||||
source/FlashAction.cpp \
|
||||
source/HelpAction.cpp \
|
||||
source/InfoAction.cpp \
|
||||
source/Interface.cpp \
|
||||
source/main.cpp \
|
||||
source/PrintPitAction.cpp \
|
||||
source/Utility.cpp \
|
||||
source/VersionAction.cpp
|
||||
|
||||
heimdall_LDADD = $(DEPS_LIBS) $(STATIC_LIBS)
|
||||
|
||||
if LINUXTARGET
|
||||
|
||||
udevrulesdir = ${libdir}/udev/rules.d
|
||||
udevrules_DATA = 60-heimdall.rules
|
||||
|
||||
install-data-hook:
|
||||
@echo ""
|
||||
@echo "IMPORTANT - You must reboot your machine or execute the following as root:"
|
||||
|
||||
if UDEVADM
|
||||
@echo "udevadm control --reload-rules"
|
||||
else
|
||||
@echo "service udev restart"
|
||||
endif
|
||||
@echo ""
|
||||
|
||||
endif
|
||||
|
||||
dist_noinst_SCRIPTS = autogen.sh
|
|
@ -1,958 +0,0 @@
|
|||
# Makefile.in generated by automake 1.13.2 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
target_triplet = @target@
|
||||
bin_PROGRAMS = heimdall$(EXEEXT)
|
||||
subdir = .
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in $(dist_noinst_SCRIPTS) depcomp ar-lib \
|
||||
config.guess config.sub install-sh missing ltmain.sh
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(udevrulesdir)"
|
||||
PROGRAMS = $(bin_PROGRAMS)
|
||||
am__dirstamp = $(am__leading_dot)dirstamp
|
||||
am_heimdall_OBJECTS = source/Arguments.$(OBJEXT) \
|
||||
source/BridgeManager.$(OBJEXT) \
|
||||
source/ClosePcScreenAction.$(OBJEXT) \
|
||||
source/DetectAction.$(OBJEXT) \
|
||||
source/DownloadPitAction.$(OBJEXT) \
|
||||
source/FlashAction.$(OBJEXT) source/HelpAction.$(OBJEXT) \
|
||||
source/InfoAction.$(OBJEXT) source/Interface.$(OBJEXT) \
|
||||
source/main.$(OBJEXT) source/PrintPitAction.$(OBJEXT) \
|
||||
source/Utility.$(OBJEXT) source/VersionAction.$(OBJEXT)
|
||||
heimdall_OBJECTS = $(am_heimdall_OBJECTS)
|
||||
am__DEPENDENCIES_1 =
|
||||
heimdall_DEPENDENCIES = $(am__DEPENDENCIES_1) $(STATIC_LIBS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
SCRIPTS = $(dist_noinst_SCRIPTS)
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@
|
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CXXFLAGS) $(CXXFLAGS)
|
||||
AM_V_CXX = $(am__v_CXX_@AM_V@)
|
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
|
||||
am__v_CXX_0 = @echo " CXX " $@;
|
||||
am__v_CXX_1 =
|
||||
CXXLD = $(CXX)
|
||||
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
|
||||
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
|
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
|
||||
am__v_CXXLD_0 = @echo " CXXLD " $@;
|
||||
am__v_CXXLD_1 =
|
||||
SOURCES = $(heimdall_SOURCES)
|
||||
DIST_SOURCES = $(heimdall_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||
am__install_max = 40
|
||||
am__nobase_strip_setup = \
|
||||
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||
am__nobase_strip = \
|
||||
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||
am__nobase_list = $(am__nobase_strip_setup); \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||
if (++n[$$2] == $(am__install_max)) \
|
||||
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||
END { for (dir in files) print dir, files[dir] }'
|
||||
am__base_list = \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||
am__uninstall_files_from_dir = { \
|
||||
test -z "$$files" \
|
||||
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|
||||
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
|
||||
$(am__cd) "$$dir" && rm -f $$files; }; \
|
||||
}
|
||||
DATA = $(udevrules_DATA)
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
AM_RECURSIVE_TARGETS = cscope
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DEPS_CFLAGS = @DEPS_CFLAGS@
|
||||
DEPS_LIBS = @DEPS_LIBS@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FGREP = @FGREP@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PKG_CONFIG = @PKG_CONFIG@
|
||||
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target = @target@
|
||||
target_alias = @target_alias@
|
||||
target_cpu = @target_cpu@
|
||||
target_os = @target_os@
|
||||
target_vendor = @target_vendor@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
udevadminstalled = @udevadminstalled@
|
||||
AUTOMAKE_OPTIONS = subdir-objects
|
||||
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
|
||||
AM_CPPFLAGS = $(DEPS_CFLAGS) -std=c++0x -I../libpit/Source
|
||||
STATIC_LIBS = ../libpit/libpit-1.4.a
|
||||
heimdall_SOURCES = source/Arguments.cpp \
|
||||
source/BridgeManager.cpp \
|
||||
source/ClosePcScreenAction.cpp \
|
||||
source/DetectAction.cpp \
|
||||
source/DownloadPitAction.cpp \
|
||||
source/FlashAction.cpp \
|
||||
source/HelpAction.cpp \
|
||||
source/InfoAction.cpp \
|
||||
source/Interface.cpp \
|
||||
source/main.cpp \
|
||||
source/PrintPitAction.cpp \
|
||||
source/Utility.cpp \
|
||||
source/VersionAction.cpp
|
||||
|
||||
heimdall_LDADD = $(DEPS_LIBS) $(STATIC_LIBS)
|
||||
@LINUXTARGET_TRUE@udevrulesdir = ${libdir}/udev/rules.d
|
||||
@LINUXTARGET_TRUE@udevrules_DATA = 60-heimdall.rules
|
||||
dist_noinst_SCRIPTS = autogen.sh
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .cpp .lo .o .obj
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi
|
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
install-binPROGRAMS: $(bin_PROGRAMS)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
|| test -f $$p1 \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done
|
||||
|
||||
uninstall-binPROGRAMS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files
|
||||
|
||||
clean-binPROGRAMS:
|
||||
@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list || exit $$?; \
|
||||
test -n "$(EXEEXT)" || exit 0; \
|
||||
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
|
||||
echo " rm -f" $$list; \
|
||||
rm -f $$list
|
||||
source/$(am__dirstamp):
|
||||
@$(MKDIR_P) source
|
||||
@: > source/$(am__dirstamp)
|
||||
source/$(DEPDIR)/$(am__dirstamp):
|
||||
@$(MKDIR_P) source/$(DEPDIR)
|
||||
@: > source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/Arguments.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/BridgeManager.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/ClosePcScreenAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/DetectAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/DownloadPitAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/FlashAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/HelpAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/InfoAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/Interface.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/main.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/PrintPitAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/Utility.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
source/VersionAction.$(OBJEXT): source/$(am__dirstamp) \
|
||||
source/$(DEPDIR)/$(am__dirstamp)
|
||||
|
||||
heimdall$(EXEEXT): $(heimdall_OBJECTS) $(heimdall_DEPENDENCIES) $(EXTRA_heimdall_DEPENDENCIES)
|
||||
@rm -f heimdall$(EXEEXT)
|
||||
$(AM_V_CXXLD)$(CXXLINK) $(heimdall_OBJECTS) $(heimdall_LDADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
-rm -f source/*.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/Arguments.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/BridgeManager.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/ClosePcScreenAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/DetectAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/DownloadPitAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/FlashAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/HelpAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/InfoAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/Interface.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/PrintPitAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/Utility.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/VersionAction.Po@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@source/$(DEPDIR)/main.Po@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
|
||||
|
||||
.cpp.obj:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.cpp.lo:
|
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
|
||||
@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
|
||||
@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
install-udevrulesDATA: $(udevrules_DATA)
|
||||
@$(NORMAL_INSTALL)
|
||||
@list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(udevrulesdir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(udevrulesdir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
echo "$$d$$p"; \
|
||||
done | $(am__base_list) | \
|
||||
while read files; do \
|
||||
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(udevrulesdir)'"; \
|
||||
$(INSTALL_DATA) $$files "$(DESTDIR)$(udevrulesdir)" || exit $$?; \
|
||||
done
|
||||
|
||||
uninstall-udevrulesDATA:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(udevrules_DATA)'; test -n "$(udevrulesdir)" || list=; \
|
||||
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||
dir='$(DESTDIR)$(udevrulesdir)'; $(am__uninstall_files_from_dir)
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(DATA) config.h
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(udevrulesdir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-rm -f source/$(DEPDIR)/$(am__dirstamp)
|
||||
-rm -f source/$(am__dirstamp)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
@LINUXTARGET_FALSE@install-data-hook:
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf source/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-udevrulesDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
$(MAKE) $(AM_MAKEFLAGS) install-data-hook
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am: install-binPROGRAMS
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -rf source/$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binPROGRAMS uninstall-udevrulesDATA
|
||||
|
||||
.MAKE: all install-am install-data-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \
|
||||
clean-binPROGRAMS clean-cscope clean-generic clean-libtool \
|
||||
cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-libtool distclean-tags distcleancheck \
|
||||
distdir distuninstallcheck dvi dvi-am html html-am info \
|
||||
info-am install install-am install-binPROGRAMS install-data \
|
||||
install-data-am install-data-hook install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
install-udevrulesDATA installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
|
||||
pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \
|
||||
uninstall-binPROGRAMS uninstall-udevrulesDATA
|
||||
|
||||
|
||||
@LINUXTARGET_TRUE@install-data-hook:
|
||||
@LINUXTARGET_TRUE@ @echo ""
|
||||
@LINUXTARGET_TRUE@ @echo "IMPORTANT - You must reboot your machine or execute the following as root:"
|
||||
|
||||
@LINUXTARGET_TRUE@@UDEVADM_TRUE@ @echo "udevadm control --reload-rules"
|
||||
@LINUXTARGET_TRUE@@UDEVADM_FALSE@ @echo "service udev restart"
|
||||
@LINUXTARGET_TRUE@ @echo ""
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
File diff suppressed because it is too large
Load Diff
270
heimdall/ar-lib
270
heimdall/ar-lib
|
@ -1,270 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for Microsoft lib.exe
|
||||
|
||||
me=ar-lib
|
||||
scriptversion=2012-03-01.08; # UTC
|
||||
|
||||
# Copyright (C) 2010-2013 Free Software Foundation, Inc.
|
||||
# Written by Peter Rosin <peda@lysator.liu.se>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
|
||||
# func_error message
|
||||
func_error ()
|
||||
{
|
||||
echo "$me: $1" 1>&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv in
|
||||
mingw)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_at_file at_file operation archive
|
||||
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
|
||||
# for each of them.
|
||||
# When interpreting the content of the @FILE, do NOT use func_file_conv,
|
||||
# since the user would need to supply preconverted file names to
|
||||
# binutils ar, at least for MinGW.
|
||||
func_at_file ()
|
||||
{
|
||||
operation=$2
|
||||
archive=$3
|
||||
at_file_contents=`cat "$1"`
|
||||
eval set x "$at_file_contents"
|
||||
shift
|
||||
|
||||
for member
|
||||
do
|
||||
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
|
||||
done
|
||||
}
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
func_error "no command. Try '$0 --help' for more information."
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<EOF
|
||||
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
|
||||
|
||||
Members may be specified in a file named with @FILE.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "$me, version $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
if test $# -lt 3; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
|
||||
AR=$1
|
||||
shift
|
||||
while :
|
||||
do
|
||||
if test $# -lt 2; then
|
||||
func_error "you must specify a program, an action and an archive"
|
||||
fi
|
||||
case $1 in
|
||||
-lib | -LIB \
|
||||
| -ltcg | -LTCG \
|
||||
| -machine* | -MACHINE* \
|
||||
| -subsystem* | -SUBSYSTEM* \
|
||||
| -verbose | -VERBOSE \
|
||||
| -wx* | -WX* )
|
||||
AR="$AR $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
action=$1
|
||||
shift
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
orig_archive=$1
|
||||
shift
|
||||
func_file_conv "$orig_archive"
|
||||
archive=$file
|
||||
|
||||
# strip leading dash in $action
|
||||
action=${action#-}
|
||||
|
||||
delete=
|
||||
extract=
|
||||
list=
|
||||
quick=
|
||||
replace=
|
||||
index=
|
||||
create=
|
||||
|
||||
while test -n "$action"
|
||||
do
|
||||
case $action in
|
||||
d*) delete=yes ;;
|
||||
x*) extract=yes ;;
|
||||
t*) list=yes ;;
|
||||
q*) quick=yes ;;
|
||||
r*) replace=yes ;;
|
||||
s*) index=yes ;;
|
||||
S*) ;; # the index is always updated implicitly
|
||||
c*) create=yes ;;
|
||||
u*) ;; # TODO: don't ignore the update modifier
|
||||
v*) ;; # TODO: don't ignore the verbose modifier
|
||||
*)
|
||||
func_error "unknown action specified"
|
||||
;;
|
||||
esac
|
||||
action=${action#?}
|
||||
done
|
||||
|
||||
case $delete$extract$list$quick$replace,$index in
|
||||
yes,* | ,yes)
|
||||
;;
|
||||
yesyes*)
|
||||
func_error "more than one action specified"
|
||||
;;
|
||||
*)
|
||||
func_error "no action specified"
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$delete"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -REMOVE "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
elif test -n "$extract"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
if test $# -gt 0; then
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_at_file "${1#@}" -EXTRACT "$archive"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
|
||||
;;
|
||||
esac
|
||||
done
|
||||
else
|
||||
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
|
||||
do
|
||||
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
|
||||
done
|
||||
fi
|
||||
|
||||
elif test -n "$quick$replace"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
if test -z "$create"; then
|
||||
echo "$me: creating $orig_archive"
|
||||
fi
|
||||
orig_archive=
|
||||
else
|
||||
orig_archive=$archive
|
||||
fi
|
||||
|
||||
for member
|
||||
do
|
||||
case $1 in
|
||||
@*)
|
||||
func_file_conv "${1#@}"
|
||||
set x "$@" "@$file"
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$1"
|
||||
set x "$@" "$file"
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
shift
|
||||
done
|
||||
|
||||
if test -n "$orig_archive"; then
|
||||
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
|
||||
else
|
||||
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
|
||||
fi
|
||||
|
||||
elif test -n "$list"; then
|
||||
if test ! -f "$orig_archive"; then
|
||||
func_error "archive not found"
|
||||
fi
|
||||
$AR -NOLOGO -LIST "$archive" || exit $?
|
||||
fi
|
|
@ -1,3 +0,0 @@
|
|||
#!/bin/sh
|
||||
autoreconf --force --install
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,80 +0,0 @@
|
|||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
/* Define if building universal (internal helper macro) */
|
||||
#undef AC_APPLE_UNIVERSAL_BUILD
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#undef HAVE_DLFCN_H
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#undef HAVE_STDLIB_H
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#undef HAVE_STRINGS_H
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#undef HAVE_STRING_H
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#undef HAVE_SYS_STAT_H
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#undef HAVE_SYS_TYPES_H
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define to the sub-directory in which libtool stores uninstalled libraries.
|
||||
*/
|
||||
#undef LT_OBJDIR
|
||||
|
||||
/* Darwin backend */
|
||||
#undef OS_DARWIN
|
||||
|
||||
/* Linux backend */
|
||||
#undef OS_LINUX
|
||||
|
||||
/* Windows backend */
|
||||
#undef OS_WINDOWS
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#undef PACKAGE_BUGREPORT
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#undef PACKAGE_NAME
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#undef PACKAGE_STRING
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#undef PACKAGE_TARNAME
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#undef PACKAGE_URL
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#undef PACKAGE_VERSION
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#undef STDC_HEADERS
|
||||
|
||||
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
|
||||
significant byte first (like Motorola and SPARC, unlike Intel). */
|
||||
#if defined AC_APPLE_UNIVERSAL_BUILD
|
||||
# if defined __BIG_ENDIAN__
|
||||
# define WORDS_BIGENDIAN 1
|
||||
# endif
|
||||
#else
|
||||
# ifndef WORDS_BIGENDIAN
|
||||
# undef WORDS_BIGENDIAN
|
||||
# endif
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,51 +0,0 @@
|
|||
AC_INIT([Heimdall], [1.4.0], [bug-report@glassechidna.com.au], [heimdall], [http://www.glassechidna.com.au/])
|
||||
AC_PREREQ([2.59])
|
||||
PKG_CHECK_MODULES([DEPS], [libusb-1.0 >= 1.0.8])
|
||||
AC_CHECK_PROG(udevadminstalled, udevadm, "yes")
|
||||
AC_CANONICAL_TARGET
|
||||
AM_INIT_AUTOMAKE([1.10 -Wall no-define foreign])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
AM_PROG_AR
|
||||
m4_pattern_allow([AM_PROG_PR], [AM_PROG_AR])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
AM_MAINTAINER_MODE
|
||||
|
||||
AC_MSG_CHECKING([operating system])
|
||||
case $target in
|
||||
*-linux*)
|
||||
AC_DEFINE(OS_LINUX, [], [Linux backend])
|
||||
AC_MSG_RESULT([Linux])
|
||||
AC_PROG_CXX
|
||||
linuxtarget=true
|
||||
;;
|
||||
*-darwin*)
|
||||
AC_DEFINE(OS_DARWIN, [], [Darwin backend])
|
||||
AC_MSG_RESULT([Darwin/MacOS X])
|
||||
AC_PROG_CXX
|
||||
linuxtarget=false
|
||||
;;
|
||||
*-mingw*)
|
||||
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_PROG_CXX
|
||||
linuxtarget=false
|
||||
;;
|
||||
*-cygwin*)
|
||||
AC_DEFINE(OS_WINDOWS, [], [Windows backend])
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_PROG_CXX
|
||||
linuxtarget=false
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([unsupported operating system])
|
||||
esac
|
||||
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
AM_CONDITIONAL([LINUXTARGET], [test x$linuxtarget = xtrue])
|
||||
AM_CONDITIONAL([UDEVADM], [test x$udevadminstalled = x"yes"])
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
AC_OUTPUT
|
790
heimdall/depcomp
790
heimdall/depcomp
|
@ -1,790 +0,0 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2012-10-18.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1 +0,0 @@
|
|||
Heimdall is a cross-platform open-source command line tool used to flash firmware (aka ROMs) onto Samsung Galaxy S devices. Heimdall Frontend is also available as the official graphical user interface for this tool.
|
|
@ -1,165 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{DC0D782C-8DB7-44CA-A984-D3A97483E0D0}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>heimdall</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\include;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<IncludePath>$(SolutionDir)libpit\Source;$(SolutionDir)libusb-1.0\libusb;$(IncludePath)</IncludePath>
|
||||
<LibraryPath>$(LibraryPath)</LibraryPath>
|
||||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;OS_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>..\libusbx-1.0\include;..\libpit\Source</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)libusbx-1.0\lib\$(Platform)\$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /y $(SolutionDir)libusbx-1.0\lib\$(Platform)\$(Configuration)\libusb-1.0.dll $(SolutionDir)$(Platform)\$(Configuration)\</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;OS_WINDOWS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<PrecompiledHeaderFile>
|
||||
</PrecompiledHeaderFile>
|
||||
<PrecompiledHeaderOutputFile>
|
||||
</PrecompiledHeaderOutputFile>
|
||||
<AdditionalIncludeDirectories>..\libusbx-1.0\include;..\libpit\Source</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalDependencies>libusb-1.0.lib;libpit.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<AdditionalLibraryDirectories>$(SolutionDir)libusbx-1.0\lib\$(Platform)\$(Configuration)\;$(SolutionDir)$(Platform)\$(Configuration)\lib\</AdditionalLibraryDirectories>
|
||||
</Link>
|
||||
<PostBuildEvent>
|
||||
<Command>xcopy /y $(SolutionDir)libusbx-1.0\lib\$(Platform)\$(Configuration)\libusb-1.0.dll $(SolutionDir)$(Platform)\$(Configuration)\</Command>
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="source\Arguments.h" />
|
||||
<ClInclude Include="source\BeginDumpPacket.h" />
|
||||
<ClInclude Include="source\BeginSessionPacket.h" />
|
||||
<ClInclude Include="source\BridgeManager.h" />
|
||||
<ClInclude Include="source\ClosePcScreenAction.h" />
|
||||
<ClInclude Include="source\DetectAction.h" />
|
||||
<ClInclude Include="source\DownloadPitAction.h" />
|
||||
<ClInclude Include="source\FlashAction.h" />
|
||||
<ClInclude Include="source\HelpAction.h" />
|
||||
<ClInclude Include="source\InfoAction.h" />
|
||||
<ClInclude Include="source\PrintPitAction.h" />
|
||||
<ClInclude Include="source\ControlPacket.h" />
|
||||
<ClInclude Include="source\DeviceTypePacket.h" />
|
||||
<ClInclude Include="source\FilePartSizePacket.h" />
|
||||
<ClInclude Include="source\SessionSetupPacket.h" />
|
||||
<ClInclude Include="source\SessionSetupResponse.h" />
|
||||
<ClInclude Include="source\DumpPartFileTransferPacket.h" />
|
||||
<ClInclude Include="source\DumpPartPitFilePacket.h" />
|
||||
<ClInclude Include="source\DumpResponse.h" />
|
||||
<ClInclude Include="source\EndFileTransferPacket.h" />
|
||||
<ClInclude Include="source\EndModemFileTransferPacket.h" />
|
||||
<ClInclude Include="source\EndPhoneFileTransferPacket.h" />
|
||||
<ClInclude Include="source\EndPitFileTransferPacket.h" />
|
||||
<ClInclude Include="source\FileTransferPacket.h" />
|
||||
<ClInclude Include="source\FlashPartFileTransferPacket.h" />
|
||||
<ClInclude Include="source\FlashPartPitFilePacket.h" />
|
||||
<ClInclude Include="source\Heimdall.h" />
|
||||
<ClInclude Include="source\InboundPacket.h" />
|
||||
<ClInclude Include="source\Interface.h" />
|
||||
<ClInclude Include="source\OutboundPacket.h" />
|
||||
<ClInclude Include="source\Packet.h" />
|
||||
<ClInclude Include="source\PitFilePacket.h" />
|
||||
<ClInclude Include="source\PitFileResponse.h" />
|
||||
<ClInclude Include="source\EndSessionPacket.h" />
|
||||
<ClInclude Include="source\ReceiveFilePartPacket.h" />
|
||||
<ClInclude Include="source\ResponsePacket.h" />
|
||||
<ClInclude Include="source\SendFilePartPacket.h" />
|
||||
<ClInclude Include="source\SendFilePartResponse.h" />
|
||||
<ClInclude Include="source\TotalBytesPacket.h" />
|
||||
<ClInclude Include="source\Utility.h" />
|
||||
<ClInclude Include="source\VersionAction.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="source\Arguments.cpp" />
|
||||
<ClCompile Include="source\BridgeManager.cpp" />
|
||||
<ClCompile Include="source\ClosePcScreenAction.cpp" />
|
||||
<ClCompile Include="source\DetectAction.cpp" />
|
||||
<ClCompile Include="source\DownloadPitAction.cpp" />
|
||||
<ClCompile Include="source\FlashAction.cpp" />
|
||||
<ClCompile Include="source\HelpAction.cpp" />
|
||||
<ClCompile Include="source\InfoAction.cpp" />
|
||||
<ClCompile Include="source\PrintPitAction.cpp" />
|
||||
<ClCompile Include="source\Interface.cpp" />
|
||||
<ClCompile Include="source\main.cpp" />
|
||||
<ClCompile Include="source\Utility.cpp" />
|
||||
<ClCompile Include="source\VersionAction.cpp" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
|
@ -1,187 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Source\Packets">
|
||||
<UniqueIdentifier>{7022245a-f8d3-4dd6-b0f4-9cca8f9bdd69}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source\Packets\Inbound">
|
||||
<UniqueIdentifier>{0da20d7b-9a83-4c5b-89ea-5f312268048a}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source\Packets\Outbound">
|
||||
<UniqueIdentifier>{586c7149-045a-407e-82b5-56e437d71e9b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source\Interface">
|
||||
<UniqueIdentifier>{e334486e-629c-47ed-b8e6-daa083a1d2df}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="source\BridgeManager.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Heimdall.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Packet.h">
|
||||
<Filter>Source\Packets</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\BeginDumpPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\BeginSessionPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\ControlPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\DeviceTypePacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\DumpPartFileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\DumpPartPitFilePacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\EndFileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\EndModemFileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\EndPhoneFileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\EndPitFileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\EndSessionPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\FilePartSizePacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\FileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\FlashPartFileTransferPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\FlashPartPitFilePacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\PitFilePacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\SendFilePartPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\SessionSetupPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\TotalBytesPacket.h">
|
||||
<Filter>Source\Packets\Outbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\DumpResponse.h">
|
||||
<Filter>Source\Packets\Inbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\PitFileResponse.h">
|
||||
<Filter>Source\Packets\Inbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\SendFilePartResponse.h">
|
||||
<Filter>Source\Packets\Inbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\SessionSetupResponse.h">
|
||||
<Filter>Source\Packets\Inbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\ReceiveFilePartPacket.h">
|
||||
<Filter>Source\Packets\Inbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\ResponsePacket.h">
|
||||
<Filter>Source\Packets\Inbound</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\InboundPacket.h">
|
||||
<Filter>Source\Packets</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\OutboundPacket.h">
|
||||
<Filter>Source\Packets</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Interface.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Arguments.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\PrintPitAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\DownloadPitAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\ClosePcScreenAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\FlashAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\Utility.h">
|
||||
<Filter>Source</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\DetectAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\InfoAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\HelpAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="source\VersionAction.h">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="source\BridgeManager.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\main.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Interface.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Arguments.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\PrintPitAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\DownloadPitAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\ClosePcScreenAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\FlashAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\Utility.cpp">
|
||||
<Filter>Source</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\DetectAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\InfoAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\HelpAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="source\VersionAction.cpp">
|
||||
<Filter>Source\Interface</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,527 +0,0 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2011-11-20.07; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
nl='
|
||||
'
|
||||
IFS=" "" $nl"
|
||||
|
||||
# set DOITPROG to echo to test this script
|
||||
|
||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
||||
doit=${DOITPROG-}
|
||||
if test -z "$doit"; then
|
||||
doit_exec=exec
|
||||
else
|
||||
doit_exec=$doit
|
||||
fi
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_glob='?'
|
||||
initialize_posix_glob='
|
||||
test "$posix_glob" != "?" || {
|
||||
if (set -f) 2>/dev/null; then
|
||||
posix_glob=
|
||||
else
|
||||
posix_glob=:
|
||||
fi
|
||||
}
|
||||
'
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
no_target_directory=
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *' '* | *'
|
||||
'* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t) dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) no_target_directory=true;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test -n "$no_target_directory"; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
# Prefer dirname, but fall back on a substitute if dirname fails.
|
||||
dstdir=`
|
||||
(dirname "$dst") 2>/dev/null ||
|
||||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
|
||||
X"$dst" : 'X\(//\)[^/]' \| \
|
||||
X"$dst" : 'X\(//\)$' \| \
|
||||
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
|
||||
echo X"$dst" |
|
||||
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)[^/].*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\/\)$/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
/^X\(\/\).*/{
|
||||
s//\1/
|
||||
q
|
||||
}
|
||||
s/.*/./; q'
|
||||
`
|
||||
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
eval "$initialize_posix_glob"
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
$posix_glob set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
$posix_glob set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
|
||||
eval "$initialize_posix_glob" &&
|
||||
$posix_glob set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
$posix_glob set +f &&
|
||||
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
9655
heimdall/ltmain.sh
9655
heimdall/ltmain.sh
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,384 +0,0 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
|
||||
# Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option `$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl `shared' nor `disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the `shared' and
|
||||
# `disable-shared' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the `static' and
|
||||
# `disable-static' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the `fast-install'
|
||||
# and `disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for pkg in $enableval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the `disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the `pic-only' and `no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
|
||||
for lt_pkg in $withval; do
|
||||
IFS="$lt_save_ifs"
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS="$lt_save_ifs"
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=default])
|
||||
|
||||
test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the `pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -1,123 +0,0 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59 which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -1,23 +0,0 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 3337 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.2])
|
||||
m4_define([LT_PACKAGE_REVISION], [1.3337])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.2'
|
||||
macro_revision='1.3337'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -1,98 +0,0 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
215
heimdall/missing
215
heimdall/missing
|
@ -1,215 +0,0 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2012-06-26.16; # UTC
|
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'automa4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
sudo echo "SUBSYSTEM==\"usb\", SYSFS{idVendor}==\"04e8\", SYSFS{idProduct}==\"6601\", MODE=\"0666\"" > /etc/udev/rules.d/60-heimdall-galaxy-s.rules
|
||||
sudo service udev reload
|
||||
exit 0
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/bin/sh
|
||||
sudo rm /etc/udev/rules.d/60-heimdall-galaxy-s.rules
|
||||
sudo service udev reload
|
||||
exit 0
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,72 +1,72 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef BEGINDUMPPACKET_H
|
||||
#define BEGINDUMPPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class BeginDumpPacket : public FileTransferPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kChipTypeRam = 0,
|
||||
kChipTypeNand = 1
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int chipType;
|
||||
unsigned int chipId;
|
||||
|
||||
public:
|
||||
|
||||
BeginDumpPacket(unsigned int chipType, unsigned int chipId) : FileTransferPacket(FileTransferPacket::kRequestDump)
|
||||
{
|
||||
this->chipType = chipType;
|
||||
this->chipId = chipId;
|
||||
}
|
||||
|
||||
unsigned int GetChipType(void) const
|
||||
{
|
||||
return (chipType);
|
||||
}
|
||||
|
||||
unsigned int GetChipId(void) const
|
||||
{
|
||||
return (chipId);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, chipType);
|
||||
PackInteger(FileTransferPacket::kDataSize + 4, chipId);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef BEGINDUMPPACKET_H
|
||||
#define BEGINDUMPPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class BeginDumpPacket : public FileTransferPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kChipTypeRam = 0,
|
||||
kChipTypeNand = 1
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int chipType;
|
||||
unsigned int chipId;
|
||||
|
||||
public:
|
||||
|
||||
BeginDumpPacket(unsigned int chipType, unsigned int chipId) : FileTransferPacket(FileTransferPacket::kRequestDump)
|
||||
{
|
||||
this->chipType = chipType;
|
||||
this->chipId = chipId;
|
||||
}
|
||||
|
||||
unsigned int GetChipType(void) const
|
||||
{
|
||||
return (chipType);
|
||||
}
|
||||
|
||||
unsigned int GetChipId(void) const
|
||||
{
|
||||
return (chipId);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, chipType);
|
||||
PackInteger(FileTransferPacket::kDataSize + 4, chipId);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -28,11 +28,26 @@ namespace Heimdall
|
|||
{
|
||||
class BeginSessionPacket : public SessionSetupPacket
|
||||
{
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = SessionSetupPacket::kDataSize + 4
|
||||
};
|
||||
|
||||
public:
|
||||
|
||||
BeginSessionPacket() : SessionSetupPacket(SessionSetupPacket::kBeginSession)
|
||||
{
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
SessionSetupPacket::Pack();
|
||||
|
||||
/* Odin protocol version. */
|
||||
PackInteger(SessionSetupPacket::kDataSize, 0x4);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -19,7 +19,8 @@
|
|||
THE SOFTWARE.*/
|
||||
|
||||
// C Standard Library
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#include <fstream>
|
||||
|
||||
// libusb
|
||||
#include <libusb.h>
|
||||
|
@ -53,7 +54,9 @@
|
|||
#include "SessionSetupResponse.h"
|
||||
|
||||
// Future versions of libusb will use usb_interface instead of interface.
|
||||
#ifndef usb_interface
|
||||
#define usb_interface interface
|
||||
#endif
|
||||
|
||||
#define USB_CLASS_CDC_DATA 0x0A
|
||||
|
||||
|
@ -66,11 +69,6 @@ const DeviceIdentifier BridgeManager::supportedDevices[BridgeManager::kSupported
|
|||
DeviceIdentifier(BridgeManager::kVidSamsung, BridgeManager::kPidDroidCharge)
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kDumpBufferSize = 4096,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kFileTransferSequenceMaxLengthDefault = 800,
|
||||
|
@ -78,32 +76,22 @@ enum
|
|||
kFileTransferSequenceTimeoutDefault = 30000 // 30 seconds
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kHandshakeMaxAttempts = 5,
|
||||
kReceivePacketMaxAttempts = 5
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kPitSizeMultiplicand = 4096
|
||||
};
|
||||
|
||||
int BridgeManager::FindDeviceInterface(void)
|
||||
{
|
||||
Interface::Print("Detecting device...\n");
|
||||
|
||||
struct libusb_device **devices;
|
||||
int deviceCount = libusb_get_device_list(libusbContext, &devices);
|
||||
unsigned int deviceCount = libusb_get_device_list(libusbContext, &devices);
|
||||
|
||||
for (int deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++)
|
||||
for (unsigned int deviceIndex = 0; deviceIndex < deviceCount; deviceIndex++)
|
||||
{
|
||||
libusb_device_descriptor descriptor;
|
||||
libusb_get_device_descriptor(devices[deviceIndex], &descriptor);
|
||||
|
||||
for (int i = 0; i < BridgeManager::kSupportedDeviceCount; i++)
|
||||
{
|
||||
if (descriptor.idVendor == supportedDevices[i].vendorId && descriptor.idProduct == supportedDevices[i].productId)
|
||||
if (descriptor.idVendor == supportedDevices[i].vendorId &&
|
||||
descriptor.idProduct == supportedDevices[i].productId)
|
||||
{
|
||||
heimdallDevice = devices[deviceIndex];
|
||||
libusb_ref_device(heimdallDevice);
|
||||
|
@ -232,7 +220,7 @@ int BridgeManager::FindDeviceInterface(void)
|
|||
|
||||
libusb_free_config_descriptor(configDescriptor);
|
||||
|
||||
if (result != LIBUSB_SUCCESS)
|
||||
if (interfaceIndex < 0)
|
||||
{
|
||||
Interface::PrintError("Failed to find correct interface configuration\n");
|
||||
return (BridgeManager::kInitialiseFailed);
|
||||
|
@ -273,9 +261,16 @@ bool BridgeManager::ClaimDeviceInterface(void)
|
|||
|
||||
bool BridgeManager::SetupDeviceInterface(void)
|
||||
{
|
||||
// if altSettingIndex is 0 there should be no need
|
||||
// to set alt_setting(?)
|
||||
if (altSettingIndex == 0)
|
||||
return (true);
|
||||
|
||||
Interface::Print("Setting up interface...\n");
|
||||
|
||||
int result = libusb_set_interface_alt_setting(deviceHandle, interfaceIndex, altSettingIndex);
|
||||
int result = libusb_set_interface_alt_setting(deviceHandle,
|
||||
interfaceIndex,
|
||||
altSettingIndex);
|
||||
|
||||
if (result != LIBUSB_SUCCESS)
|
||||
{
|
||||
|
@ -313,138 +308,62 @@ bool BridgeManager::InitialiseProtocol(void)
|
|||
|
||||
unsigned char dataBuffer[7];
|
||||
|
||||
int result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x22, 0x3, 0, nullptr, 0, 1000);
|
||||
// Send "ODIN"
|
||||
memcpy(dataBuffer, "ODIN", 4);
|
||||
memset(dataBuffer + 4, 0, 1);
|
||||
|
||||
if (result < 0 && verbose)
|
||||
Interface::PrintWarning("Control transfer #1 failed. Result: %d\n", result);
|
||||
|
||||
memset(dataBuffer, 0, 7);
|
||||
dataBuffer[1] = 0xC2;
|
||||
dataBuffer[2] = 0x01;
|
||||
dataBuffer[6] = 0x07;
|
||||
|
||||
result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x20, 0x0, 0, dataBuffer, 7, 1000);
|
||||
|
||||
if (result < 0 && verbose)
|
||||
Interface::PrintWarning("Control transfer #2 failed. Result: %d\n", result);
|
||||
|
||||
result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x22, 0x3, 0, nullptr, 0, 1000);
|
||||
|
||||
if (result < 0 && verbose)
|
||||
Interface::PrintWarning("Control transfer #3 failed. Result: %d\n", result);
|
||||
|
||||
result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x22, 0x2, 0, nullptr, 0, 1000);
|
||||
|
||||
if (result < 0 && verbose)
|
||||
Interface::PrintWarning("Control transfer #4 failed. Result: %d\n", result);
|
||||
|
||||
memset(dataBuffer, 0, 7);
|
||||
dataBuffer[1] = 0xC2;
|
||||
dataBuffer[2] = 0x01;
|
||||
dataBuffer[6] = 0x08;
|
||||
|
||||
result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x20, 0x0, 0, dataBuffer, 7, 1000);
|
||||
|
||||
if (result < 0 && verbose)
|
||||
Interface::PrintWarning("Control transfer #5 failed. Result: %d\n", result);
|
||||
|
||||
result = libusb_control_transfer(deviceHandle, LIBUSB_REQUEST_TYPE_CLASS, 0x22, 0x2, 0, nullptr, 0, 1000);
|
||||
|
||||
if (result < 0 && verbose)
|
||||
Interface::PrintWarning("Control transfer #6 failed. Result: %d\n", result);
|
||||
|
||||
unsigned int attempt = 0;
|
||||
|
||||
// max(250, communicationDelay)
|
||||
int retryDelay = (communicationDelay > 250) ? communicationDelay : 250;
|
||||
|
||||
for (; attempt < kHandshakeMaxAttempts; attempt++)
|
||||
#ifdef OS_LINUX
|
||||
if (IsUbuntu())
|
||||
{
|
||||
if (attempt > 0)
|
||||
Interface::Print("Resetting device...\n");
|
||||
if (libusb_reset_device(deviceHandle))
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintErrorSameLine(" Retrying...\n");
|
||||
|
||||
// Wait longer each retry
|
||||
Sleep(retryDelay * (attempt + 1));
|
||||
}
|
||||
|
||||
int dataTransferred = 0;
|
||||
|
||||
// Send "ODIN"
|
||||
memcpy(dataBuffer, "ODIN", 4);
|
||||
memset(dataBuffer + 4, 0, 1);
|
||||
|
||||
result = libusb_bulk_transfer(deviceHandle, outEndpoint, dataBuffer, 4, &dataTransferred, 1000);
|
||||
if (result < 0)
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintError("Failed to send data: \"%s\"\n", dataBuffer);
|
||||
else
|
||||
Interface::PrintError("Failed to send data!");
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
||||
if (dataTransferred != 4)
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintError("Failed to complete sending of data: \"%s\"\n", dataBuffer);
|
||||
else
|
||||
Interface::PrintError("Failed to complete sending of data!");
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
||||
// Expect "LOKE"
|
||||
memset(dataBuffer, 0, 7);
|
||||
|
||||
int retry = 0;
|
||||
dataTransferred = 0;
|
||||
|
||||
result = libusb_bulk_transfer(deviceHandle, inEndpoint, dataBuffer, 7, &dataTransferred, 1000);
|
||||
|
||||
if (result < 0)
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintError("Failed to receive handshake response.");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (dataTransferred == 4 && memcmp(dataBuffer, "LOKE", 4) == 0)
|
||||
{
|
||||
// Successfully received "LOKE"
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintError("Expected: \"%s\"\nReceived: \"%s\"\n", "LOKE", dataBuffer);
|
||||
|
||||
Interface::PrintError("Unexpected handshake response!");
|
||||
}
|
||||
Interface::PrintError("Failed to reset device!\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (attempt == kHandshakeMaxAttempts)
|
||||
if (!SendBulkTransfer(dataBuffer, 4, 1000))
|
||||
{
|
||||
Interface::PrintError("Failed to send handshake!\n");
|
||||
}
|
||||
|
||||
// Expect "LOKE"
|
||||
memset(dataBuffer, 0, 7);
|
||||
|
||||
int dataTransferred = 0;
|
||||
|
||||
int result = libusb_bulk_transfer(deviceHandle, inEndpoint, dataBuffer, 7, &dataTransferred, 1000);
|
||||
|
||||
if (result != LIBUSB_SUCCESS)
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
|
||||
Interface::PrintError("Protocol initialisation failed!\n\n");
|
||||
return (false);
|
||||
Interface::PrintError("Failed to receive handshake response. Result: %d\n", result);
|
||||
}
|
||||
else
|
||||
{
|
||||
Interface::Print("Protocol initialisation successful.\n\n");
|
||||
return (true);
|
||||
if (dataTransferred == 4 && memcmp(dataBuffer, "LOKE", 4) == 0)
|
||||
{
|
||||
// Successfully received "LOKE"
|
||||
Interface::Print("Protocol initialisation successful.\n\n");
|
||||
return (true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintError("Expected: \"LOKE\"\nReceived: \"%s\"\n", dataBuffer);
|
||||
|
||||
Interface::PrintError("Unexpected handshake response!\n");
|
||||
}
|
||||
}
|
||||
|
||||
Interface::PrintError("Protocol initialisation failed!\n\n");
|
||||
return (false);
|
||||
}
|
||||
|
||||
BridgeManager::BridgeManager(bool verbose, int communicationDelay)
|
||||
BridgeManager::BridgeManager(bool verbose)
|
||||
{
|
||||
this->verbose = verbose;
|
||||
this->communicationDelay = communicationDelay;
|
||||
|
||||
libusbContext = nullptr;
|
||||
deviceHandle = nullptr;
|
||||
|
@ -496,29 +415,8 @@ bool BridgeManager::DetectDevice(void)
|
|||
return (false);
|
||||
}
|
||||
|
||||
// Setup libusb log level.
|
||||
switch (usbLogLevel)
|
||||
{
|
||||
case UsbLogLevel::None:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_NONE);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Error:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_ERROR);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Warning:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_WARNING);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Info:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_INFO);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Debug:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_DEBUG);
|
||||
break;
|
||||
}
|
||||
// Set libusb log level.
|
||||
SetUsbLogLevel(usbLogLevel);
|
||||
|
||||
// Get handle to Galaxy S device
|
||||
struct libusb_device **devices;
|
||||
|
@ -531,7 +429,8 @@ bool BridgeManager::DetectDevice(void)
|
|||
|
||||
for (int i = 0; i < BridgeManager::kSupportedDeviceCount; i++)
|
||||
{
|
||||
if (descriptor.idVendor == supportedDevices[i].vendorId && descriptor.idProduct == supportedDevices[i].productId)
|
||||
if (descriptor.idVendor == supportedDevices[i].vendorId &&
|
||||
descriptor.idProduct == supportedDevices[i].productId)
|
||||
{
|
||||
libusb_free_device_list(devices, deviceCount);
|
||||
|
||||
|
@ -557,34 +456,13 @@ int BridgeManager::Initialise(bool resume)
|
|||
if (result != LIBUSB_SUCCESS)
|
||||
{
|
||||
Interface::PrintError("Failed to initialise libusb. libusb error: %d\n", result);
|
||||
Interface::Print("Failed to connect to device!");
|
||||
Interface::Print("Failed to connect to device!\n");
|
||||
return (BridgeManager::kInitialiseFailed);
|
||||
}
|
||||
|
||||
// Setup libusb log level.
|
||||
switch (usbLogLevel)
|
||||
{
|
||||
case UsbLogLevel::None:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_NONE);
|
||||
break;
|
||||
SetUsbLogLevel(usbLogLevel);
|
||||
|
||||
case UsbLogLevel::Error:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_ERROR);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Warning:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_WARNING);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Info:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_INFO);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Debug:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_DEBUG);
|
||||
break;
|
||||
}
|
||||
|
||||
result = FindDeviceInterface();
|
||||
|
||||
if (result != BridgeManager::kInitialiseSucceeded)
|
||||
|
@ -652,46 +530,6 @@ bool BridgeManager::BeginSession(void)
|
|||
}
|
||||
}
|
||||
|
||||
// -------------------- KIES DOESN'T DO THIS --------------------
|
||||
|
||||
/*DeviceTypePacket deviceTypePacket;
|
||||
|
||||
if (!SendPacket(&deviceTypePacket))
|
||||
{
|
||||
Interface::PrintError("Failed to request device type!\n");
|
||||
return (false);
|
||||
}
|
||||
|
||||
SessionSetupResponse deviceTypeResponse;
|
||||
|
||||
if (!ReceivePacket(&deviceTypeResponse))
|
||||
return (false);
|
||||
|
||||
unsigned int deviceType = deviceTypeResponse.GetResult();
|
||||
|
||||
switch (deviceType)
|
||||
{
|
||||
// NOTE: If you add a new device type don't forget to update the error message below!
|
||||
|
||||
case 0: // Galaxy S etc.
|
||||
case 3: // Galaxy Tab
|
||||
case 30: // Galaxy S 2 Skyrocket
|
||||
case 180: // Galaxy S etc.
|
||||
case 190: // M110S Galaxy S
|
||||
|
||||
if (verbose)
|
||||
Interface::Print("Session begun with device of type: %d.\n\n", deviceType);
|
||||
else
|
||||
Interface::Print("Session begun.\n\n");
|
||||
|
||||
return (true);
|
||||
|
||||
default:
|
||||
|
||||
Interface::PrintError("Unexpected device info response!\nExpected: 0, 3, 30, 180 or 190\nReceived:%d\n", deviceType);
|
||||
return (false);
|
||||
}*/
|
||||
|
||||
Interface::Print("Session begun.\n\n");
|
||||
return (true);
|
||||
}
|
||||
|
@ -752,21 +590,17 @@ bool BridgeManager::EndSession(bool reboot) const
|
|||
return (true);
|
||||
}
|
||||
|
||||
bool BridgeManager::SendPacket(OutboundPacket *packet, int timeout, bool retry) const
|
||||
bool BridgeManager::SendBulkTransfer(unsigned char *data, int length, int timeout, bool retry) const
|
||||
{
|
||||
packet->Pack();
|
||||
|
||||
int dataTransferred;
|
||||
int result = libusb_bulk_transfer(deviceHandle, outEndpoint, packet->GetData(), packet->GetSize(),
|
||||
&dataTransferred, timeout);
|
||||
int result = libusb_bulk_transfer(deviceHandle, outEndpoint, data, length, &dataTransferred, timeout);
|
||||
|
||||
if (result < 0 && retry)
|
||||
if (result != LIBUSB_SUCCESS && retry)
|
||||
{
|
||||
// max(250, communicationDelay)
|
||||
int retryDelay = (communicationDelay > 250) ? communicationDelay : 250;
|
||||
static const int retryDelay = 250;
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintError("libusb error %d whilst sending packet.", result);
|
||||
Interface::PrintError("libusb error %d whilst sending bulk transfer.", result);
|
||||
|
||||
// Retry
|
||||
for (int i = 0; i < 5; i++)
|
||||
|
@ -777,95 +611,134 @@ bool BridgeManager::SendPacket(OutboundPacket *packet, int timeout, bool retry)
|
|||
// Wait longer each retry
|
||||
Sleep(retryDelay * (i + 1));
|
||||
|
||||
result = libusb_bulk_transfer(deviceHandle, outEndpoint, packet->GetData(), packet->GetSize(),
|
||||
&dataTransferred, timeout);
|
||||
result = libusb_bulk_transfer(deviceHandle, outEndpoint, data, length, &dataTransferred, timeout);
|
||||
|
||||
if (result >= 0)
|
||||
if (result == LIBUSB_SUCCESS)
|
||||
break;
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintError("libusb error %d whilst sending packet.", result);
|
||||
Interface::PrintError("libusb error %d whilst sending bulk transfer.", result);
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
}
|
||||
|
||||
if (communicationDelay != 0)
|
||||
Sleep(communicationDelay);
|
||||
return (result == LIBUSB_SUCCESS && dataTransferred == length);
|
||||
}
|
||||
|
||||
if (result < 0 || dataTransferred != packet->GetSize())
|
||||
int BridgeManager::ReceiveBulkTransfer(unsigned char *data, int length, int timeout, bool retry) const
|
||||
{
|
||||
if (data == nullptr)
|
||||
{
|
||||
// HACK: It seems WinUSB ignores us when we try to read with length zero.
|
||||
static unsigned char dummyData;
|
||||
data = &dummyData;
|
||||
length = 1;
|
||||
}
|
||||
|
||||
int dataTransferred;
|
||||
int result = libusb_bulk_transfer(deviceHandle, inEndpoint, data, length, &dataTransferred, timeout);
|
||||
|
||||
if (result != LIBUSB_SUCCESS && retry)
|
||||
{
|
||||
static const int retryDelay = 250;
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintError("libusb error %d whilst receiving bulk transfer.", result);
|
||||
|
||||
// Retry
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintErrorSameLine(" Retrying...\n");
|
||||
|
||||
// Wait longer each retry
|
||||
Sleep(retryDelay * (i + 1));
|
||||
|
||||
result = libusb_bulk_transfer(deviceHandle, inEndpoint, data, length, &dataTransferred, timeout);
|
||||
|
||||
if (result == LIBUSB_SUCCESS)
|
||||
break;
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintError("libusb error %d whilst receiving bulk transfer.", result);
|
||||
}
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
}
|
||||
|
||||
if (result != LIBUSB_SUCCESS)
|
||||
return (result);
|
||||
|
||||
return (dataTransferred);
|
||||
}
|
||||
|
||||
bool BridgeManager::SendPacket(OutboundPacket *packet, int timeout, int emptyTransferFlags) const
|
||||
{
|
||||
packet->Pack();
|
||||
|
||||
if (emptyTransferFlags & kEmptyTransferBefore)
|
||||
{
|
||||
if (!SendBulkTransfer(nullptr, 0, kDefaultTimeoutEmptyTransfer, false) && verbose)
|
||||
{
|
||||
Interface::PrintWarning("Empty bulk transfer before sending packet failed. Continuing anyway...\n");
|
||||
}
|
||||
}
|
||||
|
||||
if (!SendBulkTransfer(packet->GetData(), packet->GetSize(), timeout))
|
||||
return (false);
|
||||
|
||||
if (emptyTransferFlags & kEmptyTransferAfter)
|
||||
{
|
||||
if (!SendBulkTransfer(nullptr, 0, kDefaultTimeoutEmptyTransfer, false) && verbose)
|
||||
{
|
||||
Interface::PrintWarning("Empty bulk transfer after sending packet failed. Continuing anyway...\n");
|
||||
}
|
||||
}
|
||||
|
||||
return (true);
|
||||
}
|
||||
|
||||
bool BridgeManager::ReceivePacket(InboundPacket *packet, int timeout, bool retry, unsigned char *buffer, unsigned int bufferSize) const
|
||||
bool BridgeManager::ReceivePacket(InboundPacket *packet, int timeout, int emptyTransferFlags) const
|
||||
{
|
||||
bool bufferProvided = buffer != nullptr && bufferSize >= packet->GetSize();
|
||||
|
||||
if (!bufferProvided)
|
||||
if (emptyTransferFlags & kEmptyTransferBefore)
|
||||
{
|
||||
buffer = packet->GetData();
|
||||
bufferSize = packet->GetSize();
|
||||
}
|
||||
|
||||
int dataTransferred;
|
||||
int result;
|
||||
|
||||
unsigned int attempt = 0;
|
||||
unsigned int maxAttempts = (retry) ? kReceivePacketMaxAttempts : 1;
|
||||
|
||||
// max(250, communicationDelay)
|
||||
int retryDelay = (communicationDelay > 250) ? communicationDelay : 250;
|
||||
|
||||
for (; attempt < maxAttempts; attempt++)
|
||||
{
|
||||
if (attempt > 0)
|
||||
if (ReceiveBulkTransfer(nullptr, 0, kDefaultTimeoutEmptyTransfer, false) < 0 && verbose)
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintErrorSameLine(" Retrying...\n");
|
||||
|
||||
// Wait longer each retry
|
||||
Sleep(retryDelay * (attempt + 1));
|
||||
Interface::PrintWarning("Empty bulk transfer before receiving packet failed. Continuing anyway...\n");
|
||||
}
|
||||
|
||||
result = libusb_bulk_transfer(deviceHandle, inEndpoint, buffer, bufferSize, &dataTransferred, timeout);
|
||||
|
||||
if (result >= 0)
|
||||
break;
|
||||
|
||||
if (verbose)
|
||||
Interface::PrintError("libusb error %d whilst receiving packet.", result);
|
||||
}
|
||||
|
||||
if (verbose && attempt > 0)
|
||||
Interface::PrintErrorSameLine("\n");
|
||||
int receivedSize = ReceiveBulkTransfer(packet->GetData(), packet->GetSize(), timeout);
|
||||
|
||||
if (attempt == maxAttempts)
|
||||
if (receivedSize < 0)
|
||||
return (false);
|
||||
|
||||
if (communicationDelay != 0)
|
||||
Sleep(communicationDelay);
|
||||
|
||||
if (dataTransferred != packet->GetSize() && !packet->IsSizeVariable())
|
||||
if (static_cast<unsigned int>(receivedSize) != packet->GetSize() && !packet->IsSizeVariable())
|
||||
{
|
||||
if (verbose)
|
||||
Interface::PrintError("Incorrect packet size received - expected size = %d, received size = %d.\n", packet->GetSize(), dataTransferred);
|
||||
Interface::PrintError("Incorrect packet size received - expected size = %d, received size = %d.\n", packet->GetSize(), receivedSize);
|
||||
|
||||
return (false);
|
||||
}
|
||||
|
||||
if (bufferProvided)
|
||||
memcpy(packet->GetData(), buffer, dataTransferred);
|
||||
|
||||
packet->SetReceivedSize(dataTransferred);
|
||||
packet->SetReceivedSize(receivedSize);
|
||||
|
||||
bool unpacked = packet->Unpack();
|
||||
|
||||
if (!unpacked && verbose)
|
||||
Interface::PrintError("Failed to unpack received packet.\n");
|
||||
|
||||
if (emptyTransferFlags & kEmptyTransferAfter)
|
||||
{
|
||||
if (ReceiveBulkTransfer(nullptr, 0, kDefaultTimeoutEmptyTransfer, false) < 0 && verbose)
|
||||
{
|
||||
Interface::PrintWarning("Empty bulk transfer after receiving packet failed. Continuing anyway...\n");
|
||||
}
|
||||
}
|
||||
|
||||
return (unpacked);
|
||||
}
|
||||
|
||||
|
@ -1029,7 +902,6 @@ int BridgeManager::ReceivePitFile(unsigned char **pitBuffer) const
|
|||
unsigned char *buffer = new unsigned char[fileSize];
|
||||
int offset = 0;
|
||||
|
||||
// NOTE: The PIT file appears to always be padded out to exactly 4 kilobytes.
|
||||
for (unsigned int i = 0; i < transferCount; i++)
|
||||
{
|
||||
DumpPartPitFilePacket *requestPacket = new DumpPartPitFilePacket(i);
|
||||
|
@ -1042,10 +914,12 @@ int BridgeManager::ReceivePitFile(unsigned char **pitBuffer) const
|
|||
delete [] buffer;
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
int receiveEmptyTransferFlags = (i == transferCount - 1) ? kEmptyTransferAfter : kEmptyTransferNone;
|
||||
|
||||
ReceiveFilePartPacket *receiveFilePartPacket = new ReceiveFilePartPacket();
|
||||
success = ReceivePacket(receiveFilePartPacket);
|
||||
|
||||
success = ReceivePacket(receiveFilePartPacket, kDefaultTimeoutReceive, receiveEmptyTransferFlags);
|
||||
|
||||
if (!success)
|
||||
{
|
||||
Interface::PrintError("Failed to receive PIT file part #%d!\n", i);
|
||||
|
@ -1128,9 +1002,9 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
return (false);
|
||||
}
|
||||
|
||||
fseek(file, 0, SEEK_END);
|
||||
long fileSize = ftell(file);
|
||||
rewind(file);
|
||||
FileSeek(file, 0, SEEK_END);
|
||||
unsigned long fileSize = (unsigned long)FileTell(file);
|
||||
FileRewind(file);
|
||||
|
||||
ResponsePacket *fileTransferResponse = new ResponsePacket(ResponsePacket::kResponseTypeFileTransfer);
|
||||
success = ReceivePacket(fileTransferResponse);
|
||||
|
@ -1150,14 +1024,14 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
{
|
||||
sequenceCount++;
|
||||
|
||||
int lastSequenceBytes = fileSize % (fileTransferSequenceMaxLength * fileTransferPacketSize);
|
||||
unsigned int lastSequenceBytes = fileSize % (fileTransferSequenceMaxLength * fileTransferPacketSize);
|
||||
lastSequenceSize = lastSequenceBytes / fileTransferPacketSize;
|
||||
|
||||
if (partialPacketByteCount != 0)
|
||||
lastSequenceSize++;
|
||||
}
|
||||
|
||||
long bytesTransferred = 0;
|
||||
unsigned long bytesTransferred = 0;
|
||||
unsigned int currentPercent;
|
||||
unsigned int previousPercent = 0;
|
||||
Interface::Print("0%%");
|
||||
|
@ -1166,14 +1040,9 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
{
|
||||
bool isLastSequence = (sequenceIndex == sequenceCount - 1);
|
||||
unsigned int sequenceSize = (isLastSequence) ? lastSequenceSize : fileTransferSequenceMaxLength;
|
||||
unsigned int sequenceByteCount;
|
||||
unsigned int sequenceTotalByteCount = sequenceSize * fileTransferPacketSize;
|
||||
|
||||
if (isLastSequence)
|
||||
sequenceByteCount = ((partialPacketByteCount) ? lastSequenceSize - 1 : lastSequenceSize) * fileTransferPacketSize + partialPacketByteCount;
|
||||
else
|
||||
sequenceByteCount = fileTransferSequenceMaxLength * fileTransferPacketSize;
|
||||
|
||||
FlashPartFileTransferPacket *beginFileTransferPacket = new FlashPartFileTransferPacket(sequenceByteCount);
|
||||
FlashPartFileTransferPacket *beginFileTransferPacket = new FlashPartFileTransferPacket(sequenceTotalByteCount);
|
||||
success = SendPacket(beginFileTransferPacket);
|
||||
delete beginFileTransferPacket;
|
||||
|
||||
|
@ -1195,14 +1064,14 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
return (false);
|
||||
}
|
||||
|
||||
SendFilePartPacket *sendFilePartPacket;
|
||||
SendFilePartResponse *sendFilePartResponse;
|
||||
|
||||
for (unsigned int filePartIndex = 0; filePartIndex < sequenceSize; filePartIndex++)
|
||||
{
|
||||
// NOTE: This empty transfer thing is entirely ridiculous, but sadly it seems to be required.
|
||||
int sendEmptyTransferFlags = (filePartIndex == 0) ? kEmptyTransferNone : kEmptyTransferBefore;
|
||||
|
||||
// Send
|
||||
sendFilePartPacket = new SendFilePartPacket(file, fileTransferPacketSize);
|
||||
success = SendPacket(sendFilePartPacket);
|
||||
SendFilePartPacket *sendFilePartPacket = new SendFilePartPacket(file, fileTransferPacketSize);
|
||||
success = SendPacket(sendFilePartPacket, kDefaultTimeoutSend, sendEmptyTransferFlags);
|
||||
delete sendFilePartPacket;
|
||||
|
||||
if (!success)
|
||||
|
@ -1213,7 +1082,7 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
}
|
||||
|
||||
// Response
|
||||
sendFilePartResponse = new SendFilePartResponse();
|
||||
SendFilePartResponse *sendFilePartResponse = new SendFilePartResponse();
|
||||
success = ReceivePacket(sendFilePartResponse);
|
||||
int receivedPartIndex = sendFilePartResponse->GetPartIndex();
|
||||
|
||||
|
@ -1231,7 +1100,7 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
|
||||
// Send
|
||||
sendFilePartPacket = new SendFilePartPacket(file, fileTransferPacketSize);
|
||||
success = SendPacket(sendFilePartPacket);
|
||||
success = SendPacket(sendFilePartPacket, kDefaultTimeoutSend, sendEmptyTransferFlags);
|
||||
delete sendFilePartPacket;
|
||||
|
||||
if (!success)
|
||||
|
@ -1275,7 +1144,7 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
if (bytesTransferred > fileSize)
|
||||
bytesTransferred = fileSize;
|
||||
|
||||
currentPercent = (int)(100.0f * ((float)bytesTransferred / (float)fileSize));
|
||||
currentPercent = (unsigned int)(100.0 * ((double)bytesTransferred / (double)fileSize));
|
||||
|
||||
if (currentPercent != previousPercent)
|
||||
{
|
||||
|
@ -1295,11 +1164,14 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
previousPercent = currentPercent;
|
||||
}
|
||||
|
||||
unsigned int sequenceEffectiveByteCount = (isLastSequence && partialPacketByteCount != 0) ?
|
||||
fileTransferPacketSize * (lastSequenceSize - 1) + partialPacketByteCount : sequenceTotalByteCount;
|
||||
|
||||
if (destination == EndFileTransferPacket::kDestinationPhone)
|
||||
{
|
||||
EndPhoneFileTransferPacket *endPhoneFileTransferPacket = new EndPhoneFileTransferPacket(sequenceByteCount, 0, deviceType, fileIdentifier, isLastSequence);
|
||||
EndPhoneFileTransferPacket *endPhoneFileTransferPacket = new EndPhoneFileTransferPacket(sequenceEffectiveByteCount, 0, deviceType, fileIdentifier, isLastSequence);
|
||||
|
||||
success = SendPacket(endPhoneFileTransferPacket, 3000);
|
||||
success = SendPacket(endPhoneFileTransferPacket, kDefaultTimeoutSend, kEmptyTransferBeforeAndAfter);
|
||||
delete endPhoneFileTransferPacket;
|
||||
|
||||
if (!success)
|
||||
|
@ -1311,9 +1183,9 @@ bool BridgeManager::SendFile(FILE *file, unsigned int destination, unsigned int
|
|||
}
|
||||
else // destination == EndFileTransferPacket::kDestinationModem
|
||||
{
|
||||
EndModemFileTransferPacket *endModemFileTransferPacket = new EndModemFileTransferPacket(sequenceByteCount, 0, deviceType, isLastSequence);
|
||||
EndModemFileTransferPacket *endModemFileTransferPacket = new EndModemFileTransferPacket(sequenceEffectiveByteCount, 0, deviceType, isLastSequence);
|
||||
|
||||
success = SendPacket(endModemFileTransferPacket, 3000);
|
||||
success = SendPacket(endModemFileTransferPacket, kDefaultTimeoutSend, kEmptyTransferBeforeAndAfter);
|
||||
delete endModemFileTransferPacket;
|
||||
|
||||
if (!success)
|
||||
|
@ -1351,24 +1223,53 @@ void BridgeManager::SetUsbLogLevel(UsbLogLevel usbLogLevel)
|
|||
switch (usbLogLevel)
|
||||
{
|
||||
case UsbLogLevel::None:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_NONE);
|
||||
libusb_set_option(libusbContext, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_NONE);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Error:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_ERROR);
|
||||
libusb_set_option(libusbContext, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_ERROR);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Warning:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_WARNING);
|
||||
libusb_set_option(libusbContext, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_WARNING);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Info:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_INFO);
|
||||
libusb_set_option(libusbContext, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_INFO);
|
||||
break;
|
||||
|
||||
case UsbLogLevel::Debug:
|
||||
libusb_set_debug(libusbContext, LIBUSB_LOG_LEVEL_DEBUG);
|
||||
libusb_set_option(libusbContext, LIBUSB_OPTION_LOG_LEVEL, LIBUSB_LOG_LEVEL_DEBUG);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef OS_LINUX
|
||||
bool BridgeManager::IsUbuntu()
|
||||
{
|
||||
std::ifstream os_release("/etc/os-release");
|
||||
std::string line, entry, os;
|
||||
int pos;
|
||||
while (std::getline(os_release, line))
|
||||
{
|
||||
pos = line.find("=");
|
||||
entry = line.substr(0, pos);
|
||||
if (entry == "ID")
|
||||
{
|
||||
os = line.substr(pos+1);
|
||||
if (verbose)
|
||||
{
|
||||
Interface::Print("Linux distro ID: %s\n",
|
||||
os.c_str());
|
||||
}
|
||||
if (os == "ubuntu")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,170 +1,184 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef BRIDGEMANAGER_H
|
||||
#define BRIDGEMANAGER_H
|
||||
|
||||
// libpit
|
||||
#include "libpit.h"
|
||||
|
||||
// Heimdall
|
||||
#include "Heimdall.h"
|
||||
|
||||
struct libusb_context;
|
||||
struct libusb_device;
|
||||
struct libusb_device_handle;
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class InboundPacket;
|
||||
class OutboundPacket;
|
||||
|
||||
class DeviceIdentifier
|
||||
{
|
||||
public:
|
||||
|
||||
const int vendorId;
|
||||
const int productId;
|
||||
|
||||
DeviceIdentifier(int vid, int pid) :
|
||||
vendorId(vid),
|
||||
productId(pid)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class BridgeManager
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kSupportedDeviceCount = 3
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kCommunicationDelayDefault = 0
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kInitialiseSucceeded = 0,
|
||||
kInitialiseFailed,
|
||||
kInitialiseDeviceNotDetected
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kVidSamsung = 0x04E8
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kPidGalaxyS = 0x6601,
|
||||
kPidGalaxyS2 = 0x685D,
|
||||
kPidDroidCharge = 0x68C3
|
||||
};
|
||||
|
||||
enum class UsbLogLevel
|
||||
{
|
||||
None = 0,
|
||||
Error,
|
||||
Warning,
|
||||
Info,
|
||||
Debug,
|
||||
|
||||
Default = Error
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
|
||||
|
||||
bool verbose;
|
||||
int communicationDelay;
|
||||
|
||||
libusb_context *libusbContext;
|
||||
libusb_device_handle *deviceHandle;
|
||||
libusb_device *heimdallDevice;
|
||||
|
||||
int interfaceIndex;
|
||||
int altSettingIndex;
|
||||
int inEndpoint;
|
||||
int outEndpoint;
|
||||
|
||||
bool interfaceClaimed;
|
||||
|
||||
#ifdef OS_LINUX
|
||||
|
||||
bool detachedDriver;
|
||||
|
||||
#endif
|
||||
|
||||
unsigned int fileTransferSequenceMaxLength;
|
||||
unsigned int fileTransferPacketSize;
|
||||
unsigned int fileTransferSequenceTimeout;
|
||||
|
||||
UsbLogLevel usbLogLevel;
|
||||
|
||||
int FindDeviceInterface(void);
|
||||
bool ClaimDeviceInterface(void);
|
||||
bool SetupDeviceInterface(void);
|
||||
void ReleaseDeviceInterface(void);
|
||||
|
||||
bool InitialiseProtocol(void);
|
||||
|
||||
public:
|
||||
|
||||
BridgeManager(bool verbose, int communicationDelay = BridgeManager::kCommunicationDelayDefault);
|
||||
~BridgeManager();
|
||||
|
||||
bool DetectDevice(void);
|
||||
int Initialise(bool resume);
|
||||
|
||||
bool BeginSession(void);
|
||||
bool EndSession(bool reboot) const;
|
||||
|
||||
bool SendPacket(OutboundPacket *packet, int timeout = 3000, bool retry = true) const;
|
||||
bool ReceivePacket(InboundPacket *packet, int timeout = 3000, bool retry = true, unsigned char *buffer = nullptr, unsigned int bufferSize = -1) const;
|
||||
|
||||
bool RequestDeviceType(unsigned int request, int *result) const;
|
||||
|
||||
bool SendPitData(const libpit::PitData *pitData) const;
|
||||
int ReceivePitFile(unsigned char **pitBuffer) const;
|
||||
int DownloadPitFile(unsigned char **pitBuffer) const; // Thin wrapper around ReceivePitFile() with additional logging.
|
||||
|
||||
bool SendFile(FILE *file, unsigned int destination, unsigned int deviceType, unsigned int fileIdentifier = 0xFFFFFFFF) const;
|
||||
|
||||
void SetUsbLogLevel(UsbLogLevel usbLogLevel);
|
||||
|
||||
UsbLogLevel GetUsbLogLevel(void) const
|
||||
{
|
||||
return usbLogLevel;
|
||||
}
|
||||
|
||||
bool IsVerbose(void) const
|
||||
{
|
||||
return (verbose);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef BRIDGEMANAGER_H
|
||||
#define BRIDGEMANAGER_H
|
||||
|
||||
// libpit
|
||||
#include "libpit.h"
|
||||
|
||||
// Heimdall
|
||||
#include "Heimdall.h"
|
||||
|
||||
struct libusb_context;
|
||||
struct libusb_device;
|
||||
struct libusb_device_handle;
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class InboundPacket;
|
||||
class OutboundPacket;
|
||||
|
||||
class DeviceIdentifier
|
||||
{
|
||||
public:
|
||||
|
||||
const int vendorId;
|
||||
const int productId;
|
||||
|
||||
DeviceIdentifier(int vid, int pid) :
|
||||
vendorId(vid),
|
||||
productId(pid)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
class BridgeManager
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kSupportedDeviceCount = 3
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kInitialiseSucceeded = 0,
|
||||
kInitialiseFailed,
|
||||
kInitialiseDeviceNotDetected
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kVidSamsung = 0x04E8
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kPidGalaxyS = 0x6601,
|
||||
kPidGalaxyS2 = 0x685D,
|
||||
kPidDroidCharge = 0x68C3
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kDefaultTimeoutSend = 3000,
|
||||
kDefaultTimeoutReceive = 3000,
|
||||
kDefaultTimeoutEmptyTransfer = 100
|
||||
};
|
||||
|
||||
enum class UsbLogLevel
|
||||
{
|
||||
None = 0,
|
||||
Error,
|
||||
Warning,
|
||||
Info,
|
||||
Debug,
|
||||
|
||||
Default = Error
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
kEmptyTransferNone = 0,
|
||||
kEmptyTransferBefore = 1,
|
||||
kEmptyTransferAfter = 1 << 1,
|
||||
kEmptyTransferBeforeAndAfter = kEmptyTransferBefore | kEmptyTransferAfter
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
static const DeviceIdentifier supportedDevices[kSupportedDeviceCount];
|
||||
|
||||
bool verbose;
|
||||
|
||||
libusb_context *libusbContext;
|
||||
libusb_device_handle *deviceHandle;
|
||||
libusb_device *heimdallDevice;
|
||||
|
||||
int interfaceIndex;
|
||||
int altSettingIndex;
|
||||
int inEndpoint;
|
||||
int outEndpoint;
|
||||
|
||||
bool interfaceClaimed;
|
||||
|
||||
#ifdef OS_LINUX
|
||||
|
||||
bool detachedDriver;
|
||||
|
||||
#endif
|
||||
|
||||
unsigned int fileTransferSequenceMaxLength;
|
||||
unsigned int fileTransferPacketSize;
|
||||
unsigned int fileTransferSequenceTimeout;
|
||||
|
||||
UsbLogLevel usbLogLevel;
|
||||
|
||||
int FindDeviceInterface(void);
|
||||
bool ClaimDeviceInterface(void);
|
||||
bool SetupDeviceInterface(void);
|
||||
void ReleaseDeviceInterface(void);
|
||||
|
||||
bool InitialiseProtocol(void);
|
||||
|
||||
bool SendBulkTransfer(unsigned char *data, int length, int timeout, bool retry = true) const;
|
||||
int ReceiveBulkTransfer(unsigned char *data, int length, int timeout, bool retry = true) const;
|
||||
|
||||
public:
|
||||
|
||||
BridgeManager(bool verbose);
|
||||
~BridgeManager();
|
||||
|
||||
bool DetectDevice(void);
|
||||
int Initialise(bool resume);
|
||||
|
||||
bool BeginSession(void);
|
||||
bool EndSession(bool reboot) const;
|
||||
|
||||
bool SendPacket(OutboundPacket *packet, int timeout = kDefaultTimeoutSend, int emptyTransferFlags = kEmptyTransferAfter) const;
|
||||
bool ReceivePacket(InboundPacket *packet, int timeout = kDefaultTimeoutReceive, int emptyTransferFlags = kEmptyTransferNone) const;
|
||||
|
||||
bool RequestDeviceType(unsigned int request, int *result) const;
|
||||
|
||||
bool SendPitData(const libpit::PitData *pitData) const;
|
||||
int ReceivePitFile(unsigned char **pitBuffer) const;
|
||||
int DownloadPitFile(unsigned char **pitBuffer) const; // Thin wrapper around ReceivePitFile() with additional logging.
|
||||
|
||||
bool SendFile(FILE *file, unsigned int destination, unsigned int deviceType, unsigned int fileIdentifier = 0xFFFFFFFF) const;
|
||||
|
||||
void SetUsbLogLevel(UsbLogLevel usbLogLevel);
|
||||
#ifdef OS_LINUX
|
||||
bool IsUbuntu(void);
|
||||
#endif
|
||||
UsbLogLevel GetUsbLogLevel(void) const
|
||||
{
|
||||
return usbLogLevel;
|
||||
}
|
||||
|
||||
bool IsVerbose(void) const
|
||||
{
|
||||
return (verbose);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -29,9 +29,12 @@ using namespace std;
|
|||
using namespace Heimdall;
|
||||
|
||||
const char *ClosePcScreenAction::usage = "Action: close-pc-screen\n\
|
||||
Arguments: [--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
|
||||
Arguments: [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\
|
||||
[--usb-log-level <none/error/warning/debug>]\n\
|
||||
Description: Attempts to get rid off the \"connect phone to PC\" screen.\n";
|
||||
Description: Attempts to get rid off the \"connect phone to PC\" screen.\n\
|
||||
Note: --no-reboot causes the device to remain in download mode after the action\n\
|
||||
is completed. If you wish to perform another action whilst remaining in\n\
|
||||
download mode, then the following action must specify the --resume flag.\n";
|
||||
|
||||
int ClosePcScreenAction::Execute(int argc, char **argv)
|
||||
{
|
||||
|
@ -40,7 +43,6 @@ int ClosePcScreenAction::Execute(int argc, char **argv)
|
|||
map<string, ArgumentType> argumentTypes;
|
||||
argumentTypes["no-reboot"] = kArgumentTypeFlag;
|
||||
argumentTypes["resume"] = kArgumentTypeFlag;
|
||||
argumentTypes["delay"] = kArgumentTypeUnsignedInteger;
|
||||
argumentTypes["verbose"] = kArgumentTypeFlag;
|
||||
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
|
||||
argumentTypes["usb-log-level"] = kArgumentTypeString;
|
||||
|
@ -53,9 +55,7 @@ int ClosePcScreenAction::Execute(int argc, char **argv)
|
|||
return (0);
|
||||
}
|
||||
|
||||
const UnsignedIntegerArgument *communicationDelayArgument = static_cast<const UnsignedIntegerArgument *>(arguments.GetArgument("delay"));
|
||||
const StringArgument *usbLogLevelArgument = static_cast<const StringArgument *>(arguments.GetArgument("usb-log-level"));
|
||||
|
||||
BridgeManager::UsbLogLevel usbLogLevel = BridgeManager::UsbLogLevel::Default;
|
||||
|
||||
if (usbLogLevelArgument)
|
||||
|
@ -104,12 +104,7 @@ int ClosePcScreenAction::Execute(int argc, char **argv)
|
|||
|
||||
// Download PIT file from device.
|
||||
|
||||
int communicationDelay = BridgeManager::kCommunicationDelayDefault;
|
||||
|
||||
if (communicationDelayArgument)
|
||||
communicationDelay = communicationDelayArgument->GetValue();
|
||||
|
||||
BridgeManager *bridgeManager = new BridgeManager(verbose, communicationDelay);
|
||||
BridgeManager *bridgeManager = new BridgeManager(verbose);
|
||||
bridgeManager->SetUsbLogLevel(usbLogLevel);
|
||||
|
||||
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -28,7 +28,7 @@ namespace Heimdall
|
|||
extern const char *usage;
|
||||
|
||||
int Execute(int argc, char **argv);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,71 +1,71 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef CONTROLPACKET_H
|
||||
#define CONTROLPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "OutboundPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class ControlPacket : public OutboundPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kControlTypeSession = 0x64,
|
||||
kControlTypePitFile = 0x65,
|
||||
kControlTypeFileTransfer = 0x66,
|
||||
kControlTypeEndSession = 0x67
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = 4
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int controlType;
|
||||
|
||||
public:
|
||||
|
||||
ControlPacket(unsigned int controlType) : OutboundPacket(1024)
|
||||
{
|
||||
this->controlType = controlType;
|
||||
}
|
||||
|
||||
unsigned int GetControlType(void) const
|
||||
{
|
||||
return (controlType);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
PackInteger(0, controlType);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef CONTROLPACKET_H
|
||||
#define CONTROLPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "OutboundPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class ControlPacket : public OutboundPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kControlTypeSession = 0x64,
|
||||
kControlTypePitFile = 0x65,
|
||||
kControlTypeFileTransfer = 0x66,
|
||||
kControlTypeEndSession = 0x67
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = 4
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int controlType;
|
||||
|
||||
public:
|
||||
|
||||
ControlPacket(unsigned int controlType) : OutboundPacket(1024)
|
||||
{
|
||||
this->controlType = controlType;
|
||||
}
|
||||
|
||||
unsigned int GetControlType(void) const
|
||||
{
|
||||
return (controlType);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
PackInteger(0, controlType);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -28,7 +28,7 @@ namespace Heimdall
|
|||
extern const char *usage;
|
||||
|
||||
int Execute(int argc, char **argv);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -33,9 +33,12 @@ using namespace Heimdall;
|
|||
|
||||
const char *DownloadPitAction::usage = "Action: download-pit\n\
|
||||
Arguments: --output <filename> [--verbose] [--no-reboot] [--stdout-errors]\n\
|
||||
[--delay <ms>] [--usb-log-level <none/error/warning/debug>]\n\
|
||||
[--usb-log-level <none/error/warning/debug>]\n\
|
||||
Description: Downloads the connected device's PIT file to the specified\n\
|
||||
output file.\n";
|
||||
output file.\n\
|
||||
Note: --no-reboot causes the device to remain in download mode after the action\n\
|
||||
is completed. If you wish to perform another action whilst remaining in\n\
|
||||
download mode, then the following action must specify the --resume flag.\n";
|
||||
|
||||
int DownloadPitAction::Execute(int argc, char **argv)
|
||||
{
|
||||
|
@ -45,7 +48,6 @@ int DownloadPitAction::Execute(int argc, char **argv)
|
|||
argumentTypes["output"] = kArgumentTypeString;
|
||||
argumentTypes["no-reboot"] = kArgumentTypeFlag;
|
||||
argumentTypes["resume"] = kArgumentTypeFlag;
|
||||
argumentTypes["delay"] = kArgumentTypeUnsignedInteger;
|
||||
argumentTypes["verbose"] = kArgumentTypeFlag;
|
||||
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
|
||||
argumentTypes["usb-log-level"] = kArgumentTypeString;
|
||||
|
@ -67,8 +69,6 @@ int DownloadPitAction::Execute(int argc, char **argv)
|
|||
return (0);
|
||||
}
|
||||
|
||||
const UnsignedIntegerArgument *communicationDelayArgument = static_cast<const UnsignedIntegerArgument *>(arguments.GetArgument("delay"));
|
||||
|
||||
bool reboot = arguments.GetArgument("no-reboot") == nullptr;
|
||||
bool resume = arguments.GetArgument("resume") != nullptr;
|
||||
bool verbose = arguments.GetArgument("verbose") != nullptr;
|
||||
|
@ -120,7 +120,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
|
|||
// Open output file
|
||||
|
||||
const char *outputFilename = outputArgument->GetValue().c_str();
|
||||
FILE *outputPitFile = fopen(outputFilename, "wb");
|
||||
FILE *outputPitFile = FileOpen(outputFilename, "wb");
|
||||
|
||||
if (!outputPitFile)
|
||||
{
|
||||
|
@ -130,17 +130,12 @@ int DownloadPitAction::Execute(int argc, char **argv)
|
|||
|
||||
// Download PIT file from device.
|
||||
|
||||
int communicationDelay = BridgeManager::kCommunicationDelayDefault;
|
||||
|
||||
if (communicationDelayArgument)
|
||||
communicationDelay = communicationDelayArgument->GetValue();
|
||||
|
||||
BridgeManager *bridgeManager = new BridgeManager(verbose, communicationDelay);
|
||||
BridgeManager *bridgeManager = new BridgeManager(verbose);
|
||||
bridgeManager->SetUsbLogLevel(usbLogLevel);
|
||||
|
||||
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())
|
||||
{
|
||||
fclose(outputPitFile);
|
||||
FileClose(outputPitFile);
|
||||
delete bridgeManager;
|
||||
|
||||
return (1);
|
||||
|
@ -153,7 +148,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
|
|||
|
||||
if (fileSize > 0)
|
||||
{
|
||||
if (fwrite(pitBuffer, 1, fileSize, outputPitFile) != fileSize)
|
||||
if (fwrite(pitBuffer, 1, fileSize, outputPitFile) != static_cast<size_t>(fileSize))
|
||||
{
|
||||
Interface::PrintError("Failed to write PIT data to output file.\n");
|
||||
success = false;
|
||||
|
@ -169,7 +164,7 @@ int DownloadPitAction::Execute(int argc, char **argv)
|
|||
|
||||
delete bridgeManager;
|
||||
|
||||
fclose(outputPitFile);
|
||||
FileClose(outputPitFile);
|
||||
delete [] pitBuffer;
|
||||
|
||||
return (success ? 0 : 1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -28,7 +28,7 @@ namespace Heimdall
|
|||
extern const char *usage;
|
||||
|
||||
int Execute(int argc, char **argv);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,56 +1,56 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef DUMPPARTFILETRANSFERPACKET_H
|
||||
#define DUMPPARTFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class DumpPartFileTransferPacket : public FileTransferPacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int partIndex;
|
||||
|
||||
public:
|
||||
|
||||
DumpPartFileTransferPacket(unsigned int partIndex) : FileTransferPacket(FileTransferPacket::kRequestPart)
|
||||
{
|
||||
this->partIndex = partIndex;
|
||||
}
|
||||
|
||||
unsigned int GetPartIndex(void) const
|
||||
{
|
||||
return (partIndex);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, partIndex);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef DUMPPARTFILETRANSFERPACKET_H
|
||||
#define DUMPPARTFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class DumpPartFileTransferPacket : public FileTransferPacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int partIndex;
|
||||
|
||||
public:
|
||||
|
||||
DumpPartFileTransferPacket(unsigned int partIndex) : FileTransferPacket(FileTransferPacket::kRequestPart)
|
||||
{
|
||||
this->partIndex = partIndex;
|
||||
}
|
||||
|
||||
unsigned int GetPartIndex(void) const
|
||||
{
|
||||
return (partIndex);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, partIndex);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,56 +1,56 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef DUMPPARTPITFILEPACKET_H
|
||||
#define DUMPPARTPITFILEPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "PitFilePacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class DumpPartPitFilePacket : public PitFilePacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int partIndex;
|
||||
|
||||
public:
|
||||
|
||||
DumpPartPitFilePacket(unsigned int partIndex) : PitFilePacket(PitFilePacket::kRequestPart)
|
||||
{
|
||||
this->partIndex = partIndex;
|
||||
}
|
||||
|
||||
unsigned int GetPartIndex(void) const
|
||||
{
|
||||
return (partIndex);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
PitFilePacket::Pack();
|
||||
|
||||
PackInteger(PitFilePacket::kDataSize, partIndex);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef DUMPPARTPITFILEPACKET_H
|
||||
#define DUMPPARTPITFILEPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "PitFilePacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class DumpPartPitFilePacket : public PitFilePacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int partIndex;
|
||||
|
||||
public:
|
||||
|
||||
DumpPartPitFilePacket(unsigned int partIndex) : PitFilePacket(PitFilePacket::kRequestPart)
|
||||
{
|
||||
this->partIndex = partIndex;
|
||||
}
|
||||
|
||||
unsigned int GetPartIndex(void) const
|
||||
{
|
||||
return (partIndex);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
PitFilePacket::Pack();
|
||||
|
||||
PackInteger(PitFilePacket::kDataSize, partIndex);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,58 +1,58 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef DUMPRESPONSE_H
|
||||
#define DUMPRESPONSE_H
|
||||
|
||||
// Heimdall
|
||||
#include "ResponsePacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class DumpResponse : public ResponsePacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int dumpSize;
|
||||
|
||||
public:
|
||||
|
||||
DumpResponse() : ResponsePacket(kResponseTypeFileTransfer)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int GetDumpSize(void) const
|
||||
{
|
||||
return (dumpSize);
|
||||
}
|
||||
|
||||
bool Unpack(void)
|
||||
{
|
||||
if (!ResponsePacket::Unpack())
|
||||
return (false);
|
||||
|
||||
dumpSize = UnpackInteger(ResponsePacket::kDataSize);
|
||||
|
||||
return (true);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef DUMPRESPONSE_H
|
||||
#define DUMPRESPONSE_H
|
||||
|
||||
// Heimdall
|
||||
#include "ResponsePacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class DumpResponse : public ResponsePacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int dumpSize;
|
||||
|
||||
public:
|
||||
|
||||
DumpResponse() : ResponsePacket(kResponseTypeFileTransfer)
|
||||
{
|
||||
}
|
||||
|
||||
unsigned int GetDumpSize(void) const
|
||||
{
|
||||
return (dumpSize);
|
||||
}
|
||||
|
||||
bool Unpack(void)
|
||||
{
|
||||
if (!ResponsePacket::Unpack())
|
||||
return (false);
|
||||
|
||||
dumpSize = UnpackInteger(ResponsePacket::kDataSize);
|
||||
|
||||
return (true);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENABLETFLASHPACKET_H
|
||||
#define ENABLETFLASHPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "SessionSetupPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EnableTFlashPacket : public SessionSetupPacket
|
||||
{
|
||||
public:
|
||||
|
||||
EnableTFlashPacket() : SessionSetupPacket(SessionSetupPacket::kEnableTFlash)
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,98 +1,98 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENDFILETRANSFERPACKET_H
|
||||
#define ENDFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EndFileTransferPacket : public FileTransferPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kDestinationPhone = 0x00,
|
||||
kDestinationModem = 0x01
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = FileTransferPacket::kDataSize + 16
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int destination; // PDA / Modem
|
||||
unsigned int sequenceByteCount;
|
||||
unsigned int unknown1;
|
||||
unsigned int chipIdentifier;
|
||||
|
||||
protected:
|
||||
|
||||
EndFileTransferPacket(unsigned int destination, unsigned int sequenceByteCount, unsigned int unknown1, unsigned int chipIdentifier)
|
||||
: FileTransferPacket(FileTransferPacket::kRequestEnd)
|
||||
{
|
||||
this->destination = destination;
|
||||
this->sequenceByteCount = sequenceByteCount;
|
||||
this->unknown1 = unknown1;
|
||||
this->chipIdentifier = chipIdentifier;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
unsigned int GetDestination(void) const
|
||||
{
|
||||
return (destination);
|
||||
}
|
||||
|
||||
unsigned int GetSequenceByteCount(void) const
|
||||
{
|
||||
return (sequenceByteCount);
|
||||
}
|
||||
|
||||
unsigned int GetUnknown1(void) const
|
||||
{
|
||||
return (unknown1);
|
||||
}
|
||||
|
||||
unsigned int GetChipIdentifier(void) const
|
||||
{
|
||||
return (chipIdentifier);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, destination);
|
||||
PackInteger(FileTransferPacket::kDataSize + 4, sequenceByteCount);
|
||||
PackInteger(FileTransferPacket::kDataSize + 8, unknown1);
|
||||
PackInteger(FileTransferPacket::kDataSize + 12, chipIdentifier);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENDFILETRANSFERPACKET_H
|
||||
#define ENDFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EndFileTransferPacket : public FileTransferPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kDestinationPhone = 0x00,
|
||||
kDestinationModem = 0x01
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = FileTransferPacket::kDataSize + 16
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int destination; // PDA / Modem
|
||||
unsigned int sequenceByteCount;
|
||||
unsigned int unknown1; // EFS?
|
||||
unsigned int deviceType;
|
||||
|
||||
protected:
|
||||
|
||||
EndFileTransferPacket(unsigned int destination, unsigned int sequenceByteCount, unsigned int unknown1, unsigned int deviceType)
|
||||
: FileTransferPacket(FileTransferPacket::kRequestEnd)
|
||||
{
|
||||
this->destination = destination;
|
||||
this->sequenceByteCount = sequenceByteCount;
|
||||
this->unknown1 = unknown1;
|
||||
this->deviceType = deviceType;
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
unsigned int GetDestination(void) const
|
||||
{
|
||||
return (destination);
|
||||
}
|
||||
|
||||
unsigned int GetSequenceByteCount(void) const
|
||||
{
|
||||
return (sequenceByteCount);
|
||||
}
|
||||
|
||||
unsigned int GetUnknown1(void) const
|
||||
{
|
||||
return (unknown1);
|
||||
}
|
||||
|
||||
unsigned int GetDeviceType(void) const
|
||||
{
|
||||
return (deviceType);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, destination);
|
||||
PackInteger(FileTransferPacket::kDataSize + 4, sequenceByteCount);
|
||||
PackInteger(FileTransferPacket::kDataSize + 8, unknown1);
|
||||
PackInteger(FileTransferPacket::kDataSize + 12, deviceType);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENDMODEMFILETRANSFERPACKET_H
|
||||
#define ENDMODEMFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "EndFileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EndModemFileTransferPacket : public EndFileTransferPacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int endOfFile;
|
||||
|
||||
public:
|
||||
|
||||
EndModemFileTransferPacket(unsigned int sequenceByteCount, unsigned int unknown1, unsigned int chipIdentifier, bool endOfFile)
|
||||
: EndFileTransferPacket(EndFileTransferPacket::kDestinationModem, sequenceByteCount, unknown1, chipIdentifier)
|
||||
{
|
||||
this->endOfFile = (endOfFile) ? 1 : 0;
|
||||
}
|
||||
|
||||
bool IsEndOfFile(void) const
|
||||
{
|
||||
return (endOfFile == 1);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
EndFileTransferPacket::Pack();
|
||||
|
||||
PackInteger(EndFileTransferPacket::kDataSize, endOfFile);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENDMODEMFILETRANSFERPACKET_H
|
||||
#define ENDMODEMFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "EndFileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EndModemFileTransferPacket : public EndFileTransferPacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int endOfFile;
|
||||
|
||||
public:
|
||||
|
||||
EndModemFileTransferPacket(unsigned int sequenceByteCount, unsigned int unknown1, unsigned int chipIdentifier, bool endOfFile)
|
||||
: EndFileTransferPacket(EndFileTransferPacket::kDestinationModem, sequenceByteCount, unknown1, chipIdentifier)
|
||||
{
|
||||
this->endOfFile = (endOfFile) ? 1 : 0;
|
||||
}
|
||||
|
||||
bool IsEndOfFile(void) const
|
||||
{
|
||||
return (endOfFile == 1);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
EndFileTransferPacket::Pack();
|
||||
|
||||
PackInteger(EndFileTransferPacket::kDataSize, endOfFile);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,88 +1,88 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENDPHONEFILETRANSFERPACKET_H
|
||||
#define ENDPHONEFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "EndFileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EndPhoneFileTransferPacket : public EndFileTransferPacket
|
||||
{
|
||||
public:
|
||||
|
||||
/*enum
|
||||
{
|
||||
kFilePrimaryBootloader = 0x00,
|
||||
kFilePit = 0x01, // New 1.1 - Don't flash the pit this way!
|
||||
kFileSecondaryBootloader = 0x03,
|
||||
kFileSecondaryBootloaderBackup = 0x04, // New 1.1
|
||||
kFileKernel = 0x06,
|
||||
kFileRecovery = 0x07, // New 1.1
|
||||
|
||||
kFileTabletModem = 0x08, // New 1.2
|
||||
|
||||
kFileEfs = 0x14, // New 1.1
|
||||
kFileParamLfs = 0x15,
|
||||
kFileFactoryFilesystem = 0x16,
|
||||
kFileDatabaseData = 0x17,
|
||||
kFileCache = 0x18,
|
||||
|
||||
kFileModem = 0x0B // New 1.1 - Kies flashes the modem this way rather than using the EndModemFileTransferPacket.
|
||||
};*/
|
||||
|
||||
private:
|
||||
|
||||
unsigned int fileIdentifier;
|
||||
unsigned int endOfFile;
|
||||
|
||||
public:
|
||||
|
||||
EndPhoneFileTransferPacket(unsigned int sequenceByteCount, unsigned int unknown1, unsigned int chipIdentifier,
|
||||
unsigned int fileIdentifier, bool endOfFile)
|
||||
: EndFileTransferPacket(EndFileTransferPacket::kDestinationPhone, sequenceByteCount, unknown1, chipIdentifier)
|
||||
{
|
||||
this->fileIdentifier = fileIdentifier;
|
||||
this->endOfFile = (endOfFile) ? 1 : 0;
|
||||
}
|
||||
|
||||
unsigned int GetFileIdentifier(void)
|
||||
{
|
||||
return (fileIdentifier);
|
||||
}
|
||||
|
||||
bool IsEndOfFile(void) const
|
||||
{
|
||||
return (endOfFile == 1);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
EndFileTransferPacket::Pack();
|
||||
|
||||
PackInteger(EndFileTransferPacket::kDataSize, fileIdentifier);
|
||||
PackInteger(EndFileTransferPacket::kDataSize + 4, endOfFile);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef ENDPHONEFILETRANSFERPACKET_H
|
||||
#define ENDPHONEFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "EndFileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class EndPhoneFileTransferPacket : public EndFileTransferPacket
|
||||
{
|
||||
public:
|
||||
|
||||
/*enum
|
||||
{
|
||||
kFilePrimaryBootloader = 0x00,
|
||||
kFilePit = 0x01, // New 1.1 - Don't flash the pit this way!
|
||||
kFileSecondaryBootloader = 0x03,
|
||||
kFileSecondaryBootloaderBackup = 0x04, // New 1.1
|
||||
kFileKernel = 0x06,
|
||||
kFileRecovery = 0x07, // New 1.1
|
||||
|
||||
kFileTabletModem = 0x08, // New 1.2
|
||||
|
||||
kFileEfs = 0x14, // New 1.1
|
||||
kFileParamLfs = 0x15,
|
||||
kFileFactoryFilesystem = 0x16,
|
||||
kFileDatabaseData = 0x17,
|
||||
kFileCache = 0x18,
|
||||
|
||||
kFileModem = 0x0B // New 1.1 - Kies flashes the modem this way rather than using the EndModemFileTransferPacket.
|
||||
};*/
|
||||
|
||||
private:
|
||||
|
||||
unsigned int fileIdentifier;
|
||||
unsigned int endOfFile;
|
||||
|
||||
public:
|
||||
|
||||
EndPhoneFileTransferPacket(unsigned int sequenceByteCount, unsigned int unknown1, unsigned int chipIdentifier,
|
||||
unsigned int fileIdentifier, bool endOfFile)
|
||||
: EndFileTransferPacket(EndFileTransferPacket::kDestinationPhone, sequenceByteCount, unknown1, chipIdentifier)
|
||||
{
|
||||
this->fileIdentifier = fileIdentifier;
|
||||
this->endOfFile = (endOfFile) ? 1 : 0;
|
||||
}
|
||||
|
||||
unsigned int GetFileIdentifier(void)
|
||||
{
|
||||
return (fileIdentifier);
|
||||
}
|
||||
|
||||
bool IsEndOfFile(void) const
|
||||
{
|
||||
return (endOfFile == 1);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
EndFileTransferPacket::Pack();
|
||||
|
||||
PackInteger(EndFileTransferPacket::kDataSize, fileIdentifier);
|
||||
PackInteger(EndFileTransferPacket::kDataSize + 4, endOfFile);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
|
|
@ -1,73 +1,73 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef FILETRANSFERPACKET_H
|
||||
#define FILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "ControlPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class FileTransferPacket : public ControlPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kRequestFlash = 0x00,
|
||||
kRequestDump = 0x01,
|
||||
kRequestPart = 0x02,
|
||||
kRequestEnd = 0x03
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = ControlPacket::kDataSize + 4
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int request;
|
||||
|
||||
public:
|
||||
|
||||
FileTransferPacket(unsigned int request) : ControlPacket(ControlPacket::kControlTypeFileTransfer)
|
||||
{
|
||||
this->request = request;
|
||||
}
|
||||
|
||||
unsigned int GetRequest(void) const
|
||||
{
|
||||
return (request);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
ControlPacket::Pack();
|
||||
|
||||
PackInteger(ControlPacket::kDataSize, request);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef FILETRANSFERPACKET_H
|
||||
#define FILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "ControlPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class FileTransferPacket : public ControlPacket
|
||||
{
|
||||
public:
|
||||
|
||||
enum
|
||||
{
|
||||
kRequestFlash = 0x00,
|
||||
kRequestDump = 0x01,
|
||||
kRequestPart = 0x02,
|
||||
kRequestEnd = 0x03
|
||||
};
|
||||
|
||||
protected:
|
||||
|
||||
enum
|
||||
{
|
||||
kDataSize = ControlPacket::kDataSize + 4
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
unsigned int request;
|
||||
|
||||
public:
|
||||
|
||||
FileTransferPacket(unsigned int request) : ControlPacket(ControlPacket::kControlTypeFileTransfer)
|
||||
{
|
||||
this->request = request;
|
||||
}
|
||||
|
||||
unsigned int GetRequest(void) const
|
||||
{
|
||||
return (request);
|
||||
}
|
||||
|
||||
virtual void Pack(void)
|
||||
{
|
||||
ControlPacket::Pack();
|
||||
|
||||
PackInteger(ControlPacket::kDataSize, request);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -24,6 +24,7 @@
|
|||
// Heimdall
|
||||
#include "Arguments.h"
|
||||
#include "BridgeManager.h"
|
||||
#include "EnableTFlashPacket.h"
|
||||
#include "EndModemFileTransferPacket.h"
|
||||
#include "EndPhoneFileTransferPacket.h"
|
||||
#include "FlashAction.h"
|
||||
|
@ -39,17 +40,22 @@ using namespace Heimdall;
|
|||
|
||||
const char *FlashAction::usage = "Action: flash\n\
|
||||
Arguments:\n\
|
||||
--repartition --pit <filename>\n\
|
||||
--<partition name>|--<partition identifier> <filename> [...]\n\
|
||||
[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
|
||||
[--<partition name> <filename> ...]\n\
|
||||
[--<partition identifier> <filename> ...]\n\
|
||||
[--pit <filename>] [--verbose] [--no-reboot] [--resume] [--stdout-errors]\n\
|
||||
[--usb-log-level <none/error/warning/debug>]\n\
|
||||
or:\n\
|
||||
--<partition name>|--<partition identifier> <filename> [...]\n\
|
||||
[--pit <filename>]\n\
|
||||
[--verbose] [--no-reboot] [--stdout-errors] [--delay <ms>]\n\
|
||||
[--usb-log-level <none/error/warning/debug>]\n\
|
||||
--repartition --pit <filename> [--<partition name> <filename> ...]\n\
|
||||
[--<partition identifier> <filename> ...] [--verbose] [--no-reboot]\n\
|
||||
[--resume] [--stdout-errors] [--usb-log-level <none/error/warning/debug>]\n\
|
||||
[--tflash] [--skip-size-check]\n\
|
||||
Description: Flashes one or more firmware files to your phone. Partition names\n\
|
||||
(or identifiers) can be obtained by executing the print-pit action.\n\
|
||||
T-Flash mode allows to flash the inserted SD-card instead of the internal MMC.\n\
|
||||
Use --skip-size-check to not verify that files fit in the specified partition.\n\
|
||||
Note: --no-reboot causes the device to remain in download mode after the action\n\
|
||||
is completed. If you wish to perform another action whilst remaining in\n\
|
||||
download mode, then the following action must specify the --resume flag.\n\
|
||||
WARNING: If you're repartitioning it's strongly recommended you specify\n\
|
||||
all files at your disposal.\n";
|
||||
|
||||
|
@ -57,11 +63,13 @@ struct PartitionFile
|
|||
{
|
||||
const char *argumentName;
|
||||
FILE *file;
|
||||
unsigned long fileSize;
|
||||
|
||||
PartitionFile(const char *argumentName, FILE *file)
|
||||
PartitionFile(const char *argumentName, FILE *file, unsigned long fileSize)
|
||||
{
|
||||
this->argumentName = argumentName;
|
||||
this->file = file;
|
||||
this->fileSize = fileSize;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -85,7 +93,7 @@ static bool openFiles(Arguments& arguments, vector<PartitionFile>& partitionFile
|
|||
|
||||
if (pitArgument)
|
||||
{
|
||||
pitFile = fopen(pitArgument->GetValue().c_str(), "rb");
|
||||
pitFile = FileOpen(pitArgument->GetValue().c_str(), "rb");
|
||||
|
||||
if (!pitFile)
|
||||
{
|
||||
|
@ -98,9 +106,8 @@ static bool openFiles(Arguments& arguments, vector<PartitionFile>& partitionFile
|
|||
|
||||
for (vector<const Argument *>::const_iterator it = arguments.GetArguments().begin(); it != arguments.GetArguments().end(); it++)
|
||||
{
|
||||
bool isPartitionArgument = false;
|
||||
const string& argumentName = (*it)->GetName();
|
||||
|
||||
|
||||
// The only way an argument could exist without being in the argument types map is if it's a wild-card.
|
||||
// The "%d" wild-card refers to a partition by identifier, where as the "%s" wild-card refers to a
|
||||
// partition by name.
|
||||
|
@ -108,15 +115,18 @@ static bool openFiles(Arguments& arguments, vector<PartitionFile>& partitionFile
|
|||
if (arguments.GetArgumentTypes().find(argumentName) == arguments.GetArgumentTypes().end())
|
||||
{
|
||||
const StringArgument *stringArgument = static_cast<const StringArgument *>(*it);
|
||||
FILE *file = fopen(stringArgument->GetValue().c_str(), "rb");
|
||||
|
||||
FILE *file = FileOpen(stringArgument->GetValue().c_str(), "rb");
|
||||
if (!file)
|
||||
{
|
||||
Interface::PrintError("Failed to open file \"%s\"\n", stringArgument->GetValue().c_str());
|
||||
return (false);
|
||||
}
|
||||
|
||||
partitionFiles.push_back(PartitionFile(argumentName.c_str(), file));
|
||||
FileSeek(file, 0, SEEK_END);
|
||||
unsigned long fileSize = (unsigned long)FileTell(file);
|
||||
FileRewind(file);
|
||||
|
||||
partitionFiles.push_back(PartitionFile(argumentName.c_str(), file, fileSize));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -129,45 +139,43 @@ static void closeFiles(vector<PartitionFile>& partitionFiles, FILE *& pitFile)
|
|||
|
||||
if (pitFile)
|
||||
{
|
||||
fclose(pitFile);
|
||||
FileClose(pitFile);
|
||||
pitFile = nullptr;
|
||||
}
|
||||
|
||||
// Close partition files
|
||||
|
||||
for (vector<PartitionFile>::const_iterator it = partitionFiles.begin(); it != partitionFiles.end(); it++)
|
||||
fclose(it->file);
|
||||
FileClose(it->file);
|
||||
|
||||
partitionFiles.clear();
|
||||
}
|
||||
|
||||
static bool sendTotalTransferSize(BridgeManager *bridgeManager, const vector<PartitionFile>& partitionFiles, FILE *pitFile, bool repartition)
|
||||
{
|
||||
int totalBytes = 0;
|
||||
unsigned long totalBytes = 0;
|
||||
|
||||
for (vector<PartitionFile>::const_iterator it = partitionFiles.begin(); it != partitionFiles.end(); it++)
|
||||
{
|
||||
fseek(it->file, 0, SEEK_END);
|
||||
totalBytes += ftell(it->file);
|
||||
rewind(it->file);
|
||||
totalBytes += it->fileSize;
|
||||
}
|
||||
|
||||
if (repartition)
|
||||
{
|
||||
fseek(pitFile, 0, SEEK_END);
|
||||
totalBytes += ftell(pitFile);
|
||||
rewind(pitFile);
|
||||
FileSeek(pitFile, 0, SEEK_END);
|
||||
totalBytes += (unsigned long)FileTell(pitFile);
|
||||
FileRewind(pitFile);
|
||||
}
|
||||
|
||||
bool success;
|
||||
|
||||
|
||||
TotalBytesPacket *totalBytesPacket = new TotalBytesPacket(totalBytes);
|
||||
success = bridgeManager->SendPacket(totalBytesPacket);
|
||||
delete totalBytesPacket;
|
||||
|
||||
if (!success)
|
||||
{
|
||||
Interface::PrintError("Failed to send total bytes device info packet!\n");
|
||||
Interface::PrintError("Failed to send total bytes packet!\n");
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
@ -178,13 +186,13 @@ static bool sendTotalTransferSize(BridgeManager *bridgeManager, const vector<Par
|
|||
|
||||
if (!success)
|
||||
{
|
||||
Interface::PrintError("Failed to receive device info response!\n");
|
||||
Interface::PrintError("Failed to receive session total bytes response!\n");
|
||||
return (false);
|
||||
}
|
||||
|
||||
if (totalBytesResult != 0)
|
||||
{
|
||||
Interface::PrintError("Unexpected device info response!\nExpected: 0\nReceived:%d\n", totalBytesResponse);
|
||||
Interface::PrintError("Unexpected session total bytes response!\nExpected: 0\nReceived:%d\n", totalBytesResult);
|
||||
return (false);
|
||||
}
|
||||
|
||||
|
@ -247,11 +255,11 @@ static bool flashPitData(BridgeManager *bridgeManager, const PitData *pitData)
|
|||
static bool flashFile(BridgeManager *bridgeManager, const PartitionFlashInfo& partitionFlashInfo)
|
||||
{
|
||||
if (partitionFlashInfo.pitEntry->GetBinaryType() == PitEntry::kBinaryTypeCommunicationProcessor) // Modem
|
||||
{
|
||||
{
|
||||
Interface::Print("Uploading %s\n", partitionFlashInfo.pitEntry->GetPartitionName());
|
||||
|
||||
if (bridgeManager->SendFile(partitionFlashInfo.file, EndModemFileTransferPacket::kDestinationModem,
|
||||
partitionFlashInfo.pitEntry->GetDeviceType())) // <-- Odin method
|
||||
partitionFlashInfo.pitEntry->GetDeviceType()))
|
||||
{
|
||||
Interface::Print("%s upload successful\n\n", partitionFlashInfo.pitEntry->GetPartitionName());
|
||||
return (true);
|
||||
|
@ -280,7 +288,7 @@ static bool flashFile(BridgeManager *bridgeManager, const PartitionFlashInfo& pa
|
|||
}
|
||||
}
|
||||
|
||||
static bool flashPartitions(BridgeManager *bridgeManager, const vector<PartitionFile>& partitionFiles, const PitData *pitData, bool repartition)
|
||||
static bool flashPartitions(BridgeManager *bridgeManager, const vector<PartitionFile>& partitionFiles, const PitData *pitData, bool repartition, bool skip_size_check)
|
||||
{
|
||||
vector<PartitionFlashInfo> partitionFlashInfos;
|
||||
|
||||
|
@ -288,6 +296,28 @@ static bool flashPartitions(BridgeManager *bridgeManager, const vector<Partition
|
|||
if (!setupPartitionFlashInfo(partitionFiles, pitData, partitionFlashInfos))
|
||||
return (false);
|
||||
|
||||
/* Verify that the files we want to flash fit in partitions */
|
||||
if (!skip_size_check)
|
||||
{
|
||||
for (vector<PartitionFile>::const_iterator it = partitionFiles.begin(); it != partitionFiles.end(); it++)
|
||||
{
|
||||
const PitEntry *part = pitData->FindEntry(it->argumentName);
|
||||
if (part->GetDeviceType() != PitEntry::kDeviceTypeMMC &&
|
||||
part->GetDeviceType() != PitEntry::kDeviceTypeUFS)
|
||||
continue;
|
||||
unsigned long partitionSize = part->GetBlockCount();
|
||||
unsigned int blockSize = 512;
|
||||
if (part->GetDeviceType() == PitEntry::kDeviceTypeUFS)
|
||||
blockSize = 4096;
|
||||
if (partitionSize > 0 && it->fileSize > partitionSize*blockSize)
|
||||
{
|
||||
Interface::PrintError("%s partition is too small for given file. Use --skip-size-check to flash anyways.\n",
|
||||
it->argumentName);
|
||||
return (false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// If we're repartitioning then we need to flash the PIT file first (if it is listed in the PIT file).
|
||||
if (repartition)
|
||||
{
|
||||
|
@ -315,9 +345,9 @@ static PitData *getPitData(BridgeManager *bridgeManager, FILE *pitFile, bool rep
|
|||
{
|
||||
// Load the local pit file into memory.
|
||||
|
||||
fseek(pitFile, 0, SEEK_END);
|
||||
long localPitFileSize = ftell(pitFile);
|
||||
rewind(pitFile);
|
||||
FileSeek(pitFile, 0, SEEK_END);
|
||||
unsigned long localPitFileSize = (unsigned long)FileTell(pitFile);
|
||||
FileRewind(pitFile);
|
||||
|
||||
unsigned char *pitFileBuffer = new unsigned char[localPitFileSize];
|
||||
memset(pitFileBuffer, 0, localPitFileSize);
|
||||
|
@ -326,7 +356,7 @@ static PitData *getPitData(BridgeManager *bridgeManager, FILE *pitFile, bool rep
|
|||
|
||||
if (dataRead > 0)
|
||||
{
|
||||
rewind(pitFile);
|
||||
FileRewind(pitFile);
|
||||
|
||||
localPitData = new PitData();
|
||||
localPitData->Unpack(pitFileBuffer);
|
||||
|
@ -378,6 +408,40 @@ static PitData *getPitData(BridgeManager *bridgeManager, FILE *pitFile, bool rep
|
|||
return (pitData);
|
||||
}
|
||||
|
||||
static bool enableTFlash(BridgeManager *bridgeManager)
|
||||
{
|
||||
bool success;
|
||||
|
||||
EnableTFlashPacket *enableTFlashPacket = new EnableTFlashPacket();
|
||||
success = bridgeManager->SendPacket(enableTFlashPacket);
|
||||
delete enableTFlashPacket;
|
||||
|
||||
if (!success)
|
||||
{
|
||||
Interface::PrintError("Failed to send T-Flash packet!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
SessionSetupResponse *enableTFlashResponse = new SessionSetupResponse();
|
||||
success = bridgeManager->ReceivePacket(enableTFlashResponse, 5000);
|
||||
unsigned int result = enableTFlashResponse->GetResult();
|
||||
delete enableTFlashResponse;
|
||||
|
||||
if (!success)
|
||||
{
|
||||
Interface::PrintError("Failed to receive T-Flash response!\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result)
|
||||
{
|
||||
Interface::PrintError("Unexpected T-Flash response!\nExpected: 0\nReceived: %d\n", result);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int FlashAction::Execute(int argc, char **argv)
|
||||
{
|
||||
// Setup argument types
|
||||
|
@ -389,10 +453,11 @@ int FlashAction::Execute(int argc, char **argv)
|
|||
|
||||
argumentTypes["no-reboot"] = kArgumentTypeFlag;
|
||||
argumentTypes["resume"] = kArgumentTypeFlag;
|
||||
argumentTypes["delay"] = kArgumentTypeUnsignedInteger;
|
||||
argumentTypes["verbose"] = kArgumentTypeFlag;
|
||||
argumentTypes["stdout-errors"] = kArgumentTypeFlag;
|
||||
argumentTypes["usb-log-level"] = kArgumentTypeString;
|
||||
argumentTypes["tflash"] = kArgumentTypeFlag;
|
||||
argumentTypes["skip-size-check"] = kArgumentTypeFlag;
|
||||
|
||||
argumentTypes["pit"] = kArgumentTypeString;
|
||||
shortArgumentAliases["pit"] = "pit";
|
||||
|
@ -417,12 +482,12 @@ int FlashAction::Execute(int argc, char **argv)
|
|||
return (0);
|
||||
}
|
||||
|
||||
const UnsignedIntegerArgument *communicationDelayArgument = static_cast<const UnsignedIntegerArgument *>(arguments.GetArgument("delay"));
|
||||
|
||||
bool reboot = arguments.GetArgument("no-reboot") == nullptr;
|
||||
bool resume = arguments.GetArgument("resume") != nullptr;
|
||||
bool verbose = arguments.GetArgument("verbose") != nullptr;
|
||||
|
||||
bool tflash = arguments.GetArgument("tflash") != nullptr;
|
||||
bool skip_size_check = arguments.GetArgument("skip-size-check") != nullptr;
|
||||
|
||||
if (arguments.GetArgument("stdout-errors") != nullptr)
|
||||
Interface::SetStdoutErrors(true);
|
||||
|
||||
|
@ -474,7 +539,7 @@ int FlashAction::Execute(int argc, char **argv)
|
|||
}
|
||||
|
||||
// Open files
|
||||
|
||||
|
||||
FILE *pitFile = nullptr;
|
||||
vector<PartitionFile> partitionFiles;
|
||||
|
||||
|
@ -497,12 +562,7 @@ int FlashAction::Execute(int argc, char **argv)
|
|||
|
||||
// Perform flash
|
||||
|
||||
int communicationDelay = BridgeManager::kCommunicationDelayDefault;
|
||||
|
||||
if (communicationDelayArgument)
|
||||
communicationDelay = communicationDelayArgument->GetValue();
|
||||
|
||||
BridgeManager *bridgeManager = new BridgeManager(verbose, communicationDelay);
|
||||
BridgeManager *bridgeManager = new BridgeManager(verbose);
|
||||
bridgeManager->SetUsbLogLevel(usbLogLevel);
|
||||
|
||||
if (bridgeManager->Initialise(resume) != BridgeManager::kInitialiseSucceeded || !bridgeManager->BeginSession())
|
||||
|
@ -513,14 +573,24 @@ int FlashAction::Execute(int argc, char **argv)
|
|||
return (1);
|
||||
}
|
||||
|
||||
if (tflash && !enableTFlash(bridgeManager))
|
||||
{
|
||||
closeFiles(partitionFiles, pitFile);
|
||||
delete bridgeManager;
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
bool success = sendTotalTransferSize(bridgeManager, partitionFiles, pitFile, repartition);
|
||||
|
||||
if (success)
|
||||
{
|
||||
PitData *pitData = getPitData(bridgeManager, pitFile, repartition);
|
||||
|
||||
|
||||
if (pitData)
|
||||
success = flashPartitions(bridgeManager, partitionFiles, pitData, repartition);
|
||||
success = flashPartitions(bridgeManager, partitionFiles,
|
||||
pitData, repartition,
|
||||
skip_size_check);
|
||||
else
|
||||
success = false;
|
||||
|
||||
|
@ -531,7 +601,7 @@ int FlashAction::Execute(int argc, char **argv)
|
|||
success = false;
|
||||
|
||||
delete bridgeManager;
|
||||
|
||||
|
||||
closeFiles(partitionFiles, pitFile);
|
||||
|
||||
return (success ? 0 : 1);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2013 Benjamin Dobell, Glass Echidna
|
||||
/* Copyright (c) 2010-2017 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
|
||||
|
@ -28,7 +28,7 @@ namespace Heimdall
|
|||
extern const char *usage;
|
||||
|
||||
int Execute(int argc, char **argv);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,57 +1,57 @@
|
|||
/* Copyright (c) 2010-2013 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef FLASHPARTFILETRANSFERPACKET_H
|
||||
#define FLASHPARTFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class FlashPartFileTransferPacket : public FileTransferPacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int sequenceByteCount;
|
||||
|
||||
public:
|
||||
|
||||
FlashPartFileTransferPacket(unsigned int sequenceByteCount)
|
||||
: FileTransferPacket(FileTransferPacket::kRequestPart)
|
||||
{
|
||||
this->sequenceByteCount = sequenceByteCount;
|
||||
}
|
||||
|
||||
unsigned int GetSequenceByteCount(void) const
|
||||
{
|
||||
return (sequenceByteCount);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, sequenceByteCount);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
/* Copyright (c) 2010-2017 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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
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.*/
|
||||
|
||||
#ifndef FLASHPARTFILETRANSFERPACKET_H
|
||||
#define FLASHPARTFILETRANSFERPACKET_H
|
||||
|
||||
// Heimdall
|
||||
#include "FileTransferPacket.h"
|
||||
|
||||
namespace Heimdall
|
||||
{
|
||||
class FlashPartFileTransferPacket : public FileTransferPacket
|
||||
{
|
||||
private:
|
||||
|
||||
unsigned int sequenceByteCount;
|
||||
|
||||
public:
|
||||
|
||||
FlashPartFileTransferPacket(unsigned int sequenceByteCount)
|
||||
: FileTransferPacket(FileTransferPacket::kRequestPart)
|
||||
{
|
||||
this->sequenceByteCount = sequenceByteCount;
|
||||
}
|
||||
|
||||
unsigned int GetSequenceByteCount(void) const
|
||||
{
|
||||
return (sequenceByteCount);
|
||||
}
|
||||
|
||||
void Pack(void)
|
||||
{
|
||||
FileTransferPacket::Pack();
|
||||
|
||||
PackInteger(FileTransferPacket::kDataSize, sequenceByteCount);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue