# # # rename "win32/monotone.iss" # to "win32/monotone.iss.in" # # add_file "win32/dlls.sh" # content [349ccf07f61cd1fdf873d3120cdb4b62039ba33b] # # patch "Makefile.am" # from [9efbf6305f5a9d6d6a620bd03f757b4fe57dffa8] # to [aa67219307bb325292e741e15ef08b75a3bee2e4] # # patch "configure.ac" # from [875328a1985e1e6aa2cb58adc5123044bd1cd04a] # to [58891679a723cc7bc9fcccdc7af1df672b53cce1] # # patch "win32/README" # from [5eb8c63b68c4a3b71dd3098e6a164610b48249a8] # to [4d26d85828cd1c9eb49e764c40aa111c36531bde] # # patch "win32/monotone.iss.in" # from [586ddd499e27bda0c3dab68d85fd31dd9a28c6d2] # to [6ab5cbbd22e82d270fb76043fe4abe9fbcf7941a] # ============================================================ --- win32/dlls.sh 349ccf07f61cd1fdf873d3120cdb4b62039ba33b +++ win32/dlls.sh 349ccf07f61cd1fdf873d3120cdb4b62039ba33b @@ -0,0 +1,16 @@ +#!/bin/sh + +get_dlls() { + objdump --private-headers $1 | + awk '/DLL Name/ {print $3;}' | # Format is " DLL Name: KERNEL32.dll" + xargs -n1 which | # search on path + grep -iv "system32" # no system libraries +} + +( + for DLL in $(get_dlls $1) + do + echo "$DLL" + $0 $DLL + done +) | sort -u ============================================================ --- Makefile.am 9efbf6305f5a9d6d6a620bd03f757b4fe57dffa8 +++ Makefile.am aa67219307bb325292e741e15ef08b75a3bee2e4 @@ -484,6 +484,30 @@ monotone-$(PACKAGE_VERSION).dmg: monoton "$@" -format UDZO -scrub -imagekey zlib-level=9 \ -volname monotone-$(PACKAGE_VERSION) +# build win32 installer using INNO setup address@hidden@ + +win32-installer: monotone-$(PACKAGE_VERSION)-setup.exe + +monotone-$(PACKAGE_VERSION)-setup.exe: mtn-stripped.exe html $(ALL_GMOFILES) linguas.iss dlls.iss monotone.iss + $(ISCC) monotone.iss + +mtn-stripped.exe: mtn.exe + strip $< -o $@ + +dlls.iss: mtn-stripped.exe ${top_srcdir}/Makefile.am + rm -f $@ + for DLL in $$( ${top_srcdir}/win32/dlls.sh mtn-stripped.exe | xargs cmd //c echo) ; do \ + echo "Source: \"$$DLL\"; DestDir: \"{app}\"" >> $@ ; \ + done + +linguas.iss: ${top_srcdir}/Makefile.am + rm -rf $@ + for LANG in $(INST_LINGUAS) ; do \ + echo "Source: \"{#BUILDDIR}\\$${LANG}.gmo\"; DestDir: \"{app}\\locale\\$${LANG}\\LC_MESSAGES\"; DestName: \"monotone.mo\"; Flags: ignoreversion" >> $@ ; \ + done + + # testsuite stuff (could this possibly be more ugly?) To get # parallelism, we cannot use Automake's TESTS feature at all. The # shell script embedded in the 'check-local' rule is partially ============================================================ --- configure.ac 875328a1985e1e6aa2cb58adc5123044bd1cd04a +++ configure.ac 58891679a723cc7bc9fcccdc7af1df672b53cce1 @@ -48,6 +48,10 @@ case "$host" in AC_MSG_RESULT([Windows]) WIN32_PLATFORM="true" os_err_t="unsigned int" + + # Inno setup configuration + AC_CONFIG_FILES([monotone.iss:win32/monotone.iss.in]) + AC_PATH_PROG(ISCC, [ISCC]) ;; *-ibm-aix* ) ============================================================ --- win32/README 5eb8c63b68c4a3b71dd3098e6a164610b48249a8 +++ win32/README 4d26d85828cd1c9eb49e764c40aa111c36531bde @@ -8,6 +8,9 @@ Install a monotone binary; see http://mo Install a monotone binary; see http://monotone.ca/ +Install Inno Setup and Inno Setup preprocessor; see +http://www.jrsoftware.org/isinfo.php, get the Quick Start Pack ispack-5.3.3.exe + Get a copy of the monotone repository; see http://monotone.ca/wiki/SelfHostingInfo/ @@ -17,41 +20,17 @@ autoreconf -i Build the release. In an MSYS shell: cd monotone- autoreconf -i -./configure sqlite_LIBS=-lsqlite3 -make -strip mtn.exe +./configure +make win32-installer -Install Inno Setup and Inno Setup preprocessor; see -http://www.jrsoftware.org/isinfo.php, get the Quick Start Pack ispack-5.3.3.exe +That builds "monotone--setup.exe" in current folder. -In Inno Setup Itool, open monotone-/win32/monotone.iss +NOTE: + If ISCC (Inno setup compiler) is not in PATH, what is very probable, then you + need instruct makefile about it's location: + + make win32-installer ISCC=/d/progs/InnoSetup5/ISCC.exe -Check that the APPVERS macro is correct. - -If you have installed MinGW in a non-default place, adjust the -MINGWDIR macro to match. - -If you have built monotone in a separate build directory, adjust -the BUILDDIR macro to match. - -Verify the number of info-* files to copy. - -Update the list of non-Microsoft dlls. Current list: - -DLL source -libiconv-2.dll libiconv -libidn-11.dll libidn -libintl-8.dll gettext -libpcre-0.dll pcre -libz-1.dll zlib - -You can check the dlls needed by running the Depends tool from -http://www.dependencywalker.com/ - -Choose menu Build | Compile (or click the "compile" button, or run the -Inno Setup compiler ISCC.exe from the command line). This generates -monotone--setup.exe in the monotone/win32 directory. - Publish the binary on the monotone website with proper permissions: chmod a+r monotone-/win32/monotone--setup.exe ============================================================ --- win32/monotone.iss 586ddd499e27bda0c3dab68d85fd31dd9a28c6d2 +++ win32/monotone.iss.in 6ab5cbbd22e82d270fb76043fe4abe9fbcf7941a @@ -1,7 +1,11 @@ +; INNO Setup config file for monotone win32 setup +; +; all paths are related to "top_builddir" + +#define BUILDDIR="." #define APPNAME="monotone" -#define APPVERS="0.48dev" -#define BUILDDIR=".." -#define MINGWDIR="\MinGW" +#define APPVERS="@VERSION@" +#define SRCDIR="@top_srcdir@" [Setup] AppName={#APPNAME} @@ -18,29 +22,29 @@ SolidCompression=yes AllowNoIcons=1 Compression=lzma/ultra SolidCompression=yes -LicenseFile="..\COPYING" +LicenseFile="{#SRCDIR}\COPYING" ChangesEnvironment=true -WizardImageFile=monotone.bmp +WizardImageFile={#SRCDIR}\win32\monotone.bmp [Files] -Source: "{#BUILDDIR}\mtn.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#BUILDDIR}\mtn-stripped.exe"; DestDir: "{app}"; DestName: "mtn.exe"; Flags: ignoreversion Source: "{#BUILDDIR}\monotone.html"; DestDir: "{app}\documentation"; Flags: ignoreversion Source: "{#BUILDDIR}\figures\*.png"; DestDir: "{app}\documentation\figures"; Flags: ignoreversion -Source: "..\COPYING"; DestDir: "{app}"; Flags: ignoreversion -Source: "..\monotone.info"; DestDir: "{app}\documentation"; Flags: ignoreversion -Source: "..\monotone.info-1"; DestDir: "{app}\documentation"; Flags: ignoreversion -Source: "..\monotone.info-2"; DestDir: "{app}\documentation"; Flags: ignoreversion -Source: "..\monotone.info-3"; DestDir: "{app}\documentation"; Flags: ignoreversion -Source: "{#BUILDDIR}\de.gmo"; DestDir: "{app}\locale\de\LC_MESSAGES"; DestName: "monotone.mo"; Flags: ignoreversion -Source: "{#BUILDDIR}\es.gmo"; DestDir: "{app}\locale\es\LC_MESSAGES"; DestName: "monotone.mo"; Flags: ignoreversion -Source: "{#BUILDDIR}\it.gmo"; DestDir: "{app}\locale\it\LC_MESSAGES"; DestName: "monotone.mo"; Flags: ignoreversion -Source: "{#BUILDDIR}\sv.gmo"; DestDir: "{app}\locale\sv\LC_MESSAGES"; DestName: "monotone.mo"; Flags: ignoreversion -Source: "{#MINGWDIR}\bin\libiconv-2.dll"; DestDir: "{app}" -Source: "{#MINGWDIR}\bin\libidn-11.dll"; DestDir: "{app}" -Source: "{#MINGWDIR}\bin\libintl-8.dll"; DestDir: "{app}" -Source: "{#MINGWDIR}\bin\libpcre-0.dll"; DestDir: "{app}" -Source: "{#MINGWDIR}\bin\libz-1.dll"; DestDir: "{app}" +Source: "{#SRCDIR}\COPYING"; DestDir: "{app}"; Flags: ignoreversion +Source: "{#SRCDIR}\monotone.info"; DestDir: "{app}\documentation"; Flags: ignoreversion +Source: "{#SRCDIR}\monotone.info-1"; DestDir: "{app}\documentation"; Flags: ignoreversion +Source: "{#SRCDIR}\monotone.info-2"; DestDir: "{app}\documentation"; Flags: ignoreversion +Source: "{#SRCDIR}\monotone.info-3"; DestDir: "{app}\documentation"; Flags: ignoreversion +; this file is generated by Makefile target "win32/dlls.iss" +; it creates list of distribuable DLLs in form +; Source: "some_dll.dll"; DestDir: "{app}"; Flags: ignoreversion +#include "dlls.iss" + +; the same but for language files +#include "linguas.iss" + + [Tasks] Name: modifypath; Description: "Add monotone to your path"; GroupDescription: "Get up and running"; Flags: unchecked Name: viewdocs; Description: "View the monotone documentation"; GroupDescription: "Get up and running" @@ -57,5 +61,5 @@ end; Result := ExpandConstant('{app}'); end; -#include "modpath.iss" +#include "@address@hidden"