mirror of
https://github.com/clangen/musikcube.git
synced 2025-02-14 18:40:48 +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/obj
|
||||
src/core/obj
|
||||
src/square/obj
|
||||
src/contrib/oggdecoder/obj
|
||||
src/contrib/waveout/obj
|
||||
src/contrib/taglib_plugin/obj
|
||||
src/contrib/taglib_plugin/taglib-1.11
|
||||
src/musikbox/musikbox.in
|
||||
taglib-prefix
|
||||
|
@ -73,8 +73,8 @@ include_directories (
|
||||
|
||||
# "/usr/local" doesn't seem to be included by default on macOS 10.12+
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
link_directories ("/usr/local/lib")
|
||||
include_directories("/usr/local/include")
|
||||
link_directories ("/usr/local/lib")
|
||||
include_directories("/usr/local/include")
|
||||
endif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
|
||||
|
||||
add_subdirectory(src/core)
|
||||
@ -137,6 +137,12 @@ install(
|
||||
DESTINATION include/musikcube/core/sdk
|
||||
)
|
||||
|
||||
# symlink the binary
|
||||
install(CODE "EXECUTE_PROCESS (COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/bin/)")
|
||||
install(CODE "EXECUTE_PROCESS (COMMAND ln -sf ${CMAKE_INSTALL_PREFIX}/share/musikcube/musikbox ${CMAKE_INSTALL_PREFIX}/bin/)")
|
||||
# shell script that starts the app.
|
||||
install(
|
||||
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];
|
||||
uint32_t bufsize = sizeof(pathbuf);
|
||||
_NSGetExecutablePath(pathbuf, &bufsize);
|
||||
char *resolved = realpath(pathbuf, NULL);
|
||||
result.assign(resolved);
|
||||
free(resolved);
|
||||
result.assign(pathbuf);
|
||||
size_t last = result.find_last_of("/");
|
||||
result = result.substr(0, last); /* remove filename component */
|
||||
#else
|
||||
|
@ -51,6 +51,14 @@ set (BOX_SRCS
|
||||
./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})
|
||||
|
||||
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
@ -1,3 +1,3 @@
|
||||
#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