mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-24 20:58:37 -05:00
Debian package cpack + icon fix
This commit is contained in:
parent
5792256860
commit
07c9395d1f
@ -152,6 +152,8 @@ IF (WIN32)
|
||||
ENDIF (WIN32)
|
||||
|
||||
IF (UNIX AND NOT APPLE)
|
||||
set(BUILD_DEB OFF CACHE BOOL "Build DEB")
|
||||
|
||||
set(RTLSDR_INCLUDE "/usr/local/include" CACHE FILEPATH "RTL-SDR Include Path")
|
||||
set(RTLSDR_LIB "/usr/local/lib" CACHE FILEPATH "RTL-SDR Lib Path")
|
||||
set(USE_AUDIO_PULSE ON CACHE BOOL "Use Pulse Audio")
|
||||
@ -500,4 +502,45 @@ IF (WIN32 AND BUILD_INSTALLER)
|
||||
|
||||
|
||||
INCLUDE(CPack)
|
||||
ENDIF (WIN32 AND BUILD_INSTALLER)
|
||||
ENDIF (WIN32 AND BUILD_INSTALLER)
|
||||
|
||||
|
||||
IF (UNIX AND BUILD_DEB)
|
||||
|
||||
set(CPACK_GENERATOR DEB)
|
||||
set(CPACK_PACKAGE_NAME "CubicSDR")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DEPENDS " librtlsdr0, libfftw3-single3, libwxgtk3.0-0, libpulse0")
|
||||
SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "Charles J. Cliffe <cj@cubicproductions.com>")
|
||||
SET(CPACK_DEBIAN_PACKAGE_DESCRIPTION "CubicSDR Software Defined Radio application v${CUBICSDR_VERSION}")
|
||||
SET(CPACK_DEBIAN_PACKAGE_SECTION "comm")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
||||
SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${EX_PLATFORM_NAME}")
|
||||
|
||||
ADD_DEFINITIONS(
|
||||
-DRES_FOLDER="/usr/share/cubicsdr/"
|
||||
-D_FORTIFY_SOURCE=2
|
||||
)
|
||||
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,-z,relro")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,relro")
|
||||
|
||||
CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/external/deb/deb_post.sh.in" "${CMAKE_CURRENT_BINARY_DIR}/deb_post.sh" @ONLY IMMEDIATE)
|
||||
|
||||
INSTALL(TARGETS CubicSDR DESTINATION bin)
|
||||
install(FILES
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono12.fnt
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono16.fnt
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono18.fnt
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono24.fnt
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono32.fnt
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono48.fnt
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono12_0.png
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono16_0.png
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono18_0.png
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono24_0.png
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono32_0.png
|
||||
${PROJECT_SOURCE_DIR}/font/vera_sans_mono48_0.png
|
||||
DESTINATION share/cubicsdr)
|
||||
|
||||
INCLUDE(CPack)
|
||||
ENDIF (UNIX AND BUILD_DEB)
|
||||
|
11
external/deb/deb_post.sh.in
vendored
Normal file
11
external/deb/deb_post.sh.in
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
# found at https://github.com/paralect/robomongo/blob/master/install/linux/fixup_deb.sh.in
|
||||
set -e
|
||||
mkdir fix_up_deb
|
||||
dpkg-deb -x @CPACK_PACKAGE_FILE_NAME@.deb fix_up_deb
|
||||
dpkg-deb --control @CPACK_PACKAGE_FILE_NAME@.deb fix_up_deb/DEBIAN
|
||||
rm @CPACK_PACKAGE_FILE_NAME@.deb
|
||||
chmod 0644 fix_up_deb/DEBIAN/md5sums
|
||||
find -type d -print0 | xargs -0 chmod 755
|
||||
fakeroot dpkg -b fix_up_deb @CPACK_PACKAGE_FILE_NAME@.deb
|
||||
rm -rf fix_up_deb
|
@ -40,6 +40,10 @@ wxEND_EVENT_TABLE()
|
||||
AppFrame::AppFrame() :
|
||||
wxFrame(NULL, wxID_ANY, CUBICSDR_TITLE), activeDemodulator(NULL) {
|
||||
|
||||
#ifdef __linux__
|
||||
SetIcon(wxICON(cubicsdr));
|
||||
#endif
|
||||
|
||||
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer *demodOpts = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer *demodVisuals = new wxBoxSizer(wxVERTICAL);
|
||||
@ -236,9 +240,7 @@ wxFrame(NULL, wxID_ANY, CUBICSDR_TITLE), activeDemodulator(NULL) {
|
||||
Centre();
|
||||
Show();
|
||||
|
||||
#ifdef __linux__
|
||||
SetIcon(wxICON(cubicsdr));
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
SetIcon(wxICON(frame_icon));
|
||||
#endif
|
||||
|
@ -4,6 +4,10 @@
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
|
||||
#ifndef RES_FOLDER
|
||||
#define RES_FOLDER ""
|
||||
#endif
|
||||
|
||||
GLFontChar::GLFontChar() :
|
||||
id(0), x(0), y(0), width(0), height(0), xoffset(0), yoffset(0), xadvance(0), aspect(1), index(0) {
|
||||
|
||||
@ -149,7 +153,8 @@ std::string GLFont::getParamValue(std::string param_str) {
|
||||
}
|
||||
|
||||
void GLFont::loadFont(std::string fontFile) {
|
||||
fontFileSource = fontFile;
|
||||
fontFileSource = RES_FOLDER;
|
||||
fontFileSource.append(fontFile);
|
||||
|
||||
std::ifstream input;
|
||||
input.open(fontFileSource.c_str(), std::ios::in);
|
||||
@ -210,7 +215,8 @@ void GLFont::loadFont(std::string fontFile) {
|
||||
std::string paramValue = getParamValue(param);
|
||||
|
||||
if (paramKey == "file") {
|
||||
imageFile = paramValue;
|
||||
imageFile = RES_FOLDER;
|
||||
imageFile.append(paramValue);
|
||||
}
|
||||
// std::cout << "[" << paramKey << "] = '" << paramValue << "'" << std::endl;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user