mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 11:17:03 -04:00
[core] improve Unicode support
* Microsoft's version of _wgetenv() is *BROKEN*! * Also set rufus-next to 2.15
This commit is contained in:
parent
e2481efcd9
commit
fff4465b1d
4 changed files with 28 additions and 33 deletions
20
configure
vendored
20
configure
vendored
|
@ -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.69 for rufus 2.14.
|
# Generated by GNU Autoconf 2.69 for rufus 2.15.
|
||||||
#
|
#
|
||||||
# Report bugs to <https://github.com/pbatard/rufus/issues>.
|
# Report bugs to <https://github.com/pbatard/rufus/issues>.
|
||||||
#
|
#
|
||||||
|
@ -580,8 +580,8 @@ MAKEFLAGS=
|
||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='rufus'
|
PACKAGE_NAME='rufus'
|
||||||
PACKAGE_TARNAME='rufus'
|
PACKAGE_TARNAME='rufus'
|
||||||
PACKAGE_VERSION='2.14'
|
PACKAGE_VERSION='2.15'
|
||||||
PACKAGE_STRING='rufus 2.14'
|
PACKAGE_STRING='rufus 2.15'
|
||||||
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
|
PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues'
|
||||||
PACKAGE_URL='https://rufus.akeo.ie'
|
PACKAGE_URL='https://rufus.akeo.ie'
|
||||||
|
|
||||||
|
@ -1228,7 +1228,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 2.14 to adapt to many kinds of systems.
|
\`configure' configures rufus 2.15 to adapt to many kinds of systems.
|
||||||
|
|
||||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
|
@ -1294,7 +1294,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 2.14:";;
|
short | recursive ) echo "Configuration of rufus 2.15:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
|
@ -1385,7 +1385,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 2.14
|
rufus configure 2.15
|
||||||
generated by GNU Autoconf 2.69
|
generated by GNU Autoconf 2.69
|
||||||
|
|
||||||
Copyright (C) 2012 Free Software Foundation, Inc.
|
Copyright (C) 2012 Free Software Foundation, Inc.
|
||||||
|
@ -1440,7 +1440,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 2.14, which was
|
It was created by rufus $as_me 2.15, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
$ $0 $@
|
$ $0 $@
|
||||||
|
@ -2303,7 +2303,7 @@ fi
|
||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='rufus'
|
PACKAGE='rufus'
|
||||||
VERSION='2.14'
|
VERSION='2.15'
|
||||||
|
|
||||||
|
|
||||||
cat >>confdefs.h <<_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
@ -4482,7 +4482,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 2.14, which was
|
This file was extended by rufus $as_me 2.15, which was
|
||||||
generated by GNU Autoconf 2.69. Invocation command line was
|
generated by GNU Autoconf 2.69. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
CONFIG_FILES = $CONFIG_FILES
|
||||||
|
@ -4536,7 +4536,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 2.14
|
rufus config.status 2.15
|
||||||
configured by $0, generated by GNU Autoconf 2.69,
|
configured by $0, generated by GNU Autoconf 2.69,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
AC_INIT([rufus], [2.14], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie])
|
AC_INIT([rufus], [2.15], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.akeo.ie])
|
||||||
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])
|
||||||
|
|
|
@ -836,16 +836,6 @@ static __inline int _openU(const char *filename, int oflag, int pmode)
|
||||||
wfree(filename);
|
wfree(filename);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
// returned UTF-8 string must be freed
|
|
||||||
static __inline char* getenvU(const char* varname)
|
|
||||||
{
|
|
||||||
wconvert(varname);
|
|
||||||
char* ret;
|
|
||||||
ret = wchar_to_utf8(_wgetenv(wvarname));
|
|
||||||
wfree(varname);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
static __inline FILE* fopenU(const char* filename, const char* mode)
|
static __inline FILE* fopenU(const char* filename, const char* mode)
|
||||||
{
|
{
|
||||||
|
@ -872,21 +862,26 @@ static __inline int _openU(const char *filename, int oflag , int pmode)
|
||||||
wfree(filename);
|
wfree(filename);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// returned UTF-8 string must be freed
|
// returned UTF-8 string must be freed
|
||||||
static __inline char* getenvU(const char* varname)
|
static __inline char* getenvU(const char* varname)
|
||||||
{
|
{
|
||||||
wconvert(varname);
|
wconvert(varname);
|
||||||
char *ret;
|
char* ret = NULL;
|
||||||
wchar_t value[256];
|
wchar_t* wbuf = NULL;
|
||||||
size_t value_size;
|
// _wgetenv() is *BROKEN* in MS compilers => use GetEnvironmentVariableW()
|
||||||
// MinGW and WDK don't know wdupenv_s, so we use wgetenv_s
|
DWORD dwSize = GetEnvironmentVariableW(wvarname, wbuf, 0);
|
||||||
_wgetenv_s(&value_size, value, ARRAYSIZE(value), wvarname);
|
wbuf = calloc(dwSize, sizeof(wchar_t));
|
||||||
ret = wchar_to_utf8(value);
|
if (wbuf == NULL)
|
||||||
|
return NULL;
|
||||||
|
dwSize = GetEnvironmentVariableW(wvarname, wbuf, dwSize);
|
||||||
|
if (dwSize != 0)
|
||||||
|
ret = wchar_to_utf8(wbuf);
|
||||||
|
free(wbuf);
|
||||||
wfree(varname);
|
wfree(varname);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
static __inline int _mkdirU(const char* dirname)
|
static __inline int _mkdirU(const char* dirname)
|
||||||
{
|
{
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 2.14.1088"
|
CAPTION "Rufus 2.15.1089"
|
||||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||||
|
@ -334,8 +334,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,14,1088,0
|
FILEVERSION 2,15,1089,0
|
||||||
PRODUCTVERSION 2,14,1088,0
|
PRODUCTVERSION 2,15,1089,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -352,13 +352,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "2.14.1088"
|
VALUE "FileVersion", "2.15.1089"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2017 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", "2.14.1088"
|
VALUE "ProductVersion", "2.15.1089"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue