Fixes uninstall problems.
This commit is contained in:
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.16.0)
|
cmake_minimum_required(VERSION 3.16.0)
|
||||||
project(pipedal
|
project(pipedal
|
||||||
VERSION 0.9.10
|
VERSION 0.9.11
|
||||||
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
|
DESCRIPTION "PiPedal Guitar Effect Pedal For Raspberry Pi"
|
||||||
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
|
HOMEPAGE_URL "https://rerdavies.github.io/pipedal"
|
||||||
)
|
)
|
||||||
set (DISPLAY_VERSION "v0.9.10-rc-1")
|
set (DISPLAY_VERSION "v0.9.11-rc-2")
|
||||||
|
|
||||||
set (CMAKE_INSTALL_PREFIX "/usr/")
|
set (CMAKE_INSTALL_PREFIX "/usr/")
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
<img src='docs/GithubBanner.png' width="100%" />
|
<img src='docs/GithubBanner.png' width="100%" />
|
||||||
|
|
||||||
Download: <a href='docs/download.md'>v0.9.10-rc-1</a> Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
|
Download: <a href='docs/download.md'>v0.9.11-rc-2</a> Website: [https://rerdavies.github.io/pipedal](https://rerdavies.github.io/pipedal).
|
||||||
|
|
||||||
|
|
||||||
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
|
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
|
||||||
|
|||||||
Vendored
+2
-2
@@ -3,12 +3,12 @@ Depends: libstdc++6 (>= 9), libasound2 (>= 1.0.16), libc6 (>= 2.34), libgcc-s1 (
|
|||||||
Description: IoT guitar effect for Raspberry Pi
|
Description: IoT guitar effect for Raspberry Pi
|
||||||
IoT guitar effect pedal for Raspberry Pi, with phone-friendly web interface.
|
IoT guitar effect pedal for Raspberry Pi, with phone-friendly web interface.
|
||||||
Homepage: https://github.com/rerdavies/pipedal
|
Homepage: https://github.com/rerdavies/pipedal
|
||||||
Maintainer: Robin Davies<rerdavies@gmail.com
|
Maintainer: Robin E. R. Davies<rerdavies@gmail.com>
|
||||||
Source: pipedal
|
Source: pipedal
|
||||||
Package: pipedal
|
Package: pipedal
|
||||||
Pre-Depends: hostapd;authbind
|
Pre-Depends: hostapd;authbind
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Section: sound
|
Section: sound
|
||||||
Version: 0.1.4
|
Version: 0.9.11
|
||||||
Installed-Size: 15147
|
Installed-Size: 15147
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
/usr/local/pipedalconfig --install
|
/usr/bin/pipedalconfig --install
|
||||||
|
|||||||
Vendored
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
/usr/local/pipedalconfig --uninstall
|
/usr/bin/pipedalconfig --uninstall
|
||||||
|
|||||||
+2
-2
@@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
Download the most recent Debian (.deb) package for your platform:
|
Download the most recent Debian (.deb) package for your platform:
|
||||||
|
|
||||||
- [Raspberry Pi OS (64-bit) v0.9.10-rc-1](https://github.com/rerdavies/pipedal/releases/download/v0.9.10-rc-1/pipedal_0.9.10_arm64.deb)
|
- [Raspberry Pi OS (64-bit) v0.9.11-rc-2](https://github.com/rerdavies/pipedal/releases/download/v0.9.11-rc-2/pipedal_0.9.11_arm64.deb)
|
||||||
|
|
||||||
Install the package by running
|
Install the package by running
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
cd ~/Downloads
|
cd ~/Downloads
|
||||||
sudo apt-get install ./pipedal_0.9.10_arm64.deb
|
sudo apt-get install ./pipedal_0.9.11_arm64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
After installing, follow the instructions in [Configuring PiPedal after Installation](Configuring.md).
|
After installing, follow the instructions in [Configuring PiPedal after Installation](Configuring.md).
|
||||||
|
|||||||
+2
-2
@@ -4,14 +4,14 @@
|
|||||||
|
|
||||||
Download the most recent Debian (.deb) package for your platform:
|
Download the most recent Debian (.deb) package for your platform:
|
||||||
|
|
||||||
- [Ubuntu or Raspberry Pi OS (64-bit)](https://github.com/rerdavies/pipedal/releases/download/v0.9.10-rc-1/pipedal_0.9.10_arm64.deb) v0.9.10-rc-1
|
- [Ubuntu or Raspberry Pi OS (64-bit)](https://github.com/rerdavies/pipedal/releases/download/v0.9.11-rc-2/pipedal_0.9.11_arm64.deb) v0.9.11-rc-2
|
||||||
|
|
||||||
Install the package by running
|
Install the package by running
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo apt update
|
sudo apt update
|
||||||
cd ~/Downloads
|
cd ~/Downloads
|
||||||
sudo apt-get install ./pipedal_0.9.10_arm64.deb
|
sudo apt-get install ./pipedal_0.9.11_arm64.deb
|
||||||
```
|
```
|
||||||
|
|
||||||
Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
|
Follow the instructions in [_Configuring PiPedal After Installation_](https://rerdavies.github.io/pipedal/Configuring.html) to complete the installation.
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<img src="GithubBanner.png" width="100%"/>
|
<img src="GithubBanner.png" width="100%"/>
|
||||||
<a href="Installing.html"><i>v0.9.10-rc-1</i></a>
|
<a href="Installing.html"><i>v0.9.11-rc-2</i></a>
|
||||||
|
|
||||||
|
|
||||||
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
|
Use your Raspberry Pi as a guitar effects pedal. Configure and control PiPedal with your phone or tablet.
|
||||||
|
|||||||
+4
-7
@@ -64,7 +64,8 @@ bool AdminClient::WriteMessage(const char *message)
|
|||||||
}
|
}
|
||||||
catch (const std::exception &e)
|
catch (const std::exception &e)
|
||||||
{
|
{
|
||||||
Lv2Log::error(SS("Failed to connect to PiPedal Admin service."));
|
// Socket permissions require membership in pipedal_d group.
|
||||||
|
Lv2Log::error(SS("Failed to connect to PiPedal Admin service. " << e.what()));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,7 +169,7 @@ void AdminClient::MonitorGovernor(const std::string &governor)
|
|||||||
bool result = WriteMessage(cmd.str().c_str());
|
bool result = WriteMessage(cmd.str().c_str());
|
||||||
if (!result)
|
if (!result)
|
||||||
{ // unexpected. Should throw exception on failure.
|
{ // unexpected. Should throw exception on failure.
|
||||||
throw PiPedalException("Operation failed.");
|
Lv2Log::warning("Not monitoring CPU governor status.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void AdminClient::UnmonitorGovernor()
|
void AdminClient::UnmonitorGovernor()
|
||||||
@@ -180,9 +181,5 @@ void AdminClient::UnmonitorGovernor()
|
|||||||
std::stringstream cmd;
|
std::stringstream cmd;
|
||||||
cmd << "UnmonitorGovernor";
|
cmd << "UnmonitorGovernor";
|
||||||
cmd << '\n';
|
cmd << '\n';
|
||||||
bool result = WriteMessage(cmd.str().c_str());
|
bool ignored = WriteMessage(cmd.str().c_str());
|
||||||
if (!result)
|
|
||||||
{ // unexpected. Should throw exception on failure.
|
|
||||||
throw PiPedalException("Operation failed.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,14 +8,6 @@ set (USE_PCH 1)
|
|||||||
include(FindPkgConfig)
|
include(FindPkgConfig)
|
||||||
|
|
||||||
|
|
||||||
# apt install libsdbus-c++-dev
|
|
||||||
# apt install libsdbus-c++-bin
|
|
||||||
find_package(sdbus-c++ REQUIRED)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Can't get the pkg_check to work.
|
# Can't get the pkg_check to work.
|
||||||
# pkg_check_modules(LIBNL3 "nl-genl-3")
|
# pkg_check_modules(LIBNL3 "nl-genl-3")
|
||||||
|
|||||||
+30
-11
@@ -64,7 +64,7 @@ using namespace pipedal;
|
|||||||
#define PIPEDAL_P2PD_SERVICE "pipedal_p2pd"
|
#define PIPEDAL_P2PD_SERVICE "pipedal_p2pd"
|
||||||
#define JACK_SERVICE "jack"
|
#define JACK_SERVICE "jack"
|
||||||
|
|
||||||
#define REMOVE_OLD_SERVICE 1 // Grandfathering: whether to remove the old shutdown service (now pipedaladmind)
|
#define REMOVE_OLD_SERVICE 0 // Grandfathering: whether to remove the old shutdown service (now pipedaladmind)
|
||||||
#define OLD_SHUTDOWN_SERVICE "pipedalshutdownd"
|
#define OLD_SHUTDOWN_SERVICE "pipedalshutdownd"
|
||||||
|
|
||||||
std::filesystem::path GetServiceFileName(const std::string &serviceName)
|
std::filesystem::path GetServiceFileName(const std::string &serviceName)
|
||||||
@@ -101,27 +101,27 @@ void EnableService()
|
|||||||
{
|
{
|
||||||
if (sysExec(SYSTEMCTL_BIN " enable " NATIVE_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " enable " NATIVE_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to enable the " NATIVE_SERVICE " service.";
|
cout << "Error: Failed to enable the " NATIVE_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
if (sysExec(SYSTEMCTL_BIN " enable " ADMIN_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " enable " ADMIN_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to enable the " ADMIN_SERVICE " service.";
|
cout << "Error: Failed to enable the " ADMIN_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void DisableService()
|
void DisableService()
|
||||||
{
|
{
|
||||||
if (sysExec(SYSTEMCTL_BIN " disable " NATIVE_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " disable " NATIVE_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to disable the " NATIVE_SERVICE " service.";
|
cout << "Error: Failed to disable the " NATIVE_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
if (sysExec(SYSTEMCTL_BIN " disable " ADMIN_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " disable " ADMIN_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to disable the " ADMIN_SERVICE " service.";
|
cout << "Error: Failed to disable the " ADMIN_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
#if REMOVE_OLD_SERVICE
|
#if REMOVE_OLD_SERVICE
|
||||||
if (sysExec(SYSTEMCTL_BIN " disable " OLD_SHUTDOWN_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " disable " OLD_SHUTDOWN_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to disable the " OLD_SHUTDOWN_SERVICE " service.";
|
cout << "Error: Failed to disable the " OLD_SHUTDOWN_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -130,24 +130,24 @@ void StopService(bool excludeShutdownService = false)
|
|||||||
{
|
{
|
||||||
if (sysExec(SYSTEMCTL_BIN " stop " NATIVE_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " stop " NATIVE_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to stop the " NATIVE_SERVICE " service.";
|
cout << "Error: Failed to stop the " NATIVE_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
if (!excludeShutdownService)
|
if (!excludeShutdownService)
|
||||||
{
|
{
|
||||||
if (sysExec(SYSTEMCTL_BIN " stop " ADMIN_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " stop " ADMIN_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to stop the " ADMIN_SERVICE " service.";
|
cout << "Error: Failed to stop the " ADMIN_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
#if REMOVE_OLD_SERVICE
|
#if REMOVE_OLD_SERVICE
|
||||||
if (sysExec(SYSTEMCTL_BIN " stop " OLD_SHUTDOWN_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " stop " OLD_SHUTDOWN_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
cout << "Error: Failed to stop the " OLD_SHUTDOWN_SERVICE " service.";
|
cout << "Error: Failed to stop the " OLD_SHUTDOWN_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (sysExec(SYSTEMCTL_BIN " stop " JACK_SERVICE ".service") != EXIT_SUCCESS)
|
if (sysExec(SYSTEMCTL_BIN " stop " JACK_SERVICE ".service") != EXIT_SUCCESS)
|
||||||
{
|
{
|
||||||
throw PiPedalException("Failed to stop the " JACK_SERVICE " service.");
|
cout << "Error: Failed to stop the " JACK_SERVICE " service.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -527,9 +527,24 @@ static void PrepareDeviceidFile()
|
|||||||
{
|
{
|
||||||
DeviceIdFile deviceIdFile;
|
DeviceIdFile deviceIdFile;
|
||||||
|
|
||||||
deviceIdFile.deviceName = "PiPedal-" + RandomChars(2);
|
deviceIdFile.deviceName = "PiPedal";
|
||||||
deviceIdFile.uuid = MakeUuid();
|
deviceIdFile.uuid = MakeUuid();
|
||||||
deviceIdFile.Save();
|
deviceIdFile.Save();
|
||||||
|
} else {
|
||||||
|
DeviceIdFile deviceIdFile;
|
||||||
|
if (deviceIdFile.deviceName == "" || deviceIdFile.uuid == "")
|
||||||
|
{
|
||||||
|
if (deviceIdFile.deviceName == "")
|
||||||
|
{
|
||||||
|
deviceIdFile.deviceName = "PiPedal";
|
||||||
|
}
|
||||||
|
if (deviceIdFile.uuid == "")
|
||||||
|
{
|
||||||
|
deviceIdFile.uuid = MakeUuid();
|
||||||
|
}
|
||||||
|
deviceIdFile.Save();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -539,6 +554,10 @@ void Install(const std::filesystem::path &programPrefix, const std::string endpo
|
|||||||
{
|
{
|
||||||
throw PiPedalException("Failed to create audio service group.");
|
throw PiPedalException("Failed to create audio service group.");
|
||||||
}
|
}
|
||||||
|
if (sysExec(GROUPADD_BIN " -f " SERVICE_GROUP_NAME) != EXIT_SUCCESS)
|
||||||
|
{
|
||||||
|
throw PiPedalException("Failed to create pipedald service group.");
|
||||||
|
}
|
||||||
|
|
||||||
PrepareDeviceidFile();
|
PrepareDeviceidFile();
|
||||||
InstallJackService();
|
InstallJackService();
|
||||||
|
|||||||
+9
-10
@@ -39,16 +39,16 @@ const char DeviceIdFile::DEVICEID_FILE_NAME[] = "/etc/pipedal/config/device_uuid
|
|||||||
|
|
||||||
void DeviceIdFile::Load()
|
void DeviceIdFile::Load()
|
||||||
{
|
{
|
||||||
ifstream f;
|
|
||||||
|
|
||||||
f.open(DEVICEID_FILE_NAME);
|
|
||||||
if (!f.is_open())
|
|
||||||
{
|
{
|
||||||
throw invalid_argument("Can't open file " + std::string(DEVICEID_FILE_NAME));
|
ifstream f;
|
||||||
}
|
|
||||||
|
|
||||||
std::getline(f, uuid);
|
f.open(DEVICEID_FILE_NAME);
|
||||||
std::getline(f, deviceName);
|
if (f.is_open())
|
||||||
|
{
|
||||||
|
std::getline(f, uuid);
|
||||||
|
std::getline(f, deviceName);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void DeviceIdFile::Save()
|
void DeviceIdFile::Save()
|
||||||
{
|
{
|
||||||
@@ -67,10 +67,9 @@ void DeviceIdFile::Save()
|
|||||||
{
|
{
|
||||||
throw logic_error("Group not found: pipedal_d");
|
throw logic_error("Group not found: pipedal_d");
|
||||||
}
|
}
|
||||||
std::ignore = chown(path.c_str(),-1,group_->gr_gid);
|
std::ignore = chown(path.c_str(), -1, group_->gr_gid);
|
||||||
std::ignore = chmod(path.c_str(), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
std::ignore = chmod(path.c_str(), S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
|
||||||
|
|
||||||
|
|
||||||
f << uuid << endl;
|
f << uuid << endl;
|
||||||
f << deviceName << endl;
|
f << deviceName << endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ void JackConfiguration::Initialize()
|
|||||||
AddPorts(client, &this->outputAudioPorts_, "system", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput);
|
AddPorts(client, &this->outputAudioPorts_, "system", JACK_DEFAULT_AUDIO_TYPE, JackPortIsInput);
|
||||||
AddPorts(client, &this->inputMidiPorts_, "system", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput);
|
AddPorts(client, &this->inputMidiPorts_, "system", JACK_DEFAULT_MIDI_TYPE, JackPortIsOutput);
|
||||||
AddPorts(client, &this->outputMidiPorts_, "system", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput);
|
AddPorts(client, &this->outputMidiPorts_, "system", JACK_DEFAULT_MIDI_TYPE, JackPortIsInput);
|
||||||
isValid_ = true;
|
isValid_ = (this->inputAudioPorts_.size() > 0 && this->outputAudioPorts_.size() > 0);
|
||||||
this->errorStatus_ = "";
|
this->errorStatus_ = "";
|
||||||
jack_client_close(client);
|
jack_client_close(client);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -688,7 +688,15 @@ void PiPedalModel::UpdateDnsSd()
|
|||||||
|
|
||||||
DeviceIdFile deviceIdFile;
|
DeviceIdFile deviceIdFile;
|
||||||
deviceIdFile.Load();
|
deviceIdFile.Load();
|
||||||
avahiService.Announce(webPort,deviceIdFile.deviceName,deviceIdFile.uuid,"pipedal");
|
if (deviceIdFile.deviceName != "" && deviceIdFile.uuid != "")
|
||||||
|
{
|
||||||
|
avahiService.Announce(webPort,deviceIdFile.deviceName,deviceIdFile.uuid,"pipedal");
|
||||||
|
} else {
|
||||||
|
// device_uuid file is written at install time. This warning is harmless if you're debugging.
|
||||||
|
// Without it, we can't pulblish the website via dnsDS.
|
||||||
|
// Run "pipedalconfig --install" to create the file.
|
||||||
|
Lv2Log::warning("Cant read device_uuid file. dnsSD announcement skipped.");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
void PiPedalModel::SetWifiDirectConfigSettings(const WifiDirectConfigSettings &wifiDirectConfigSettings)
|
void PiPedalModel::SetWifiDirectConfigSettings(const WifiDirectConfigSettings &wifiDirectConfigSettings)
|
||||||
|
|||||||
Reference in New Issue
Block a user