this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Begin work on open command

Issue #425

+46
+1
src/tools/CMakeLists.txt
··· 3 3 add_darling_executable(sw_vers sw_vers.c) 4 4 add_darling_executable(sudo sudo.c) 5 5 add_darling_executable(codesign codesign.c) 6 + #add_darling_executable(open open.c) 6 7 7 8 install(TARGETS sw_vers sudo codesign DESTINATION libexec/darling/usr/bin) 8 9 target_link_libraries(sw_vers CoreFoundation)
+45
src/tools/open.c
··· 1 + /* 2 + This file is part of Darling. 3 + 4 + Copyright (C) 2019 Lubos Dolezel 5 + 6 + Darling is free software: you can redistribute it and/or modify 7 + it under the terms of the GNU General Public License as published by 8 + the Free Software Foundation, either version 3 of the License, or 9 + (at your option) any later version. 10 + 11 + Darling is distributed in the hope that it will be useful, 12 + but WITHOUT ANY WARRANTY; without even the implied warranty of 13 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 + GNU General Public License for more details. 15 + 16 + You should have received a copy of the GNU General Public License 17 + along with Darling. If not, see <http://www.gnu.org/licenses/>. 18 + */ 19 + 20 + #include <stdio.h> 21 + #include <CoreFoundation/CoreFoundation.h> 22 + #include <ApplicationServices/ApplicationServices.h> 23 + 24 + void usage(void); 25 + 26 + int main(int argc, char *argv[]) 27 + { 28 + if (argc < 0) 29 + { 30 + usage(); 31 + return 1; 32 + } 33 + CFStringRef str = CFStringCreateWithCString(kCFAllocatorDefault, argv[1], kCFStringEncodingMacRoman); 34 + CFURLRef url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, str, kCFURLPOSIXPathStyle, FALSE); 35 + 36 + 37 + 38 + return 0; 39 + } 40 + 41 + void usage(void) 42 + { 43 + printf("Usage: open [filenames]\n" 44 + "Help: Use open to open files, folders, and URLs from the command line.\n"); 45 + }