Skip to content

Commit

Permalink
Merge pull request #78 from martim01/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
martim01 authored Jan 17, 2022
2 parents d06f4b3 + 5e1e081 commit f7eb6e7
Show file tree
Hide file tree
Showing 177 changed files with 2,067 additions and 128,224 deletions.
18 changes: 14 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(pamworkspace)
project(pamworkspace VERSION 1.2.0.0)

SET(CMAKE_CXX_STANDARD 14)

SET(NMOS OFF CACHE BOOL "set to ON to include NMOS")

message(STATUS "Build Type: ${CMAKE_BUILD_TYPE}")
message(STATUS "NMOS: ${NMOS}")

SET(DIR_BASE $ENV{HOME} CACHE STRING "base location for libraries")
SET(DIR_PAM $ENV{HOME}/pam CACHE STRING "location for pam config files etc")
SET(DIR_BASE $ENV{HOME} CACHE STRING "base location for external libraries' source")
SET(DIR_NMOS ${DIR_BASE}/nmos CACHE STRING "location of nmos")
SET(DIR_PTPMONKEY ${DIR_BASE}/ptpmonkey CACHE STRING "location of ptpmonkey")
SET(DIR_SAPSERVER ${DIR_BASE}/sapserver CACHE STRING "location of sapserver")
Expand All @@ -17,6 +20,7 @@ SET(DIR_DNSSD ${DIR_BASE}/dnssd CACHE STRING "location of pml dnssd")
SET(BUILD_DNSSD OFF)
SET(BUILD_LOG OFF)


message(STATUS "Find external libraries")

#Get log
Expand Down Expand Up @@ -121,6 +125,8 @@ if(${NMOS})
add_subdirectory(${DIR_NMOS} ${CMAKE_SOURCE_DIR}/build/nmos)
endif()

configure_file(pam2_paths.h.in ${CMAKE_BINARY_DIR}/include/pam2_paths.h @ONLY)

message(STATUS "Configure pambase")
add_subdirectory(pambase)
message(STATUS "Configure pamfft")
Expand Down Expand Up @@ -177,5 +183,9 @@ message(STATUS "Configure plugin waveform")
add_subdirectory(plugins/waveform)
message(STATUS "Configure pam2")
add_subdirectory(pam2)
#message(STATUS "Configure pamupdatemanager")
#add_subdirectory(pamupdatemanager)
message(STATUS "Configure pamupdatemanager")
add_subdirectory(pamupdatemanager)
message(STATUS "Configure InitialSetup")
add_subdirectory(InitialSetup)
add_subdirectory(dosetup)

36 changes: 36 additions & 0 deletions InitialSetup/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(InitialSetup LANGUAGES CXX VERSION 1.0.0.0)

execute_process(COMMAND ${CMAKE_COMMAND} -DNAMESPACE=${PROJECT_NAME} -DMAJOR=${PROJECT_VERSION_MAJOR} -DMINOR=${PROJECT_VERSION_MINOR} -DPATCH=${PROJECT_VERSION_PATCH} -P ${CMAKE_SOURCE_DIR}/version.cmake)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

include_directories("../pambase/")
include_directories(${CMAKE_BINARY_DIR}/include)

link_directories("../lib")

set(SOURCES "InitialSetupApp.cpp" "InitialSetupMain.cpp" ${CMAKE_BINARY_DIR}/src/${PROJECT_NAME}_version.cpp)

add_executable(InitialSetup ${SOURCES})

list(APPEND flags "-fPIC" "-Wall" "-fpermissive" "-O3")
target_compile_options(InitialSetup PRIVATE ${flags})
target_compile_definitions(InitialSetup PUBLIC NDEBUG DLL_EXPORTS wxUSE_UNICODE __WXGNU__ CREATING_LEVELDLL _app_ _MSL_STDINT_H)

#find external libraries
find_package(wxWidgets REQUIRED)
include(${wxWidgets_USE_FILE})

target_link_libraries(InitialSetup ${wxWidgets_LIBRARIES} pambase)



set_property(TARGET InitialSetup PROPERTY CXX_STANDARD 14)
set_target_properties(InitialSetup PROPERTIES RUNTIME_OUTPUT_DIRECTORY "../../bin/")


#linux specific
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(TARGETS InitialSetup RUNTIME DESTINATION /usr/local/bin)
endif()
5 changes: 4 additions & 1 deletion InitialSetup/InitialSetupApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
**************************************************************/

#include "InitialSetupApp.h"
#include "settings.h"
#include "pam2_paths.h"

//(*AppHeaders
#include "InitialSetupMain.h"
Expand All @@ -17,7 +19,8 @@
IMPLEMENT_APP(InitialSetupApp);

