mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-30 01:02:29 +00:00
python-3.6.zip added from Github
README.cosmo contains the necessary links.
This commit is contained in:
parent
75fc601ff5
commit
0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions
26
third_party/python/Mac/BuildScript/seticon.m
vendored
Normal file
26
third_party/python/Mac/BuildScript/seticon.m
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Simple tool for setting an icon on a file.
|
||||
*/
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc != 3) {
|
||||
fprintf(stderr, "Usage: seticon ICON TARGET");
|
||||
return 1;
|
||||
}
|
||||
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
NSString* iconPath = [NSString stringWithUTF8String:argv[1]];
|
||||
NSString* filePath = [NSString stringWithUTF8String:argv[2]];
|
||||
|
||||
[NSApplication sharedApplication];
|
||||
|
||||
[[NSWorkspace sharedWorkspace]
|
||||
setIcon: [[NSImage alloc] initWithContentsOfFile: iconPath]
|
||||
forFile: filePath
|
||||
options: 0];
|
||||
[pool release];
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue