Skip to content

Commit f7eb6e7

Browse files
authored
Merge pull request #78 from martim01/development
Development
2 parents d06f4b3 + 5e1e081 commit f7eb6e7

File tree

177 files changed

+2067
-128224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+2067
-128224
lines changed

CMakeLists.txt

+14-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2-
project(pamworkspace)
2+
project(pamworkspace VERSION 1.2.0.0)
3+
4+
SET(CMAKE_CXX_STANDARD 14)
35

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

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

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

23+
2024
message(STATUS "Find external libraries")
2125

2226
#Get log
@@ -121,6 +125,8 @@ if(${NMOS})
121125
add_subdirectory(${DIR_NMOS} ${CMAKE_SOURCE_DIR}/build/nmos)
122126
endif()
123127

128+
configure_file(pam2_paths.h.in ${CMAKE_BINARY_DIR}/include/pam2_paths.h @ONLY)
129+
124130
message(STATUS "Configure pambase")
125131
add_subdirectory(pambase)
126132
message(STATUS "Configure pamfft")
@@ -177,5 +183,9 @@ message(STATUS "Configure plugin waveform")
177183
add_subdirectory(plugins/waveform)
178184
message(STATUS "Configure pam2")
179185
add_subdirectory(pam2)
180-
#message(STATUS "Configure pamupdatemanager")
181-
#add_subdirectory(pamupdatemanager)
186+
message(STATUS "Configure pamupdatemanager")
187+
add_subdirectory(pamupdatemanager)
188+
message(STATUS "Configure InitialSetup")
189+
add_subdirectory(InitialSetup)
190+
add_subdirectory(dosetup)
191+

InitialSetup/CMakeLists.txt

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2+
project(InitialSetup LANGUAGES CXX VERSION 1.0.0.0)
3+
4+
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)
5+
6+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
7+
8+
include_directories("../pambase/")
9+
include_directories(${CMAKE_BINARY_DIR}/include)
10+
11+
link_directories("../lib")
12+
13+
set(SOURCES "InitialSetupApp.cpp" "InitialSetupMain.cpp" ${CMAKE_BINARY_DIR}/src/${PROJECT_NAME}_version.cpp)
14+
15+
add_executable(InitialSetup ${SOURCES})
16+
17+
list(APPEND flags "-fPIC" "-Wall" "-fpermissive" "-O3")
18+
target_compile_options(InitialSetup PRIVATE ${flags})
19+
target_compile_definitions(InitialSetup PUBLIC NDEBUG DLL_EXPORTS wxUSE_UNICODE __WXGNU__ CREATING_LEVELDLL _app_ _MSL_STDINT_H)
20+
21+
#find external libraries
22+
find_package(wxWidgets REQUIRED)
23+
include(${wxWidgets_USE_FILE})
24+
25+
target_link_libraries(InitialSetup ${wxWidgets_LIBRARIES} pambase)
26+
27+
28+
29+
set_property(TARGET InitialSetup PROPERTY CXX_STANDARD 14)
30+
set_target_properties(InitialSetup PROPERTIES RUNTIME_OUTPUT_DIRECTORY "../../bin/")
31+
32+
33+
#linux specific
34+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
35+
install(TARGETS InitialSetup RUNTIME DESTINATION /usr/local/bin)
36+
endif()

InitialSetup/InitialSetupApp.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
**************************************************************/
99

1010
#include "InitialSetupApp.h"
11+
#include "settings.h"
12+
#include "pam2_paths.h"
1113

1214
//(*AppHeaders
1315
#include "InitialSetupMain.h"
@@ -17,7 +19,8 @@
1719
IMPLEMENT_APP(InitialSetupApp);
1820

