mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-15 21:40:04 +00:00
Tweaked the way we load plugins and launch the app to support symlink'd plugins.
This commit is contained in:
parent
d04b990530
commit
ce07e71169
2
.gitignore
vendored
2
.gitignore
vendored
@ -16,9 +16,9 @@ build
|
|||||||
src/3rdparty/bin
|
src/3rdparty/bin
|
||||||
src/3rdparty/obj
|
src/3rdparty/obj
|
||||||
src/core/obj
|
src/core/obj
|
||||||
src/square/obj
|
|
||||||
src/contrib/oggdecoder/obj
|
src/contrib/oggdecoder/obj
|
||||||
src/contrib/waveout/obj
|
src/contrib/waveout/obj
|
||||||
src/contrib/taglib_plugin/obj
|
src/contrib/taglib_plugin/obj
|
||||||
src/contrib/taglib_plugin/taglib-1.11
|
src/contrib/taglib_plugin/taglib-1.11
|
||||||
|
src/musikbox/musikbox.in
|
||||||
taglib-prefix
|
taglib-prefix
|
||||||
|
@ -73,8 +73,8 @@ include_directories (
|
|||||||
|
|
||||||
# "/usr/local" doesn't seem to be included by default on macOS 10.12+
|
# "/usr/local" doesn't seem to be included by default on macOS 10.12+
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
link_directories ("/usr/local/lib")
|
link_directories ("/usr/local/lib")
|
||||||
include_directories("/usr/local/include")
|
include_directories("/usr/local/include")
|
||||||
endif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
endif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||||
|
|
||||||
add_subdirectory(src/core)
|
add_subdirectory(src/core)
|
||||||
@ -137,6 +137,12 @@ install(
|
|||||||
DESTINATION include/musikcube/core/sdk
|
DESTINATION include/musikcube/core/sdk
|
||||||
)
|
)
|
||||||
|
|
||||||
# symlink the binary
|
# shell script that starts the app.
|
||||||
install(CODE "EXECUTE_PROCESS (COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/bin/)")
|
install(
|
||||||
install(CODE "EXECUTE_PROCESS (COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/share/musikcube/musikbox ${CMAKE_INSTALL_PREFIX}/bin/)")
|
FILES src/musikbox/musikbox
|
||||||
|
DESTINATION bin/
|
||||||
|
PERMISSIONS
|
||||||
|
OWNER_EXECUTE OWNER_READ OWNER_WRITE
|
||||||
|
GROUP_EXECUTE GROUP_READ GROUP_WRITE
|
||||||
|
WORLD_EXECUTE WORLD_READ
|
||||||
|
)
|
@ -71,9 +71,7 @@ std::string musik::core::GetApplicationDirectory() {
|
|||||||
char pathbuf[PATH_MAX + 1];
|
char pathbuf[PATH_MAX + 1];
|
||||||
uint32_t bufsize = sizeof(pathbuf);
|
uint32_t bufsize = sizeof(pathbuf);
|
||||||
_NSGetExecutablePath(pathbuf, &bufsize);
|
_NSGetExecutablePath(pathbuf, &bufsize);
|
||||||
char *resolved = realpath(pathbuf, NULL);
|
result.assign(pathbuf);
|
||||||
result.assign(resolved);
|
|
||||||
free(resolved);
|
|
||||||
size_t last = result.find_last_of("/");
|
size_t last = result.find_last_of("/");
|
||||||
result = result.substr(0, last); /* remove filename component */
|
result = result.substr(0, last); /* remove filename component */
|
||||||
#else
|
#else
|
||||||
|
@ -51,6 +51,14 @@ set (BOX_SRCS
|
|||||||
./cursespp/Window.cpp
|
./cursespp/Window.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(musikbox_INSTALL_DIR ${HOMEBREW_PREFIX})
|
||||||
|
|
||||||
|
if (NOT DEFINED musikbox_INSTALL_DIR)
|
||||||
|
set(musikbox_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
configure_file("musikbox.in" "musikbox" @ONLY)
|
||||||
|
|
||||||
add_executable(musikbox ${BOX_SRCS})
|
add_executable(musikbox ${BOX_SRCS})
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION "0.3.2"
|
#define VERSION "0.3.3"
|
||||||
|
5
src/musikbox/musikbox
Normal file
5
src/musikbox/musikbox
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
pushd /usr/local/share/musikcube/ > /dev/null
|
||||||
|
{
|
||||||
|
./musikbox && popd
|
||||||
|
} || popd > /dev/null
|
Loading…
x
Reference in New Issue
Block a user