mirror of
https://github.com/skidoodle/ctx.git
synced 2026-04-28 19:27:41 +02:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
4453856fd1
|
|||
|
bd22ad5500
|
@@ -22,6 +22,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: stable
|
go-version: stable
|
||||||
|
|
||||||
|
- name: Quick Sanity Check
|
||||||
|
shell: bash
|
||||||
|
run: go test -v ./...
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v6
|
uses: goreleaser/goreleaser-action@v6
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -43,10 +43,11 @@ jobs:
|
|||||||
if: matrix.os == 'windows-latest'
|
if: matrix.os == 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
./ctx.exe .
|
./ctx.exe .
|
||||||
$files = Get-Clipboard -Format FileDropList
|
Add-Type -AssemblyName System.Windows.Forms
|
||||||
if ($files) {
|
$files = [System.Windows.Forms.Clipboard]::GetFileDropList()
|
||||||
Write-Host "Clipboard contains: $files"
|
if ($files.Contains("$PWD\ctx.txt")) {
|
||||||
if ($files.Name -contains "ctx.txt") { exit 0 }
|
Write-Host "Success: Clipboard contains ctx.txt"
|
||||||
|
exit 0
|
||||||
}
|
}
|
||||||
Write-Error "Clipboard did not contain ctx.txt"
|
Write-Error "Clipboard did not contain ctx.txt. Found: $files"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
+5
-2
@@ -13,10 +13,13 @@ int copyFileToPasteboard(char* path) {
|
|||||||
NSString *strPath = [NSString stringWithUTF8String:path];
|
NSString *strPath = [NSString stringWithUTF8String:path];
|
||||||
if (!strPath) return 0;
|
if (!strPath) return 0;
|
||||||
|
|
||||||
|
NSURL *url = [NSURL fileURLWithPath:strPath];
|
||||||
|
if (!url) return 0;
|
||||||
|
|
||||||
NSPasteboard *pb = [NSPasteboard generalPasteboard];
|
NSPasteboard *pb = [NSPasteboard generalPasteboard];
|
||||||
[pb clearContents];
|
[pb clearContents];
|
||||||
[pb declareTypes:@[NSFilenamesPboardType] owner:nil];
|
|
||||||
return [pb setPropertyList:@[strPath] forType:NSFilenamesPboardType] ? 1 : 0;
|
return [pb writeObjects:@[url]] ? 1 : 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user