Bumped to 0.17.2, fixed startup crashes caused non-latin usernames.

This commit is contained in:
casey langen 2017-06-18 14:11:06 -07:00
parent 5128a1f416
commit bfbd4db5e5
7 changed files with 47 additions and 22 deletions

View File

@ -1,7 +1,11 @@
0.17.1
0.17.2
win32-only release to correct startup issues on computers that do not have the
visual c++ 14 runtime installed.
user-facing:
* fixed a bug where usernames with non-latin characters may cause the
`websocket_remote` and `httpdatastream` plugins to crash during startup.
* fixed startup issues on windows computers that do not have the visual c++ 14
runtime installed.
--------------------------------------------------------------------------------

View File

@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.0)
project(musikbox)
set (musikbox_VERSION_MAJOR 0)
set (musikbox_VERSION_MINOR 17)
set (musikbox_VERSION_PATCH 1)
set (musikbox_VERSION_PATCH 2)
set (musikbox_VERSION "${musikbox_VERSION_MAJOR}.${musikbox_VERSION_MINOR}.${musikbox_VERSION_PATCH}")
include(CMakeToolsHelpers OPTIONAL)

View File

@ -1,3 +1,3 @@
#pragma once
#define VERSION "0.17.1"
#define VERSION "0.17.2"

View File

@ -75,8 +75,8 @@ extern "C" DLLEXPORT void SetEnvironment(IEnvironment* environment) {
cachePath = std::string(buffer) + "/cache/httpclient/";
boost::filesystem::path p(cachePath);
if (!boost::filesystem::exists(cachePath)) {
boost::filesystem::create_directories(cachePath);
if (!boost::filesystem::exists(p)) {
boost::filesystem::create_directories(p);
}
}
}

View File

@ -39,6 +39,9 @@
#include <core/sdk/constants.h>
#include <core/sdk/IPlugin.h>
#include <boost/filesystem.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#ifdef WIN32
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
return true;
@ -49,20 +52,28 @@
#define DLLEXPORT
#endif
class HttpDataStreamPlugin : public musik::core::sdk::IPlugin {
virtual void Destroy() { delete this; };
virtual const char* Name() { return "HTTP IDataStream"; }
virtual const char* Version() { return "0.1.0"; }
virtual const char* Author() { return "clangen"; }
virtual const char* Guid() { return "b153adad-ee98-4331-ad32-4ff7f34828cd"; }
virtual bool Configurable() { return false; }
virtual void Configure() { }
virtual void Reload() { }
virtual int SdkVersion() { return musik::core::sdk::SdkVersion; }
};
static class HttpDataStreamPlugin : public musik::core::sdk::IPlugin {
public:
HttpDataStreamPlugin() {
/* enable utf8 filesystem (required in windows, maybe not macos/linux */
std::locale locale = std::locale();
std::locale utf8Locale(locale, new boost::filesystem::detail::utf8_codecvt_facet);
boost::filesystem::path::imbue(utf8Locale);
}
virtual void Destroy() { };
virtual const char* Name() { return "HTTP IDataStream"; }
virtual const char* Version() { return "0.1.0"; }
virtual const char* Author() { return "clangen"; }
virtual const char* Guid() { return "b153adad-ee98-4331-ad32-4ff7f34828cd"; }
virtual bool Configurable() { return false; }
virtual void Configure() { }
virtual void Reload() { }
virtual int SdkVersion() { return musik::core::sdk::SdkVersion; }
} plugin;
extern "C" DLLEXPORT IPlugin* GetPlugin() {
return new HttpDataStreamPlugin();
return &plugin;
}
extern "C" DLLEXPORT IDataStreamFactory* GetDataStreamFactory() {

View File

@ -45,9 +45,9 @@ static std::string cachePath(Context& context) {
char buf[4096];
context.environment->GetPath(PathType::PathData, buf, sizeof(buf));
std::string path = std::string(buf) + "/cache/transcoder/";
if (!exists(path)) {
create_directories(path);
boost::filesystem::path boostPath(path);
if (!exists(boostPath)) {
create_directories(boostPath);
}
return path;

View File

@ -41,6 +41,9 @@
#include <core/sdk/IPlaybackRemote.h>
#include <core/sdk/IPlugin.h>
#include <boost/filesystem.hpp>
#include <boost/filesystem/detail/utf8_codecvt_facet.hpp>
#include <thread>
#ifdef WIN32
@ -148,6 +151,13 @@ static class PlaybackRemote : public IPlaybackRemote {
static class Plugin : public IPlugin {
public:
Plugin() {
/* enable utf8 filesystem (required in windows, maybe not macos/linux */
std::locale locale = std::locale();
std::locale utf8Locale(locale, new boost::filesystem::detail::utf8_codecvt_facet);
boost::filesystem::path::imbue(utf8Locale);
}
virtual void Destroy() { }
virtual const char* Name() { return "WebSockets IPlaybackRemote"; }
virtual const char* Version() { return "0.6.0"; }