twogood / unshield

Tool and library to extract CAB files from InstallShield installers
MIT License
348 stars 75 forks source link

improve test infrastructure and OS compatibility #123

Closed wdlkmpx closed 3 years ago

wdlkmpx commented 3 years ago

Screenshot(9)

This simplifies the CMake stuff, adds md5/zlib/win32-fnmatc.h among other things

Travis Compilers: gcc & clang (MSVC 2017 on Windows)

run-tests.sh

Full test suite for:

twogood commented 3 years ago

Can we get you on the OSS plan somehow?

wdlkmpx commented 3 years ago

I'm on the OSS plan, I must contact the Travis team to get OSS credtis. OSS only credits: 0

I've triggered many builds. I spent hours reading the logs, what you see here is stable, 'cause I fixed all the issues I found.

Even the AppVeyor Windows build finally finishes compiling with 0 warnings.

Doing things beyond this is actually another phase.

twogood commented 3 years ago

Magic

twogood commented 3 years ago

Or rather not magic, but it still shines

wdlkmpx commented 3 years ago

Here are some test builds I compiled - 4 static linux binaries, win32 and win64 https://sourceforge.net/projects/wdl/files/apps/unshield/

I will delete those binaries in a month perhaps.

Talking about Travis CI, the linux gcc builds should be skipped macOS: should not install gcc, compile only with clang... this OS consumes 50 credits per minute or sometjing like that

wdlkmpx commented 3 years ago

I figured out that perhaps I can perform rebases and make everything more compact, so I'll close this for now. Travis CI is going to kill us all.

I have a script called zlib2unshield.sh that copies only the source files needed by unshield https://github.com/wdlkmpx/unshield/blob/master/lib/zlib/zlib2unshield.sh

Currently zlib is the biggest change, even when only a few files were copied from the zlib repo, I detected that even less files are needed:

# don't need crc32.c/crc32.h only adler32.c
sed -i '/define GUNZIP/d' inflate.h
#gzip='crc32.c crc32.h'

#  Normally either infback.o or inflate.o would be linked into an application--not both
#extra='infback.c'

Results:

 lib/Makefile.am           |   2 +-
 lib/zlib/CMakeLists.txt   |   8 +-
 lib/zlib/crc32.c          | 442 ---------------------------------------------------------------
 lib/zlib/crc32.h          | 441 ---------------------------------------------------------------
 lib/zlib/infback.c        | 640 --------------------------------------------------------------------------------------------
 lib/zlib/inflate.h        |   1 -
 lib/zlib/zlib2unshield.sh |  13 +-
 7 files changed, 15 insertions(+), 1532 deletions(-)