* closes #22 (missing CloseHandle for FreeDOS' AUTOEXEC.BAT)
* split rufus and rufus_fd solution files (VS2010)
* error messages small improvements
* since we're on Windows, use .txt extension for README and TODO
This commit is contained in:
Pete Batard 2011-12-16 23:24:16 +00:00
parent 80f12bce4d
commit 5722300063
12 changed files with 50 additions and 30 deletions

1
.gitattributes vendored
View File

@ -10,6 +10,7 @@ install-sh eol=lf
*.vcxproj* eol=crlf *.vcxproj* eol=crlf
*.rc eol=crlf *.rc eol=crlf
*.cmd eol=crlf *.cmd eol=crlf
*.txt eol=crlf
*.sh export-ignore *.sh export-ignore
.gitattributes export-ignore .gitattributes export-ignore
.gitignore export-ignore .gitignore export-ignore

View File

@ -32,7 +32,7 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = : PRE_UNINSTALL = :
POST_UNINSTALL = : POST_UNINSTALL = :
subdir = . subdir = .
DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) $(top_srcdir)/configure $(am__configure_deps)
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__aclocal_m4_deps = $(top_srcdir)/configure.ac

View File

View File

20
configure vendored
View File

@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for rufus 1.0.3. # Generated by GNU Autoconf 2.68 for rufus 1.0.4.
# #
# Report bugs to <https://github.com/pbatard/rufus/issues>. # Report bugs to <https://github.com/pbatard/rufus/issues>.
# #
@ -559,8 +559,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='rufus' PACKAGE_NAME='rufus'
PACKAGE_TARNAME='rufus' PACKAGE_TARNAME='rufus'
PACKAGE_VERSION='1.0.3' PACKAGE_VERSION='1.0.4'
PACKAGE_STRING='rufus 1.0.3' PACKAGE_STRING='rufus 1.0.4'
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
PACKAGE_URL='https://github.com/pbatard/rufus' PACKAGE_URL='https://github.com/pbatard/rufus'
@ -1200,7 +1200,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures rufus 1.0.3 to adapt to many kinds of systems. \`configure' configures rufus 1.0.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1266,7 +1266,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of rufus 1.0.3:";; short | recursive ) echo "Configuration of rufus 1.0.4:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@ -1354,7 +1354,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
rufus configure 1.0.3 rufus configure 1.0.4
generated by GNU Autoconf 2.68 generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc. Copyright (C) 2010 Free Software Foundation, Inc.
@ -1409,7 +1409,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by rufus $as_me 1.0.3, which was It was created by rufus $as_me 1.0.4, which was
generated by GNU Autoconf 2.68. Invocation command line was generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@ $ $0 $@
@ -2224,7 +2224,7 @@ fi
# Define the identity of the package. # Define the identity of the package.
PACKAGE='rufus' PACKAGE='rufus'
VERSION='1.0.3' VERSION='1.0.4'
cat >>confdefs.h <<_ACEOF cat >>confdefs.h <<_ACEOF
@ -3982,7 +3982,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by rufus $as_me 1.0.3, which was This file was extended by rufus $as_me 1.0.4, which was
generated by GNU Autoconf 2.68. Invocation command line was generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@ -4036,7 +4036,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
rufus config.status 1.0.3 rufus config.status 1.0.4
configured by $0, generated by GNU Autoconf 2.68, configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@ -1,4 +1,4 @@
AC_INIT([rufus], [1.0.3], [https://github.com/pbatard/rufus/issues], [rufus], [https://github.com/pbatard/rufus]) AC_INIT([rufus], [1.0.4], [https://github.com/pbatard/rufus/issues], [rufus], [https://github.com/pbatard/rufus])
AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies])
AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_SRCDIR([src/rufus.c])
AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])

View File

@ -2,7 +2,6 @@
Microsoft Visual Studio Solution File, Format Version 11.00 Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010 # 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_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 EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -20,14 +19,6 @@ Global
{731858A7-0303-4988-877B-9C0DD6471864}.Release|Win32.Build.0 = Release|Win32 {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.ActiveCfg = Release|x64
{731858A7-0303-4988-877B-9C0DD6471864}.Release|x64.Build.0 = 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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

26
rufus_fd_2010.sln Normal file
View File

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{95A3A8A7-A1B1-4EE7-B2EF-709D21EB567F}") = "rufus", "src\.msvc\rufus_fd_2010.vcxproj", "{CB1A2185-AD54-47DF-B64C-B94C444E0C1F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{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
EndGlobalSection
EndGlobal

View File

@ -122,7 +122,7 @@ HANDLE GetDriveHandle(DWORD DriveIndex, char* DriveLetter, BOOL bWriteAccess, BO
} }
if ((bLockDrive) && (!DeviceIoControl(hDrive, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &size, NULL))) { if ((bLockDrive) && (!DeviceIoControl(hDrive, FSCTL_LOCK_VOLUME, NULL, 0, NULL, 0, &size, NULL))) {
uprintf("Could not get exclusive access to %s: %s\n", logical_drive, WindowsErrorString()); uprintf("Could not get exclusive access to %s %s\n", logical_drive, WindowsErrorString());
safe_closehandle(hDrive); safe_closehandle(hDrive);
goto out; goto out;
} }

View File

@ -409,6 +409,7 @@ BOOL ExtractFreeDOS(const char* path)
if (hFile == INVALID_HANDLE_VALUE) { if (hFile == INVALID_HANDLE_VALUE) {
uprintf("Unable to create 'AUTOEXEC.BAT': %s.\n", WindowsErrorString()); uprintf("Unable to create 'AUTOEXEC.BAT': %s.\n", WindowsErrorString());
} }
safe_closehandle(hFile);
return TRUE; return TRUE;
} }

View File

@ -30,7 +30,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 206, 278 IDD_DIALOG DIALOGEX 12, 12, 206, 278
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW EXSTYLE WS_EX_APPWINDOW
CAPTION "Rufus v1.0.3.99" CAPTION "Rufus v1.0.4.100"
FONT 8, "MS Shell Dlg", 400, 0, 0x1 FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN BEGIN
DEFPUSHBUTTON "Start",IDC_START,94,236,50,14 DEFPUSHBUTTON "Start",IDC_START,94,236,50,14
@ -65,7 +65,7 @@ BEGIN
DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP DEFPUSHBUTTON "OK",IDOK,231,175,50,14,WS_GROUP
CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL, CONTROL "<a href=""http://rufus.akeo.ie"">http://rufus.akeo.ie</a>",IDC_ABOUT_RUFUS_URL,
"SysLink",WS_TABSTOP,46,47,114,9 "SysLink",WS_TABSTOP,46,47,114,9
LTEXT "Version 1.0.3 (Build 99)",IDC_STATIC,46,19,78,8 LTEXT "Version 1.0.4 (Build 100)",IDC_STATIC,46,19,78,8
PUSHBUTTON "License...",IDC_ABOUT_LICENSE,46,175,50,14,WS_GROUP 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 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 LTEXT "Report bugs or request enhancements at:",IDC_STATIC,46,66,187,8
@ -170,8 +170,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,99 FILEVERSION 1,0,4,100
PRODUCTVERSION 1,0,3,99 PRODUCTVERSION 1,0,4,100
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -188,13 +188,13 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "akeo.ie" VALUE "CompanyName", "akeo.ie"
VALUE "FileDescription", "Rufus" VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "1.0.3.99" VALUE "FileVersion", "1.0.4.100"
VALUE "InternalName", "Rufus" VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)" VALUE "LegalCopyright", "© 2011 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe" VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus" VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "1.0.3.99" VALUE "ProductVersion", "1.0.4.100"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

View File

@ -205,7 +205,8 @@ const char* StrError(DWORD error_code)
case ERROR_WRITE_FAULT: case ERROR_WRITE_FAULT:
return "Write error"; return "Write error";
case ERROR_OPEN_FAILED: case ERROR_OPEN_FAILED:
return "Could not open media"; return "Could not open media. It may be in use by another process.\n"
"Please re-plug the media and try again";
case ERROR_PARTITION_FAILURE: case ERROR_PARTITION_FAILURE:
return "Error while partitioning drive"; return "Error while partitioning drive";
case ERROR_CANNOT_COPY: case ERROR_CANNOT_COPY:
@ -217,7 +218,7 @@ const char* StrError(DWORD error_code)
case ERROR_BADBLOCKS_FAILURE: case ERROR_BADBLOCKS_FAILURE:
return "Bad blocks check didn't complete"; return "Bad blocks check didn't complete";
default: default:
uprintf("StrError: hit default - %08X\n", error_code); uprintf("Unknown error: %08X\n", error_code);
SetLastError(error_code); SetLastError(error_code);
return WindowsErrorString(); return WindowsErrorString();
} }