Skip to content

Commit

Permalink
rpm package
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaji Khan committed Aug 5, 2024
1 parent 9099309 commit 2d8be5e
Show file tree
Hide file tree
Showing 9 changed files with 377 additions and 3,636 deletions.
956 changes: 0 additions & 956 deletions all_plugins.json

This file was deleted.

Binary file modified amprack
Binary file not shown.
358 changes: 179 additions & 179 deletions assets/all_plugins.json

Large diffs are not rendered by default.

346 changes: 177 additions & 169 deletions assets/lv2_plugins.json

Large diffs are not rendered by default.

File renamed without changes.
30 changes: 21 additions & 9 deletions engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ bool Engine::addPlugin(char* library, int pluginIndex, SharedLibrary::PluginType
processor->bypass = true ;
SharedLibrary * sharedLibrary = new SharedLibrary (library, _type);

sharedLibrary ->setLibraryPath(std::string ("libs/linux/x86_64"));
sharedLibrary ->setLibraryPath(std::string (libraryPath));
//~ sharedLibrary ->setLibraryPath(std::string ("libs/linux/x86_64"));
sharedLibrary ->lv2_config_path = std::string ("assets/lv2");
sharedLibrary ->lv2_config_path = std::string (assetPath).append ("/lv2");
sharedLibrary->load();

if (sharedLibrary->descriptors.size() == 0) {
Expand Down Expand Up @@ -56,26 +56,38 @@ Engine::Engine () {
if (! std::filesystem::exists (libraryPath)) {
free(libraryPath);

libraryPath = strdup ("/usr/share/amprack/libs/linux/x86_64") ;
libraryPath = strdup ("/usr/share/amprack/libs/linux/x86_64/") ;
}


if (std::filesystem::exists ("assets"))
assetPath = std::string ("assets");
else if (std::filesystem::exists ("/usr/share/amprack/assets"))
assetPath = std::string ("/usr/share/amprack/assets");
else {
LOGD ("CANNOT FIND ASSETS!\n");
abort ();
}

if (! std::filesystem::exists (libraryPath)) {
free(libraryPath);
printf ("CANNOT FIND LIBRARIES!\n");
abort () ;
}

LOGD ("[engine] library path: %s\n", libraryPath);
LOGD ("[engine] assets path: %s\n", assetPath.c_str ());

processor = new Processor () ;
openAudio () ;

ladspaPlugins = new std::vector <std::string> ();
lv2Plugins = new std::vector <std::string> ();

amps = filename_to_json (std::string ("assets/amps.json"));
lv2Json = filename_to_json (std::string ("lv2_plugins.json"));
ladspaJson = filename_to_json (std::string ("all_plugins.json"));
categories = filename_to_json (std::string ("assets/plugins.json"));
creators = filename_to_json (std::string ("assets/creator.json"));
amps = filename_to_json (std::string (assetPath).append ("/amps.json"));
lv2Json = filename_to_json (std::string (assetPath).append ("/lv2_plugins.json"));
ladspaJson = filename_to_json (std::string (assetPath).append ("/all_plugins.json"));
categories = filename_to_json (std::string (assetPath).append ("/plugins.json"));
creators = filename_to_json (std::string (assetPath).append ("/creator.json"));

//~ initLilv ();
}
Expand Down
Binary file modified engine.o
Binary file not shown.
Loading

0 comments on commit 2d8be5e

Please sign in to comment.