summaryrefslogtreecommitdiffstats
path: root/rbutil/sansapatcher
AgeCommit message (Collapse)AuthorFilesLines
2021-12-24rbutil: Merge rbutil with utils folder.Dominik Riebeling12-2173/+0
rbutil uses several components from the utils folder, and can be considered part of utils too. Having it in a separate folder is an arbitrary split that doesn't help anymore these days, so merge them. This also allows other utils to easily use libtools.make without the need to navigate to a different folder. Change-Id: I3fc2f4de19e3e776553efb5dea5f779dfec0dc21
2020-10-11rbutil: Add project file for building multiple binaries.Dominik Riebeling1-0/+38
To use ipodpatcher and sansapatcher as external binaries (so we can do proper permission elevation) we need to build them using qmake as part of the main build. Add a subdirs template based project file to do that, and project files for the patchers. Move Linux appimage rules one level up, since it needs to include the patchers as well. Change-Id: I63ee59372668f4319402df65a77a6f04521d133b
2020-09-27sansapatcher: rework exit code handling.Dominik Riebeling2-22/+43
- #define all exit codes and use them for indicating further errors. - only enable interactive (i.e. wait for keypress before exiting) mode when built with bootloaders. Change-Id: I6dcbc51226aadc4ab640bf260b6331ddbd4773cc
2020-06-07misc: Remove all 'twiki' references in favor of up-to-date 'wiki' links.Solomon Peachy1-1/+1
(This migration happened over a decade ago!) Change-Id: Ib396414a16f2d763e549af49e3f3b03047dab49c
2016-12-16Don't add LIBSOURCES to SOURCES.Dominik Riebeling1-1/+1
Split source files for library and stand-alone binary and use library as dependency when building the stand-alone binary. This avoids dependencies getting added multiple times. Remove outdated RBARCH handling, we always create fat binaries on OS X these days. Change-Id: Ia15a731296edcbe90869a1bf66dda2c3d6c7e317
2013-04-04Put resource object into object folder.Dominik Riebeling1-1/+2
Use correct path for windres output. Fixes windres running even if no changes are present. Change-Id: I2841113bab9b38f2a03ba2f168b3d8bdb5c102df
2013-01-22Remove 64bit warning by using C99 fixed width format specifier.Dominik Riebeling1-11/+11
Change-Id: I422d0a7ca91170b27171178ad6a8d7ff7ac32570
2013-01-01Provide dealloc function to sansapatcher.Dominik Riebeling4-0/+25
Similar as done with ipodpatcher provide a function to free the allocated sector buffer. Change-Id: Ie51e82f7191496bb48973148af1cc35cd37993d3
2013-01-01Fix cross compiling sansapatcher.Dominik Riebeling1-1/+1
windres also needs the cross compiler prefix. Change-Id: Ia27ac8b9f3b47962764eff6b960e1105544b0b89
2013-01-01sansapatcher: move sectorbuf pointer into sansa_t structure.Dominik Riebeling6-75/+65
Similar as the ipod_t structure for ipodpatcher the sansa_t structure holds all relevant information for sansapatcher. Put the global sansa_sectorbuf pointer into it as well. Change-Id: Iad08ef6aafc49609c3d0d556914246f230ee0179
2012-04-28Move bin2c handling to libtools.makeDominik Riebeling1-7/+5
Change-Id: I60353bb9f9fd2658d66ba7f352e04f7489c7bf5d
2012-02-05Make sure we use POSIX/C99 printf() when building for windowsRafaël Carré1-1/+1
Change-Id: I429ed40dc2b9d4fb238762113bd40936df896df0 Reviewed-on: http://gerrit.rockbox.org/85 Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2012-01-08MSVC compatibility adjustments.Dominik Riebeling1-0/+8
When using a global variable from a DLL with MSVC special handling is necessary to avoid going through additional redirection. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31640 a1c6a512-1295-4272-9138-f99709370657
2011-12-16sansapatcher, ipodpatcher: use MinGW C99 version of stdio functions.Dominik Riebeling1-1/+1
The MinGW versions know additional format identifiers. Use those versions to avoid warnings. See also http://article.gmane.org/gmane.comp.gnu.mingw.user/27539/ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31331 a1c6a512-1295-4272-9138-f99709370657
2011-12-16sansapatcher: allow building without bootloaders.Dominik Riebeling2-1/+13
There is no need to always build sansapatcher with embedded bootloaders. Allow building without similar to ipodpatcher. Interactive mode will obviously not be available if built without bootloaders. Fix rules for creating the source files for the embedded bootloaders. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31328 a1c6a512-1295-4272-9138-f99709370657
2011-12-16sansapatcher: use libtools.make.Dominik Riebeling1-51/+40
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31327 a1c6a512-1295-4272-9138-f99709370657
2011-12-08Various adjustments for MSVC.Dominik Riebeling1-1/+3
- MSVC uses different namings in some places. Adjust the sources via the preprocessor if build with MSVC. - MSVC doesn't know about __func__, use name instead. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31185 a1c6a512-1295-4272-9138-f99709370657
2011-12-04sansapatcher: factor out handling of bundled bootloaders.Dominik Riebeling3-64/+76
Instead of handling bundled bootloaders in the sansapatcher functions leave that to the caller. This removes the need to have Rockbox Utility specific parts in sansapatcher. sansa_add_bootloader() now operates on an already loaded bootloader. For loading a convenience function sansa_read_bootloader() is added. This also introduces a new check on loading to prevent installing an e200 bootloader on a c200 (and vice versa). These changes will allow building a libsansapatcher for linking with Rockbox Utility later. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31144 a1c6a512-1295-4272-9138-f99709370657
2011-12-04sansapatcher: guard platform specific files.Dominik Riebeling3-1/+14
Use the preprocessor to make platform specific files compile as empty files if built for a different platform. This removes the need to distinguish in the Makefile and simplifies creating a libsansapatcher. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31143 a1c6a512-1295-4272-9138-f99709370657
2011-11-06Bulk convert all DOS line endings to UNIX.Torne Wuff1-1/+1
For the git migration we want a nice clean repository with UNIX line endings. git does not use svn:eol-style, we just need the file contents to be sane. Sorry everybody. I know this messes up blame. Scumbag *NIX developer says migrating to git will make line ending issues go away; commits giant change to svn which changes line endings anyway. :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30924 a1c6a512-1295-4272-9138-f99709370657
2010-12-05MinGW: prefer C99 compliance by using replacement implementations.Dominik Riebeling1-0/+1
This addresses several warnings caused by format modifiers that are not supported by MSVCRT. MinGW provides replacement functions since mingw-runtime 3.15 so use them. See also http://article.gmane.org/gmane.comp.gnu.mingw.user/27539/ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28735 a1c6a512-1295-4272-9138-f99709370657
2009-12-09Always format error message using ANSI functions to get rid of type-punning ↵Dominik Riebeling1-3/+3
when building with rbutil. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23913 a1c6a512-1295-4272-9138-f99709370657
2009-11-08Rename print_error() in ipodpatcher and sansapatcher.Dominik Riebeling4-17/+14
Both patchers use the same function name with one being removed when building for rbutil. This gets in the way trying to move the patchers to libraries, and it also results a linking dependency of sansapatcher on ipodpatcher. Renaming the function makes both more self-contained and avoids potential issues if the functions happen to not do the same. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23568 a1c6a512-1295-4272-9138-f99709370657
2009-07-11Small tweaks to r21778/r21779 - use -p for both mkdir and cp commands in dmg ↵Dave Chapman1-2/+2
creation rule git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21793 a1c6a512-1295-4272-9138-f99709370657
2009-07-11sansapatcher: new sansapatcher.dmg creation rule for OSXRafaël Carré1-1/+7
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21778 a1c6a512-1295-4272-9138-f99709370657
2009-07-10Also bump version in trunkFrank Gevaerts1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21747 a1c6a512-1295-4272-9138-f99709370657
2009-06-22Add an explicit rule to compile bin2c - r21272 broke compilation of ↵Dave Chapman1-0/+3
sansapatcher on at least Linux because Make's implicit rule for compiling bin2c was being used, which uses CC, which was set to i586-mingw32msvc-gcc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21476 a1c6a512-1295-4272-9138-f99709370657
2009-06-13Make bin2c compile with VS2005 and move it to a separate folder as its ↵Dominik Riebeling2-143/+5
getting used by different tools now. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21272 a1c6a512-1295-4272-9138-f99709370657
2009-05-01Make sure the global buffers for ipodpatcher and sansapatcher get allocated ↵Dominik Riebeling1-1/+1
and freed only once. Fixes segfaults when the bootloader install class was instanciated multiple times. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20835 a1c6a512-1295-4272-9138-f99709370657
2008-10-23Bump version number to v0.7 with 5.0 bootloaders. Part of FS#9369.Robert Menes1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18868 a1c6a512-1295-4272-9138-f99709370657
2008-08-31Replaced TAB characters by spaces in sansapatcherBertrik Sikken3-33/+33
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18368 a1c6a512-1295-4272-9138-f99709370657
2008-08-31Fix missing sansa_close when scanning for sansas in sansapatcher.cBertrik Sikken1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18367 a1c6a512-1295-4272-9138-f99709370657
2008-08-01Improved README for sansapatcher, contributed by Ori Avtalion, slightly ↵Dave Chapman1-0/+26
modified by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18169 a1c6a512-1295-4272-9138-f99709370657
2008-07-28Redo r18136 a little cleanerBertrik Sikken1-4/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18141 a1c6a512-1295-4272-9138-f99709370657
2008-07-27Make sure to always use the initial key for decryption of mi4 files in ↵Bertrik Sikken1-2/+4
sansapatcher. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18136 a1c6a512-1295-4272-9138-f99709370657
2008-07-27Added mi4 key for sansa c200 OF version 01.01.07Bertrik Sikken1-2/+3
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18135 a1c6a512-1295-4272-9138-f99709370657
2008-07-16Let sansa_list_images() return the number of mi4 images found.Dominik Riebeling2-4/+10
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18074 a1c6a512-1295-4272-9138-f99709370657
2008-07-14Make functions in sansapatcher static and their arguments const if possible.Bertrik Sikken4-22/+21
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18037 a1c6a512-1295-4272-9138-f99709370657
2008-07-14Fix FS#9002 - Bootloader on c200 shows "target id: e200"Bertrik Sikken1-4/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18035 a1c6a512-1295-4272-9138-f99709370657
2008-06-30When scanning for Ipod / Sansa close the disc handle of every tried disc, ↵Dominik Riebeling1-0/+3
not only for successful checks. Fixes "no Sansa found" issues with rbutil on w32 after autodetection was used. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17893 a1c6a512-1295-4272-9138-f99709370657
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg7-14/+28
later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657
2008-06-17Rename variables sectorbuf and verbose to avoid clashes in rbutil. Cleanup ↵Dominik Riebeling3-62/+59
exports a bit. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17730 a1c6a512-1295-4272-9138-f99709370657
2008-05-22Move C linkage binding for c++ to exporting header files instead of includes.Dominik Riebeling1-0/+8
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17609 a1c6a512-1295-4272-9138-f99709370657
2008-05-11Make sansapatcher check and report permission denied errors.Dominik Riebeling3-23/+42
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17461 a1c6a512-1295-4272-9138-f99709370657
2008-03-25Make sansapatcher and ipodpatcher compile on OS X 10.5.Barry Wardell1-2/+2
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16804 a1c6a512-1295-4272-9138-f99709370657
2008-01-26fix sansapatcher mingw build prerequisites.Dominik Riebeling1-1/+1
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16173 a1c6a512-1295-4272-9138-f99709370657
2008-01-20add Manifests to rbutil, sansapatcher and e200rpatcher to gain needed rights ↵Dominik Wenger3-2/+20
on windows vista. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16120 a1c6a512-1295-4272-9138-f99709370657
2008-01-06allow building ipodpatcher / sansapatcher with MinGW.Dominik Riebeling1-0/+5
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16003 a1c6a512-1295-4272-9138-f99709370657
2007-11-29Add some brief instructions to compile sansapatcherDave Chapman1-0/+10
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15847 a1c6a512-1295-4272-9138-f99709370657
2007-10-31RbUtilQt: Make Sansa bootloader installation work on Windows. (Compiler ↵Magnus Holmgren1-2/+2
warnings _are_ useful. :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15386 a1c6a512-1295-4272-9138-f99709370657