aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Minor updates to README.HEADmainSimon Tatham2023-08-181-16/+17
| | | | | | | | | | | | | | | | Someone on https://github.com/wixtoolset/issues/issues/4381 found this repository recently and judged it to be abandoned, whereas in fact it's been working reliably for me for nearly a decade and I just don't have to fix bugs in it very often. Looking at the README, I wonder if the reason they thought it was abandoned is that _that_ hadn't been updated in a very long time! It still said 'very new', 'only ever tested on Ubuntu 14.04' (which was true at the beginning of the project's life), and 'only supports Python 2' (an outright untruth). I've brought it up to date, and made it look more like 'stable' than 'abandoned immediately after creation'.
* Migrate Python code to Python 3.Simon Tatham2020-08-262-15/+17
|
* Stop using real pointers as handles in makemsi.c.Simon Tatham2018-05-141-22/+81
| | | | | | | | | | | | | | Upgrading to Ubuntu 18.04, which seems to have become more prone to allocating process memory above the 4G boundary, has revealed that the client code of the phony msi.dll functions is not in fact prepared to accept arbitrary machine-word sized pointer values. It's expecting 32-bit handles, so we were segfaulting because MsiDatabaseImportW was only being given the bottom 32 bits of the 64-bit pointer that MsiOpenDatabaseW had returned. So now I just keep a trivial registry of small integer handle values and the pointers they map to. I don't even bother to recycle them - the process isn't expected to run for long enough for me to care.
* First draft of licence and readme files.Simon Tatham2017-06-072-0/+116
|
* Fix WORD16 and WORD32 macros.Simon Tatham2017-05-281-11/+11
| | | | | | | | | | | | | | | | | | I made the mistake of using the same variable name _offset for the temporary variable in WORD16 and WORD32, and for the one in BYTE which the other two use as a subroutine - meaning that the declaration on the first line of BYTE read 'size_t _offset = _offset+3' or similar, in which the RHS _offset referred to the newly declared LHS one rather than to the one in the outer scope. WORD32 had the additional goof that I had declared its return-value accumulator variable as a 16- rather than 32-bit integer due to copy-and-paste error. Between those two mistakes - surely introduced at the last minute when I was doing code cleanup on this source base, because I know this function was working OK before then - I had completely broken the extraction of version strings from PE executables.
* Add a command-line test program.Simon Tatham2017-05-288-3/+50
| | | | | | At the moment it only tests MsiGetFileVersion, because that's the piece I just found a problem in, but I could easily extend it to have convenient command-line test rigs for other parts of this setup too.
* Rename the last 'fake' file.Simon Tatham2017-05-182-16/+3
|
* Move CAB-reading into its own file.Simon Tatham2017-05-183-35/+43
|
* Rename the libraries to remove the extra ".so" in the names.Simon Tatham2017-05-181-4/+4
| | | | | | I don't know why those strange names seemed necessary to start with and now don't seem to be. I probably changed something subtle somewhere without noticing.
* General MD5 cleanups.Simon Tatham2017-05-181-34/+24
| | | | | I did these in passing while looking for the bug in the previous commit, and they seem like general improvements, so I'll keep them.
* Fix parenthesis goof in the revised file-MD5ing code.Simon Tatham2017-05-181-1/+1
| | | | Every block I read was being condensed down to one byte.
* Fix a memory-management goof.Simon Tatham2017-05-181-2/+1
| | | | That's what I get for actually trying to free my memory :-)
* Make the symlinking in 'make install' idempotent.Simon Tatham2017-05-181-2/+4
|
* Rename fake-msi.c to makemsi.c.Simon Tatham2017-05-182-6/+14
| | | | | | | | | | It's now a sensible source flie containing a set of routines that do something coherently connected to each other, so it doesn't deserve that 'fake-' prefix that I used for the previous monolithic files full of tangled-together stuff. While I'm here, I've also made up nicer (i.e. more distinguishable) random magic numbers for the structure-type disambiguation.
* Move CAB-creation routines into their own file.Simon Tatham2017-05-183-69/+88
| | | | Also tidy up some of the memory management, while I'm here.
* Move the char16 functions into their own file.Simon Tatham2017-05-188-21/+13
| | | | This completes the removal of the monolithic fake-lib.[ch].
* Move system_argv_* into their own file.Simon Tatham2017-05-188-57/+72
|
* Move dupcat out into its own file, and add dupstr.Simon Tatham2017-05-187-58/+68
| | | | Also a handy #define to replace all those tedious castings of NULL.
* Redo the bounds checks in MsiGetFileVersion.Simon Tatham2017-05-183-51/+58
| | | | | Now any failing bounds check causes the whole function to fail, rather than returning a made-up value.
* Move MsiGetFileVersion out into its own file.Simon Tatham2017-05-183-184/+197
|
* Move snew/sfree out into their own header+src.Simon Tatham2017-05-188-25/+36
|
* Move MD5 out into its own file.Simon Tatham2017-05-185-255/+275
| | | | | This begins a programme of code reorganisation at the end of which I'd like to end up with something almost legible :-)
* Set up an autotools system.Simon Tatham2017-05-175-21/+65
| | | | Supersedes the hand-hacked Makefile I was previously working with.
* Top-level wrapper script to do the environment setup.Simon Tatham2017-05-171-0/+22
| | | | | | | This sets up $WIX and $LD_PRELOAD before running a Wix .NET executable via mono, so the user doesn't have to have pre-prepared those variables (and, in particular, libpreload doesn't uncontrolledly affect loads of other stuff too).
* Find makecab.py via $WIX rather than $PATH.Simon Tatham2017-05-171-1/+2
| | | | | | We have to define $WIX in any case for libpreload, so we might as well get our money's worth out of it and not also require the Wix directory to be on PATH.
* Fix checksum calculation in CAB data records.Simon Tatham2017-05-161-1/+5
| | | | | | | | | [MS-CAB] is pretty unclearly worded in this area. Turns out that if the sequence of bytes being checksummed is not a multiple of 4 bytes, you are supposed to _first_ reverse the order of the trailing (n % 4) bytes, and _then_ append zero bytes to pad to a multiple of 4, before you do the main checksum operation of XORing together all the 32-bit words of the input.
* Write terminating strings when MsiGetFileVersion() fails.Simon Tatham2017-05-161-0/+5
| | | | | | | | | I had expected that if you were returning a failure code you didn't have to - perhaps even _shouldn't_ - write through the output pointer arguments. But in fact, now that my implementation of MsiGetFileVersion _knows_ how to fail (i.e. doesn't just return a hardcoded value for every call), the MSI build doesn't work unless I also clear the output strings in the case of failure.
* Implement MsiGetFileHash.Simon Tatham2017-05-163-0/+253
| | | | | | A quick experiment or two with the real Windows version suggests that the hash function in question is just MD5, repackaged as an array of four little-endian 32-bit words instead of 16 bytes.
* Implement MsiGetFileVersion.Simon Tatham2017-05-163-6/+188
| | | | | This is pretty ugly code, but it works well enough to deliver the right versions for the files in my test MSI. I can polish it later.
* My own CAB-maker, which compresses.Simon Tatham2017-05-162-12/+112
| | | | | | | | | lcab produces uncompressed CAB files, which is a bit low-quality for my taste - especially when it turns out CAB files have Deflate as one of their compression options, so I can write a compressed CAB-builder in only about 100 lines of Python using the zlib module! I'd expected to have to faff about finding an implementation of LZX, but there's really no need to bother.
* Use an LD_PRELOAD library in place of symlink to /home.Simon Tatham2017-05-162-1/+45
| | | | | | | | | | | | Apart from dependency on native-code DLLs, the one other quirk of running WiX under mono is that it doesn't seem to quite get the right answers when combining $PWD with a Unix absolute path to one of its own supporting files - it doesn't interpret the leading slash on the latter as meaning $PWD should be ignored, so it tries to look for /home/my/build/dir/home/my/wix/install/dir/some.file. Previously I was bodging around that by having my build dir contain a symlink 'home' pointing at /home; this is marginally less intrusive.
* Create the cab with the files in the right order.Simon Tatham2017-05-151-3/+22
| | | | | | | | | In my test MSI, the files are supposed to be in alphabetical order, not in 'whatever order lcab enumerated the Unix directory I pointed it at' order. The test MSI didn't install, but with this change, it does, so my guess is that either the real Windows installer system depends on the alphabetical order for a search algorithm, or else files in the cab are referred to by a numeric index of some kind.
* Trivial misspelled option.Simon Tatham2017-05-151-1/+1
|
* We now get as far as building a non-empty MSI file!Simon Tatham2017-05-154-49/+190
| | | | | But I haven't tested it yet, so it's probably got a zillion things wrong inside it.
* Build cab files using lcab.Simon Tatham2017-05-155-102/+94
|
* All the remaining function stubs I appear to need.Simon Tatham2017-05-153-3/+183
| | | | | Now I can get an idea of what sequence of calls WiX actually expects to use to build an MSI.
* Start of a fake msi.dll.Simon Tatham2017-02-202-1/+18
| | | | | This seems to be the next function WiX expects from its native-code DLLs. So far it's just a stub.
* Set up a libtoolish Makefile for fake libs.Simon Tatham2017-02-202-42/+17
| | | | The previous handwritten .la was a daft way of doing things!
* Fake implementation of winterop.dll.Simon Tatham2017-02-162-0/+195
If I compile this to Linux native code, and then run WiX under Mono, it loads this library and gets past the first CabExtract call, so I can find out what the next problem turns out to be.