bool InitialSetupApp::OnInit()
{
{
Settings::Get().ReadSettings(wxString::Format(wxT("%s/pam/pam2.ini"), pml::pam2::CONFIG_PATH));
//(*AppInitialize
bool wxsOK = true;
wxInitAllImageHandlers();
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,17 @@ For more information please look at the help files contained in the __documents_
* Secret Rabit Code http://www.mega-nerd.com/SRC/
* Avahi-Client

#### For UpdateManager
* libcurl https://curl.haxx.se/download.html

#### For UpdateWebServer
* MicroHttp https://www.gnu.org/software/libmicrohttpd/


##### To install these libraries on Raspbian
On Buster and earlier
```
sudo apt-get update
sudo apt-get install libwxgtk3.0-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcurl4-openssl-dev libmicrohttpd-dev
sudo apt-get install libwxgtk3.0-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcap-dev
```
On Bullseye
```
sudo apt-get update
sudo apt-get install libwxgtk3.0-gtk3-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcurl4-openssl-dev libmicrohttpd-dev
sudo apt-get install libwxgtk3.0-gtk3-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcap-dev
```

### Other libraries required
Expand Down Expand Up @@ -108,6 +102,7 @@ This will
- install all necessary libraries in __/usr/local/lib/pam2__
- set the relevant capabilities on the application
- create the required __pam2.conf__ file in __/etc.ld.so.conf.d__ and run __ldconfig__ so Linux knows about the new libraries
- copy the required files from the documents directory

### To build in Code::Blocks

Expand Down Expand Up @@ -155,7 +150,7 @@ If you wish to include [nmos](https://github.com/martim01/nmos) in the applicati
PAM expects a few files to live in a specific directory:
* If it doesn't exist create a directory called __pam__ in your home directory.
* Copy the contents of the __document__ directory to the __pam__ directory.

* If you used CMake to build and install PAM then this will happen automatically

## Prebuilt Images
Links to these can be found [here](https://github.com/martim01/pam/releases) with the associated Releaes
Expand Down
43 changes: 43 additions & 0 deletions createrelease.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import subprocess

def get_git_log(project, commit):
cmd = 'git'
log = 'log'
grep="--grep="
log_format ='--pretty=%s'



output = subprocess.check_output([cmd, log, grep+project+commit, log_format]).decode('utf-8')
lines = output.splitlines()

print(lines)

def get_git_project_log(project):
improvement = "improvement"
feat = "feat"
perf = "perf"
fix = "fix"

get_git_log(project, feat)
get_git_log(project, improvement)
get_git_log(project, perf)
get_git_log(project, fix)

def create_release():
#find all CMakelists.txt files
#get the git log for the project name defined in the file
#add the binary path/name to what our tar list
##

get_git_project_log('')








if __name__ == '__main__':
create_release()
32 changes: 32 additions & 0 deletions dosetup/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
project(dosetup LANGUAGES CXX VERSION 1.0.0.0)

execute_process(COMMAND ${CMAKE_COMMAND} -DNAMESPACE=${PROJECT_NAME} -DMAJOR=${PROJECT_VERSION_MAJOR} -DMINOR=${PROJECT_VERSION_MINOR} -DPATCH=${PROJECT_VERSION_PATCH} -P ${CMAKE_SOURCE_DIR}/version.cmake)

set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)

include_directories("../pambase/")
include_directories(${CMAKE_BINARY_DIR}/include)

link_directories("../lib")

set(SOURCES "main.cpp" "logtofile.cpp" ${CMAKE_BINARY_DIR}/src/${PROJECT_NAME}_version.cpp)

add_executable(dosetup ${SOURCES})

list(APPEND flags "-fPIC" "-Wall" "-fpermissive" "-O3")
target_compile_options(dosetup PRIVATE ${flags})
target_compile_definitions(dosetup PUBLIC NDEBUG DLL_EXPORTS wxUSE_UNICODE __WXGNU__ CREATING_LEVELDLL _app_ _MSL_STDINT_H)
target_link_libraries(dosetup pml_log)



set_property(TARGET dosetup PROPERTY CXX_STANDARD 14)
set_target_properties(dosetup PROPERTIES RUNTIME_OUTPUT_DIRECTORY "../../bin/")


#linux specific
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
install(TARGETS dosetup RUNTIME DESTINATION /usr/local/bin)
endif()

File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed manifest_creator/bin/LinuxRelease/manifest_creator
Binary file not shown.
100 changes: 0 additions & 100 deletions manifest_creator/manifest_creator.cbp

This file was deleted.

58 changes: 0 additions & 58 deletions manifest_creator/manifest_creator.cbp.mak

This file was deleted.

Loading

0 comments on commit f7eb6e7

Please sign in to comment.