[mingw] improved automake/autoconf files

* also renamed standalone makefile from mf to mkf
* also added release step, with UPX compression and digital signing of the exe
This commit is contained in:
Pete Batard 2011-12-05 00:04:01 +00:00
parent b23a8089fd
commit 52a2b4b584
5 changed files with 32 additions and 14 deletions

View File

@ -7,10 +7,16 @@ pkg_v_rc_ = $(pkg_v_rc_$(AM_DEFAULT_VERBOSITY))
pkg_v_rc_0 = @echo " RC $@";
rufus_rc.o: rufus.rc
$(pkg_v_rc)$(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --tag=RC --mode=compile $(RC) $(ARCH_RCFLAGS) -i $< -o $@
$(pkg_v_rc)$(WINDRES) -i $< -o $@
rufus_SOURCES = fat12.c fat16.c fat32.c br.c file.c drive.c msdos.c format.c stdio.c stdlg.c rufus.c
rufus_SOURCES = fat12.c fat16.c fat32.c br.c file.c drive.c msdos.c format.c stdio.c stdlg.c rufus.c
rufus_CFLAGS = -I./inc $(ARCH_CFLAGS) $(AM_CFLAGS)
# static ensures that the exe can be shared as a standalone, and still allow driver installation
rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows -static
rufus_LDADD = rufus_rc.o -lsetupapi -lole32 -lgdi32
# This step produces the UPX compressed and signed release that is made available for public download
release: rufus.exe
@$(STRIP) rufus.exe
@upx rufus.exe
@cmd.exe /k _sign.bat rufus.exe

7
_sign.bat Normal file
View File

@ -0,0 +1,7 @@
:retry
@set password=
@set /p password=Please enter PFX password:
@E:\WinDDK\7600.16385.0\bin\amd64\signtool sign /v /f D:\Secured\akeo\pbatard.p12 /p %password% /t http://time.certum.pl %1
@if ERRORLEVEL 1 goto retry
@set password=
@exit

View File

@ -10,11 +10,13 @@ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
AC_PREREQ([2.50])
AC_PROG_CC
AC_PROG_LIBTOOL
LT_LANG([Windows Resource])
AC_PATH_PROG(RM, rm, rm)
AC_CHECK_TOOL(STRIP, strip, strip)
AC_CHECK_TOOL(WINDRES, windres, windres)
AC_C_INLINE
AM_PROG_CC_C_O
AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions])
AC_CANONICAL_HOST
AC_MSG_CHECKING([development environment])
case $host in
@ -27,7 +29,7 @@ case $host in
esac
AM_CFLAGS="${AM_CFLAGS} -DWINVER=0x501 -D_WIN32_IE=0x501"
AM_LDFLAGS="${AM_LDFLAGS} -no-undefined -avoid-version"
AM_LDFLAGS="${AM_LDFLAGS} -Wl,-no-undefined"
# Debug logging
#AC_ARG_ENABLE([log], [AS_HELP_STRING([--enable-log], [enable logging (default y)])],
@ -60,8 +62,6 @@ AM_CFLAGS="$AM_CFLAGS -std=gnu99 -Wall -Wundef -Wunused -Wstrict-prototypes -Wer
AC_SUBST([VISIBILITY_CFLAGS])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([LIBCONFIG_CFLAGS])
AC_SUBST([LIBCONFIG_LIBADD])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -34,7 +34,6 @@ all: $(TARGET)
$(TARGET): $(OBJECTS) $(TARGET)_rc.o
@echo "[CCLD] $@"
@$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(TARGET)_rc.o $(LIBS)
@$(STRIP) $(TARGET).exe
%.o: %.c
@echo "[CC] $@"
@ -46,3 +45,9 @@ $(TARGET): $(OBJECTS) $(TARGET)_rc.o
clean:
rm -f *.exe *.o
# This step produces the UPX compressed and signed release that is made available for public download
release: $(TARGET)
@$(STRIP) $(TARGET).exe
@upx $(TARGET).exe
@cmd.exe /k _sign.bat rufus.exe

View File

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 263
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.0.1.68"
CAPTION "Rufus v1.0.1.69"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,223,50,14
@ -63,7 +63,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "<a href=""https://github.com/pbatard/rufus/wiki/Rufus"">https://github.com/pbatard/rufus</a>",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9
LTEXT "Version 1.0.1 (Build 68)",IDC_STATIC,46,19,78,8
LTEXT "Version 1.0.1 (Build 69)",IDC_STATIC,46,19,78,8
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP
EDITTEXT IDC_ABOUT_COPYRIGHTS,46,107,235,63,ES_MULTILINE | ES_READONLY | WS_VSCROLL
LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
@ -162,8 +162,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,1,68
PRODUCTVERSION 1,0,1,68
FILEVERSION 1,0,1,69
PRODUCTVERSION 1,0,1,69
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -180,13 +180,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.0.1.68"
VALUE "FileVersion", "1.0.1.69"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.0.1.68"
VALUE "ProductVersion", "1.0.1.69"
END
END
BLOCK "VarFileInfo"