diff --git a/Makefile.am b/Makefile.am
index 77b6b51e..3b58ae1a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,12 @@
SUBDIRS = src
TARGET = rufus
-# This step produces the UPX compressed and signed release that is made available for public download
+# This step produces the UPX compressed and signed releases that are made available for public download
release: all
@mv src/$(TARGET)$(EXEEXT) .
+ @mv src/$(TARGET)_fd$(EXEEXT) .
@$(STRIP) $(TARGET)$(EXEEXT)
+ @$(STRIP) $(TARGET)_fd$(EXEEXT)
@upx $(TARGET)$(EXEEXT)
- @cmd.exe /k _sign.cmd $(TARGET)$(EXEEXT)
+ @upx $(TARGET)_fd$(EXEEXT)
+ @cmd.exe /k _sign.cmd $(TARGET)$(EXEEXT) $(TARGET)_fd$(EXEEXT)
diff --git a/Makefile.in b/Makefile.in
index f2afe3cb..be1d94fa 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -441,12 +441,15 @@ uninstall-am:
tags-recursive uninstall uninstall-am
-# This step produces the UPX compressed and signed release that is made available for public download
+# This step produces the UPX compressed and signed releases that are made available for public download
release: all
@mv src/$(TARGET)$(EXEEXT) .
+ @mv src/$(TARGET)_fd$(EXEEXT) .
@$(STRIP) $(TARGET)$(EXEEXT)
+ @$(STRIP) $(TARGET)_fd$(EXEEXT)
@upx $(TARGET)$(EXEEXT)
- @cmd.exe /k _sign.cmd $(TARGET)$(EXEEXT)
+ @upx $(TARGET)_fd$(EXEEXT)
+ @cmd.exe /k _sign.cmd $(TARGET)$(EXEEXT) $(TARGET)_fd$(EXEEXT)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/_sign.cmd b/_sign.cmd
index a60fdf31..83127154 100644
--- a/_sign.cmd
+++ b/_sign.cmd
@@ -1,7 +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
+@E:\WinDDK\7600.16385.0\bin\amd64\signtool sign /v /f D:\Secured\akeo\pbatard.p12 /p %password% /t http://time.certum.pl %1 %2 %3 %4
@if ERRORLEVEL 1 goto retry
@set password=
@exit
diff --git a/rufus_2010.sln b/rufus_2010.sln
index 0a5a957a..eb43ca6e 100644
--- a/rufus_2010.sln
+++ b/rufus_2010.sln
@@ -2,6 +2,7 @@
Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", "src\.msvc\rufus_2010.vcxproj", "{731858A7-0303-4988-877B-9C0DD6471864}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", "src\.msvc\rufus_fd_2010.vcxproj", "{CB1A2185-AD54-47DF-B64C-B94C444E0C1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,6 +20,14 @@ Global
{731858A7-0303-4988-877B-9C0DD6471864}.Release|Win32.Build.0 = Release|Win32
{731858A7-0303-4988-877B-9C0DD6471864}.Release|x64.ActiveCfg = Release|x64
{731858A7-0303-4988-877B-9C0DD6471864}.Release|x64.Build.0 = Release|x64
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Debug|Win32.Build.0 = Debug|Win32
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Debug|x64.ActiveCfg = Debug|x64
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Debug|x64.Build.0 = Debug|x64
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Release|Win32.ActiveCfg = Release|Win32
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Release|Win32.Build.0 = Release|Win32
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Release|x64.ActiveCfg = Release|x64
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/src/.msvc/rufus_2010.vcxproj b/src/.msvc/rufus_2010.vcxproj
index d3b6b764..9dac45c8 100644
--- a/src/.msvc/rufus_2010.vcxproj
+++ b/src/.msvc/rufus_2010.vcxproj
@@ -203,8 +203,6 @@
-
-
diff --git a/src/.msvc/rufus_2010.vcxproj.filters b/src/.msvc/rufus_2010.vcxproj.filters
index 9180397b..f09fe5af 100644
--- a/src/.msvc/rufus_2010.vcxproj.filters
+++ b/src/.msvc/rufus_2010.vcxproj.filters
@@ -16,9 +16,6 @@
{ecff9fec-41c4-4ce8-b725-27ee39754cb7}
-
- {340c377e-7530-411d-a367-49825f080d85}
-
@@ -178,12 +175,6 @@
Resource Files
-
- Resource Files\freedos
-
-
- Resource Files\freedos
-
diff --git a/src/.msvc/rufus_fd_2010.vcxproj b/src/.msvc/rufus_fd_2010.vcxproj
new file mode 100644
index 00000000..2fb6a8cc
--- /dev/null
+++ b/src/.msvc/rufus_fd_2010.vcxproj
@@ -0,0 +1,226 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ rufus_fd
+ {CB1A2185-AD54-47DF-B64C-B94C444E0C1F}
+ rufus_fd
+ Win32Proj
+
+
+
+ Application
+ Unicode
+ true
+
+
+ Application
+ Unicode
+
+
+ Application
+ Unicode
+ true
+
+
+ Application
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <_ProjectFileVersion>10.0.30319.1
+ $(SolutionDir)x86_32\$(Configuration)\
+ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\
+ $(SolutionDir)x86_32\$(Configuration)\
+ $(SolutionDir)x86_32\$(Configuration)\$(ProjectName)\
+ $(SolutionDir)x86_64\$(Configuration)\
+ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\
+ $(SolutionDir)x86_64\$(Configuration)\
+ $(SolutionDir)x86_64\$(Configuration)\$(ProjectName)\
+ false
+ false
+ false
+ false
+
+
+
+
+ _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)
+ MultiThreadedDebug
+ Level3
+ ..\inc;%(AdditionalIncludeDirectories)
+
+
+ setupapi.lib;comctl32.lib;%(AdditionalDependencies)
+ HighestAvailable
+ true
+ Windows
+ MachineX86
+
+
+ WITH_FREEDOS;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+
+
+
+ X64
+
+
+ ..\inc;%(AdditionalIncludeDirectories)
+ _CRTDBG_MAP_ALLOC;_CRT_SECURE_NO_WARNINGS;ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)
+ MultiThreadedDebug
+ Level3
+ ProgramDatabase
+
+
+ setupapi.lib;comctl32.lib;%(AdditionalDependencies)
+ HighestAvailable
+ true
+ Windows
+ MachineX64
+
+
+ WITH_FREEDOS;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+
+
+
+ _CRT_SECURE_NO_WARNINGS;ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)
+ MultiThreaded
+ Level3
+ ..\inc;%(AdditionalIncludeDirectories)
+
+
+ setupapi.lib;comctl32.lib;%(AdditionalDependencies)
+ HighestAvailable
+ false
+ Windows
+ MachineX86
+
+
+ WITH_FREEDOS;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+
+
+
+ X64
+
+
+ _CRT_SECURE_NO_WARNINGS;ISOLATION_AWARE_ENABLED;%(PreprocessorDefinitions)
+ MultiThreaded
+ Level3
+ ..\inc;%(AdditionalIncludeDirectories)
+
+
+ setupapi.lib;comctl32.lib;%(AdditionalDependencies)
+ HighestAvailable
+ false
+ Windows
+ MachineX64
+
+
+ WITH_FREEDOS;_UNICODE;UNICODE;%(PreprocessorDefinitions)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/.msvc/rufus_fd_2010.vcxproj.filters b/src/.msvc/rufus_fd_2010.vcxproj.filters
new file mode 100644
index 00000000..f09fe5af
--- /dev/null
+++ b/src/.msvc/rufus_fd_2010.vcxproj.filters
@@ -0,0 +1,189 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav
+
+
+ {ecff9fec-41c4-4ce8-b725-27ee39754cb7}
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files\ms-sys inc
+
+
+ Header Files
+
+
+
+
+ Resource Files
+
+
+
+
+ Resource Files
+
+
+
+
+ Resource Files
+
+
+
\ No newline at end of file
diff --git a/src/.msvc/rufus_sources b/src/.msvc/rufus_sources
index b4728474..e9f777b6 100644
--- a/src/.msvc/rufus_sources
+++ b/src/.msvc/rufus_sources
@@ -2,6 +2,7 @@ TARGETNAME=rufus
TARGETTYPE=PROGRAM
UMTYPE=windows
UMENTRY=winmain
+C_DEFINES=$(C_DEFINES) /DUNICODE /D_UNICODE
!IFNDEF MSC_WARNING_LEVEL
MSC_WARNING_LEVEL=/W3
diff --git a/src/Makefile.am b/src/Makefile.am
index 27051c82..2b925f95 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,15 +1,24 @@
#INCLUDES = -I$(top_srcdir)
-noinst_PROGRAMS = rufus
+noinst_PROGRAMS = rufus rufus_fd
pkg_v_rc = $(pkg_v_rc_$(V))
pkg_v_rc_ = $(pkg_v_rc_$(AM_DEFAULT_VERBOSITY))
pkg_v_rc_0 = @echo " RC $@";
-%_rc.o: %.rc
+# NB: There's a good reason we don't do something more elegant than copy/paste for _fd
+rufus_rc.o: rufus.rc
$(pkg_v_rc)$(WINDRES) -i $< -o $@
+rufus_fd_rc.o: rufus.rc
+ $(pkg_v_rc)$(WINDRES) -DWITH_FREEDOS -i $< -o $@
+
rufus_SOURCES = fat12.c fat16.c fat32.c partition_info.c br.c file.c drive.c msdos.c badblocks.c format.c stdio.c stdlg.c rufus.c
rufus_CFLAGS = -I./inc $(ARCH_CFLAGS) $(AM_CFLAGS)
rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows
rufus_LDADD = rufus_rc.o -lsetupapi -lole32 -lgdi32
+
+rufus_fd_SOURCES = fat12.c fat16.c fat32.c partition_info.c br.c file.c drive.c msdos.c badblocks.c format.c stdio.c stdlg.c rufus.c
+rufus_fd_CFLAGS = -I./inc $(ARCH_CFLAGS) $(AM_CFLAGS)
+rufus_fd_LDFLAGS = $(AM_LDFLAGS) -mwindows
+rufus_fd_LDADD = rufus_fd_rc.o -lsetupapi -lole32 -lgdi32
\ No newline at end of file
diff --git a/src/Makefile.in b/src/Makefile.in
index 0b0e0076..2a974c11 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -34,7 +34,7 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-noinst_PROGRAMS = rufus$(EXEEXT)
+noinst_PROGRAMS = rufus$(EXEEXT) rufus_fd$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -55,6 +55,17 @@ rufus_OBJECTS = $(am_rufus_OBJECTS)
rufus_DEPENDENCIES = rufus_rc.o
rufus_LINK = $(CCLD) $(rufus_CFLAGS) $(CFLAGS) $(rufus_LDFLAGS) \
$(LDFLAGS) -o $@
+am_rufus_fd_OBJECTS = rufus_fd-fat12.$(OBJEXT) \
+ rufus_fd-fat16.$(OBJEXT) rufus_fd-fat32.$(OBJEXT) \
+ rufus_fd-partition_info.$(OBJEXT) rufus_fd-br.$(OBJEXT) \
+ rufus_fd-file.$(OBJEXT) rufus_fd-drive.$(OBJEXT) \
+ rufus_fd-msdos.$(OBJEXT) rufus_fd-badblocks.$(OBJEXT) \
+ rufus_fd-format.$(OBJEXT) rufus_fd-stdio.$(OBJEXT) \
+ rufus_fd-stdlg.$(OBJEXT) rufus_fd-rufus.$(OBJEXT)
+rufus_fd_OBJECTS = $(am_rufus_fd_OBJECTS)
+rufus_fd_DEPENDENCIES = rufus_fd_rc.o
+rufus_fd_LINK = $(CCLD) $(rufus_fd_CFLAGS) $(CFLAGS) \
+ $(rufus_fd_LDFLAGS) $(LDFLAGS) -o $@
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp =
am__depfiles_maybe =
@@ -77,7 +88,7 @@ am__v_CCLD_0 = @echo " CCLD " $@;
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(rufus_SOURCES)
+SOURCES = $(rufus_SOURCES) $(rufus_fd_SOURCES)
ETAGS = etags
CTAGS = ctags
ACLOCAL = @ACLOCAL@
@@ -172,6 +183,10 @@ rufus_SOURCES = fat12.c fat16.c fat32.c partition_info.c br.c file.c drive.c msd
rufus_CFLAGS = -I./inc $(ARCH_CFLAGS) $(AM_CFLAGS)
rufus_LDFLAGS = $(AM_LDFLAGS) -mwindows
rufus_LDADD = rufus_rc.o -lsetupapi -lole32 -lgdi32
+rufus_fd_SOURCES = fat12.c fat16.c fat32.c partition_info.c br.c file.c drive.c msdos.c badblocks.c format.c stdio.c stdlg.c rufus.c
+rufus_fd_CFLAGS = -I./inc $(ARCH_CFLAGS) $(AM_CFLAGS)
+rufus_fd_LDFLAGS = $(AM_LDFLAGS) -mwindows
+rufus_fd_LDADD = rufus_fd_rc.o -lsetupapi -lole32 -lgdi32
all: all-am
.SUFFIXES:
@@ -212,6 +227,9 @@ clean-noinstPROGRAMS:
rufus$(EXEEXT): $(rufus_OBJECTS) $(rufus_DEPENDENCIES)
@rm -f rufus$(EXEEXT)
$(AM_V_CCLD)$(rufus_LINK) $(rufus_OBJECTS) $(rufus_LDADD) $(LIBS)
+rufus_fd$(EXEEXT): $(rufus_fd_OBJECTS) $(rufus_fd_DEPENDENCIES)
+ @rm -f rufus_fd$(EXEEXT)
+ $(AM_V_CCLD)$(rufus_fd_LINK) $(rufus_fd_OBJECTS) $(rufus_fd_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -331,6 +349,110 @@ rufus-rufus.obj: rufus.c
$(AM_V_CC) @AM_BACKSLASH@
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_CFLAGS) $(CFLAGS) -c -o rufus-rufus.obj `if test -f 'rufus.c'; then $(CYGPATH_W) 'rufus.c'; else $(CYGPATH_W) '$(srcdir)/rufus.c'; fi`
+rufus_fd-fat12.o: fat12.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-fat12.o `test -f 'fat12.c' || echo '$(srcdir)/'`fat12.c
+
+rufus_fd-fat12.obj: fat12.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-fat12.obj `if test -f 'fat12.c'; then $(CYGPATH_W) 'fat12.c'; else $(CYGPATH_W) '$(srcdir)/fat12.c'; fi`
+
+rufus_fd-fat16.o: fat16.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-fat16.o `test -f 'fat16.c' || echo '$(srcdir)/'`fat16.c
+
+rufus_fd-fat16.obj: fat16.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-fat16.obj `if test -f 'fat16.c'; then $(CYGPATH_W) 'fat16.c'; else $(CYGPATH_W) '$(srcdir)/fat16.c'; fi`
+
+rufus_fd-fat32.o: fat32.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-fat32.o `test -f 'fat32.c' || echo '$(srcdir)/'`fat32.c
+
+rufus_fd-fat32.obj: fat32.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-fat32.obj `if test -f 'fat32.c'; then $(CYGPATH_W) 'fat32.c'; else $(CYGPATH_W) '$(srcdir)/fat32.c'; fi`
+
+rufus_fd-partition_info.o: partition_info.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-partition_info.o `test -f 'partition_info.c' || echo '$(srcdir)/'`partition_info.c
+
+rufus_fd-partition_info.obj: partition_info.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-partition_info.obj `if test -f 'partition_info.c'; then $(CYGPATH_W) 'partition_info.c'; else $(CYGPATH_W) '$(srcdir)/partition_info.c'; fi`
+
+rufus_fd-br.o: br.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-br.o `test -f 'br.c' || echo '$(srcdir)/'`br.c
+
+rufus_fd-br.obj: br.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-br.obj `if test -f 'br.c'; then $(CYGPATH_W) 'br.c'; else $(CYGPATH_W) '$(srcdir)/br.c'; fi`
+
+rufus_fd-file.o: file.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-file.o `test -f 'file.c' || echo '$(srcdir)/'`file.c
+
+rufus_fd-file.obj: file.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-file.obj `if test -f 'file.c'; then $(CYGPATH_W) 'file.c'; else $(CYGPATH_W) '$(srcdir)/file.c'; fi`
+
+rufus_fd-drive.o: drive.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-drive.o `test -f 'drive.c' || echo '$(srcdir)/'`drive.c
+
+rufus_fd-drive.obj: drive.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-drive.obj `if test -f 'drive.c'; then $(CYGPATH_W) 'drive.c'; else $(CYGPATH_W) '$(srcdir)/drive.c'; fi`
+
+rufus_fd-msdos.o: msdos.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-msdos.o `test -f 'msdos.c' || echo '$(srcdir)/'`msdos.c
+
+rufus_fd-msdos.obj: msdos.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-msdos.obj `if test -f 'msdos.c'; then $(CYGPATH_W) 'msdos.c'; else $(CYGPATH_W) '$(srcdir)/msdos.c'; fi`
+
+rufus_fd-badblocks.o: badblocks.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-badblocks.o `test -f 'badblocks.c' || echo '$(srcdir)/'`badblocks.c
+
+rufus_fd-badblocks.obj: badblocks.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-badblocks.obj `if test -f 'badblocks.c'; then $(CYGPATH_W) 'badblocks.c'; else $(CYGPATH_W) '$(srcdir)/badblocks.c'; fi`
+
+rufus_fd-format.o: format.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-format.o `test -f 'format.c' || echo '$(srcdir)/'`format.c
+
+rufus_fd-format.obj: format.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-format.obj `if test -f 'format.c'; then $(CYGPATH_W) 'format.c'; else $(CYGPATH_W) '$(srcdir)/format.c'; fi`
+
+rufus_fd-stdio.o: stdio.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-stdio.o `test -f 'stdio.c' || echo '$(srcdir)/'`stdio.c
+
+rufus_fd-stdio.obj: stdio.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-stdio.obj `if test -f 'stdio.c'; then $(CYGPATH_W) 'stdio.c'; else $(CYGPATH_W) '$(srcdir)/stdio.c'; fi`
+
+rufus_fd-stdlg.o: stdlg.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-stdlg.o `test -f 'stdlg.c' || echo '$(srcdir)/'`stdlg.c
+
+rufus_fd-stdlg.obj: stdlg.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-stdlg.obj `if test -f 'stdlg.c'; then $(CYGPATH_W) 'stdlg.c'; else $(CYGPATH_W) '$(srcdir)/stdlg.c'; fi`
+
+rufus_fd-rufus.o: rufus.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-rufus.o `test -f 'rufus.c' || echo '$(srcdir)/'`rufus.c
+
+rufus_fd-rufus.obj: rufus.c
+ $(AM_V_CC) @AM_BACKSLASH@
+ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(rufus_fd_CFLAGS) $(CFLAGS) -c -o rufus_fd-rufus.obj `if test -f 'rufus.c'; then $(CYGPATH_W) 'rufus.c'; else $(CYGPATH_W) '$(srcdir)/rufus.c'; fi`
+
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
@@ -493,9 +615,13 @@ uninstall-am:
ps ps-am tags uninstall uninstall-am
-%_rc.o: %.rc
+# NB: There's a good reason we don't do something more elegant than copy/paste for _fd
+rufus_rc.o: rufus.rc
$(pkg_v_rc)$(WINDRES) -i $< -o $@
+rufus_fd_rc.o: rufus.rc
+ $(pkg_v_rc)$(WINDRES) -DWITH_FREEDOS -i $< -o $@
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/src/rufus.rc b/src/rufus.rc
index 9c232122..0044cc25 100644
--- a/src/rufus.rc
+++ b/src/rufus.rc
@@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 278
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
-CAPTION "Rufus v1.0.3.96"
+CAPTION "Rufus v1.0.3.97"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,236,50,14
@@ -65,7 +65,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "http://rufus.akeo.ie",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9
- LTEXT "Version 1.0.3 (Build 96)",IDC_STATIC,46,19,78,8
+ LTEXT "Version 1.0.3 (Build 97)",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
@@ -118,6 +118,12 @@ END
3 TEXTINCLUDE
BEGIN
+ "\r\n"
+ "// Only include these in rufus_fd\r\n"
+ "#if defined(WITH_FREEDOS)\r\n"
+ "IDR_FD_COMMAND_COM RCDATA ""../freedos/COMMAND.COM""\r\n"
+ "IDR_FD_KERNEL_SYS RCDATA ""../freedos/KERNEL.SYS""\r\n"
+ "#endif\r\n"
"\r\n"
"// Must reference a manifest for visual styles and elevation\r\n"
"// Oh, and it must happen at the end, or MinGW will ignore it!\r\n"
@@ -164,8 +170,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 1,0,3,96
- PRODUCTVERSION 1,0,3,96
+ FILEVERSION 1,0,3,97
+ PRODUCTVERSION 1,0,3,97
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -182,13 +188,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus"
- VALUE "FileVersion", "1.0.3.96"
+ VALUE "FileVersion", "1.0.3.97"
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.3.96"
+ VALUE "ProductVersion", "1.0.3.97"
END
END
BLOCK "VarFileInfo"
@@ -206,14 +212,6 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON ICON "rufus.ico"
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// RCDATA
-//
-
-IDR_FD_COMMAND_COM RCDATA "../freedos/COMMAND.COM"
-IDR_FD_KERNEL_SYS RCDATA "../freedos/KERNEL.SYS"
#endif // English resources
/////////////////////////////////////////////////////////////////////////////
@@ -225,6 +223,12 @@ IDR_FD_KERNEL_SYS RCDATA "../freedos/KERNEL.SYS"
// Generated from the TEXTINCLUDE 3 resource.
//
+// Only include these in rufus_fd
+#if defined(WITH_FREEDOS)
+IDR_FD_COMMAND_COM RCDATA "../freedos/COMMAND.COM"
+IDR_FD_KERNEL_SYS RCDATA "../freedos/KERNEL.SYS"
+#endif
+
// Must reference a manifest for visual styles and elevation
// Oh, and it must happen at the end, or MinGW will ignore it!
#if defined(__GNUC__)
diff --git a/wdk_build.cmd b/wdk_build.cmd
index 5a1b1ef2..2aa5b96a 100644
--- a/wdk_build.cmd
+++ b/wdk_build.cmd
@@ -1,7 +1,15 @@
@echo off
+::# NB: You can pass the option FD to build a version of rufus that includes FreeDOS
if Test%BUILD_ALT_DIR%==Test goto usage
+::# process commandline parameters
+set FREEDOS=
+if "%1" == "" goto no_more_args
+::# /I for case insensitive
+if /I Test%1==TestFD set C_DEFINES="/DWITH_FREEDOS"
+:no_more_args
+
::# /M 2 for multiple cores
set BUILD_CMD=build -bcwgZ -M2
set PWD=%~dp0