Skip to content

Commit

Permalink
[misc] fix XP breakage
Browse files Browse the repository at this point in the history
* Can't wait until XP support is dropped from Rufus altogether...
  • Loading branch information
pbatard committed Sep 28, 2015
1 parent 9411716 commit 5025e27
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
32 changes: 32 additions & 0 deletions src/msapi_utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,37 @@ static __inline int _chdirU(const char *dirname)
return ret;
}

#if defined(_WIN32_WINNT) && (_WIN32_WINNT <= 0x501)
static __inline FILE* fopenU(const char* filename, const char* mode)
{
FILE* ret = NULL;
wconvert(filename);
wconvert(mode);
ret = _wfopen(wfilename, wmode);
wfree(filename);
wfree(mode);
return ret;
}

static __inline int _openU(const char *filename, int oflag, int pmode)
{
int ret = -1;
wconvert(filename);
ret = _wopen(wfilename, oflag, pmode);
wfree(filename);
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
static __inline FILE* fopenU(const char* filename, const char* mode)
{
FILE* ret = NULL;
Expand Down Expand Up @@ -807,6 +838,7 @@ static __inline char* getenvU(const char* varname)
wfree(varname);
return ret;
}
#endif

static __inline int _mkdirU(const char* dirname)
{
Expand Down
10 changes: 5 additions & 5 deletions src/rufus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL

IDD_DIALOG DIALOGEX 12, 12, 242, 376
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Rufus 2.4.756"
CAPTION "Rufus 2.4.757"
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
Expand Down Expand Up @@ -317,8 +317,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,4,756,0
PRODUCTVERSION 2,4,756,0
FILEVERSION 2,4,757,0
PRODUCTVERSION 2,4,757,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -335,13 +335,13 @@ BEGIN
BEGIN
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "2.4.756"
VALUE "FileVersion", "2.4.757"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "� 2011-2015 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
VALUE "OriginalFilename", "rufus.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "2.4.756"
VALUE "ProductVersion", "2.4.757"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 5025e27

Please sign in to comment.