1921
bool InitialSetupApp::OnInit()
20-
{
22+
{
23+
Settings::Get().ReadSettings(wxString::Format(wxT("%s/pam/pam2.ini"), pml::pam2::CONFIG_PATH));
2124
//(*AppInitialize
2225
bool wxsOK = true;
2326
wxInitAllImageHandlers();

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,17 @@ For more information please look at the help files contained in the __documents_
3636
* Secret Rabit Code http://www.mega-nerd.com/SRC/
3737
* Avahi-Client
3838

39-
#### For UpdateManager
40-
* libcurl https://curl.haxx.se/download.html
41-
42-
#### For UpdateWebServer
43-
* MicroHttp https://www.gnu.org/software/libmicrohttpd/
44-
4539

4640
##### To install these libraries on Raspbian
4741
On Buster and earlier
4842
```
4943
sudo apt-get update
50-
sudo apt-get install libwxgtk3.0-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcurl4-openssl-dev libmicrohttpd-dev
44+
sudo apt-get install libwxgtk3.0-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcap-dev
5145
```
5246
On Bullseye
5347
```
5448
sudo apt-get update
55-
sudo apt-get install libwxgtk3.0-gtk3-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcurl4-openssl-dev libmicrohttpd-dev
49+
sudo apt-get install libwxgtk3.0-gtk3-dev portaudio19-dev libsndfile1-dev libsamplerate0-dev libavahi-client-dev libcap-dev
5650
```
5751

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

112107
### To build in Code::Blocks
113108

@@ -155,7 +150,7 @@ If you wish to include [nmos](https://github.com/martim01/nmos) in the applicati
155150
PAM expects a few files to live in a specific directory:
156151
* If it doesn't exist create a directory called __pam__ in your home directory.
157152
* Copy the contents of the __document__ directory to the __pam__ directory.
158-
153+
* If you used CMake to build and install PAM then this will happen automatically
159154

160155
## Prebuilt Images
161156
Links to these can be found [here](https://github.com/martim01/pam/releases) with the associated Releaes

createrelease.py

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import subprocess
2+
3+
def get_git_log(project, commit):
4+
cmd = 'git'
5+
log = 'log'
6+
grep="--grep="
7+
log_format ='--pretty=%s'
8+
9+
10+
11+
output = subprocess.check_output([cmd, log, grep+project+commit, log_format]).decode('utf-8')
12+
lines = output.splitlines()
13+
14+
print(lines)
15+
16+
def get_git_project_log(project):
17+
improvement = "improvement"
18+
feat = "feat"
19+
perf = "perf"
20+
fix = "fix"
21+
22+
get_git_log(project, feat)
23+
get_git_log(project, improvement)
24+
get_git_log(project, perf)
25+
get_git_log(project, fix)
26+
27+
def create_release():
28+
#find all CMakelists.txt files
29+
#get the git log for the project name defined in the file
30+
#add the binary path/name to what our tar list
31+
##
32+
33+
get_git_project_log('')
34+
35+
36+
37+
38+
39+
40+
41+
42+
if __name__ == '__main__':
43+
create_release()

dosetup/CMakeLists.txt

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
2+
project(dosetup LANGUAGES CXX VERSION 1.0.0.0)
3+
4+
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)
5+
6+
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
7+
8+
include_directories("../pambase/")
9+
include_directories(${CMAKE_BINARY_DIR}/include)
10+
11+
link_directories("../lib")
12+
13+
set(SOURCES "main.cpp" "logtofile.cpp" ${CMAKE_BINARY_DIR}/src/${PROJECT_NAME}_version.cpp)
14+
15+
add_executable(dosetup ${SOURCES})
16+
17+
list(APPEND flags "-fPIC" "-Wall" "-fpermissive" "-O3")
18+
target_compile_options(dosetup PRIVATE ${flags})
19+
target_compile_definitions(dosetup PUBLIC NDEBUG DLL_EXPORTS wxUSE_UNICODE __WXGNU__ CREATING_LEVELDLL _app_ _MSL_STDINT_H)
20+
target_link_libraries(dosetup pml_log)
21+
22+
23+
24+
set_property(TARGET dosetup PROPERTY CXX_STANDARD 14)
25+
set_target_properties(dosetup PROPERTIES RUNTIME_OUTPUT_DIRECTORY "../../bin/")
26+
27+
28+
#linux specific
29+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
30+
install(TARGETS dosetup RUNTIME DESTINATION /usr/local/bin)
31+
endif()
32+
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.

manifest_creator/manifest_creator.cbp

-100
This file was deleted.

manifest_creator/manifest_creator.cbp.mak

-58
This file was deleted.

0 commit comments

Comments
 (0)