updated build system
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				BlockStorage/repertory/pipeline/head This commit looks good
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	BlockStorage/repertory/pipeline/head This commit looks good
				
			This commit is contained in:
		| @@ -40,6 +40,27 @@ struct autostart_cfg final { | ||||
| }; | ||||
| #endif // defined(__linux__) | ||||
|  | ||||
| #if defined(__APPLE__) | ||||
| enum class launchctl_type : std::uint8_t { | ||||
|   bootout, | ||||
|   bootstrap, | ||||
|   kickstart, | ||||
| }; | ||||
|  | ||||
| #if defined(PROJECT_ENABLE_PUGIXML) | ||||
| struct plist_cfg final { | ||||
|   std::vector<std::string> args; | ||||
|   bool keep_alive{false}; | ||||
|   std::string label; | ||||
|   std::string plist_path; | ||||
|   bool run_at_load{false}; | ||||
|   std::string stderr_log{"/tmp/stderr.log"}; | ||||
|   std::string stdout_log{"/tmp/stdout.log"}; | ||||
|   std::string working_dir{"/tmp"}; | ||||
| }; | ||||
| #endif // defined(PROJECT_ENABLE_PUGIXML) | ||||
| #endif // defined(__APPLE__) | ||||
|  | ||||
| using passwd_callback_t = std::function<void(struct passwd *pass)>; | ||||
|  | ||||
| #if defined(__APPLE__) | ||||
| @@ -71,6 +92,17 @@ void set_last_error_code(int error_code); | ||||
| [[nodiscard]] auto remove_autostart_entry(std::string_view name) -> bool; | ||||
| #endif // defined(__linux__) | ||||
|  | ||||
| #if defined(__APPLE__) | ||||
| #if defined(PROJECT_ENABLE_PUGIXML) | ||||
| [[nodiscard]] auto generate_launchd_plist(const plist_cfg &cfg, | ||||
|                                           bool overwrite_existing = true) | ||||
|     -> bool; | ||||
| #endif // defined(PROJECT_ENABLE_PUGIXML) | ||||
|  | ||||
| [[nodiscard]] auto launchctl_command(std::string_view label, | ||||
|                                      launchctl_type type) -> int; | ||||
| #endif // defined(__APPLE__) | ||||
|  | ||||
| // template implementations | ||||
| #if defined(__APPLE__) | ||||
| template <typename thread_t> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user