Skip to content

Commit 8710041

Browse files
innosetup: build edit-git-bash.dll in release.sh
The Makefile was modified to ensure that `edit-git-bash.c` is always compiled as a 32-bit DLL when the `edit-git-bash.dll` target is invoked. InnoSetup is only 32-bit "aware", so even for the 64-bit distribution, a 32-bit DLL needs to be used. The InnoSetup `release.sh` script was updated to include building `edit-git-bash.dll`. The rendering of release notes was moved until after all argument processing; this also had the advantage of placing the call to `make` directly after it--these activities are sort of "pre-processing" before the actual generation of the installer and made logical sense to this developer. Lastly, the `install.iss` file was updated to source the DLL from it's new location in `build-extra`; the old edit-git-bash.dll in the `installer` directory was deleted. Signed-off-by: Craig E. Shea <[email protected]>
1 parent 0ae2f29 commit 8710041

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ DLLINKFLAGS=-Wl,--kill-at -static-libgcc -shared
33

44
all: edit-git-bash.dll
55

6+
# InnoSetup always uses the DLL target, and it must always be 32-bit
7+
# because InnoSetup is only 32-bit aware.
68
edit-git-bash.dll: edit-git-bash.c
7-
gcc $(CFLAGS) $(DLLINKFLAGS) -o $@ $^
9+
PATH=/mingw32/bin:$$PATH \
10+
i686-w64-mingw32-gcc -march=i686 $(CFLAGS) $(DLLINKFLAGS) -o $@ $^
811

912
edit-git-bash.exe: edit-git-bash.c
10-
gcc -DSTANDALONE_EXE $(CFLAGS) -o $@ $^
13+
gcc -DSTANDALONE_EXE $(CFLAGS) -o $@ $^

installer/edit-git-bash.dll

-80.2 KB
Binary file not shown.

installer/install.iss

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Filename: {app}\ReleaseNotes.html; Description: View Release Notes; Flags: shell
105105
Source: {#SourcePath}\ReleaseNotes.html; DestDir: {app}; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore
106106
Source: {#SourcePath}\LICENSE.txt; DestDir: {app}; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore
107107
Source: {#SourcePath}\NOTICE.txt; DestDir: {app}; Flags: replacesameversion; AfterInstall: DeleteFromVirtualStore; Check: ParamIsSet('VSNOTICE')
108-
Source: {#SourcePath}\edit-git-bash.dll; Flags: dontcopy
108+
Source: {#SourcePath}\..\edit-git-bash.dll; Flags: dontcopy
109109

110110
[Dirs]
111111
Name: "{app}\tmp"

installer/release.sh

+6-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ case "$version" in
5151
*) die "InnoSetup requires a version that begins with a digit";;
5252
esac
5353

54-
../render-release-notes.sh --css usr/share/git/
55-
5654
# Evaluate architecture
5755
ARCH="$(uname -m)"
5856

@@ -68,6 +66,12 @@ x86_64)
6866
;;
6967
esac
7068

69+
echo "Generating release notes to be included in the installer ..."
70+
../render-release-notes.sh --css usr/share/git/
71+
72+
echo "Compiling edit-git-bash.dll ..."
73+
make -C ../ edit-git-bash.dll
74+
7175
if test t = "$skip_files"
7276
then
7377
LIST=

0 commit comments

Comments
 (0)