Compilation fix (snapcraft specific)

This commit is contained in:
Bruno Herbelin
2024-01-05 20:23:51 +01:00
parent 0e9fe58c06
commit eeeba3d2b7
8 changed files with 19 additions and 9 deletions

View File

@@ -399,6 +399,8 @@ include_directories(
${OSCPACK_INCLUDE_DIR}
)
add_library(OSCPACK "${OSCPACK_SRCS}")
set_property(TARGET ${OSCPACK} PROPERTY CXX_STANDARD 17)
set_property(TARGET ${OSCPACK} PROPERTY C_STANDARD 11)
if(APPLE)
target_compile_definitions(OSCPACK
PRIVATE

View File

@@ -63,6 +63,7 @@ parts:
- ableton-link-dev
- libtinyxml2-dev
- libglm-dev
- execstack
stage-packages:
- libpng16-16
- libglu1-mesa
@@ -87,4 +88,11 @@ parts:
- libslang2
- libicu70
- libtinyxml2-9
override-prime: |
craftctl default
# try remove execstack on armhf
for f in usr/lib/arm-linux-gnueabihf/libde265.so.0.1.1 usr/lib/arm-linux-gnueabihf/libmpeg2.so.0.1.0; do
if [ -f $f ]; then
execstack -c $f
fi
done

View File

@@ -286,7 +286,8 @@ void Log::Render(bool *showWarnings)
ImGuiToolkit::Icon(7, 14);
ImGui::SameLine(0, IMGUI_SAME_LINE);
ImGui::SetNextItemWidth(width);
ImGui::TextColored(ImVec4(1.0f,0.6f,0.0f,1.0f), "%ld problem(s) occurred.\n\n", warnings.size());
std::string msg = std::to_string(warnings.size()) + " problem" + (warnings.size() > 1 ? "s" : "");
ImGui::TextColored(ImVec4(1.0f,0.6f,0.0f,1.0f), "%s occurred.\n\n", msg.c_str());
ImGui::Dummy(ImVec2(width, 0));
ImGui::PushTextWrapPos(ImGui::GetCursorPos().x + width);

View File

@@ -1210,7 +1210,7 @@ void MediaPlayer::update()
}
else {
Log::Warning("'%s' : %s", uri().c_str(), media_.log.c_str());
Log::Warning("MediaPlayer %s Loading failed.", std::to_string(id_).c_str());
Log::Notify("MediaPlayer %s Loading failed.", std::to_string(id_).c_str());
failed_ = true;
}
}

View File

@@ -25,7 +25,7 @@ using namespace tinyxml2;
#include "Playlist.h"
Playlist::Playlist() : current_index_(UINTMAX_MAX)
Playlist::Playlist()
{
}

View File

@@ -28,13 +28,11 @@ public:
inline std::string at (size_t index) const { return path_.at(index); }
void remove (size_t index);
void move (size_t from_index, size_t to_index);
inline size_t current() const { return current_index_; }
private:
std::deque< std::string > path_;
std::string filename_;
size_t current_index_;
};
#endif // PLAYLIST_H

View File

@@ -69,10 +69,10 @@ long SystemToolkit::memory_usage()
// numbers that are: virtual mem program size, resident set size,
// shared pages, text/code, data/stack, library, dirty pages. The
// mem sizes should all be multiplied by the page size.
size_t size = 0;
unsigned long size = 0;
FILE *file = fopen("/proc/self/statm", "r");
if (file) {
size_t m = 0;
unsigned long m = 0;
int ret = 0, ret2 = 0;
ret = fscanf (file, "%lu", &m); // virtual mem program size,
ret2 = fscanf (file, "%lu", &m); // resident set size,

View File

@@ -3732,7 +3732,8 @@ void Navigator::RenderNewPannel(const ImVec2 &iconsize)
ImGui::Text("Codec :");ImGui::SameLine(150);
ImGui::Text("%s", VideoRecorder::profile_name[ _video_recorder.profile() ] );
ImGui::Text("Frames :");ImGui::SameLine(150);
ImGui::Text("%lu / %lu", (unsigned long)_video_recorder.numFrames(), _video_recorder.files().size() );
ImGui::Text("%lu / %lu", (unsigned long)_video_recorder.numFrames(),
(unsigned long)_video_recorder.files().size() );
ImGui::Spacing();
ImGui::ProgressBar(_video_recorder.progress());