This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # use argument 1 as the version or get it from sw_vers | |
| os_ver=${1-:$(sw_vers -productVersion)} | |
| # string comparison | |
| if [[ "$os_ver" == 10.13.* ]]; then | |
| echo "macOS High Sierra" | |
| elif [[ "$os_ver" == 10.12.* ]]; then | |
| echo "macOS Sierra" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <windows.h> | |
| #include <shobjidl.h> | |
| #include <stdio.h> | |
| void test_ifiledialog() | |
| { | |
| HRESULT hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | | |
| COINIT_DISABLE_OLE1DDE); | |
| if (SUCCEEDED(hr)) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "stdafx.h" | |
| #include <windows.h> | |
| #include <Winbase.h> | |
| #include <Wtsapi32.h> | |
| #include <Userenv.h> | |
| #include <malloc.h> | |
| #pragma comment(lib, "Wtsapi32.lib") | |
| #pragma comment(lib, "Userenv.lib") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # appify — create the simplest possible Mac app from a shell script | |
| # | |
| # v5.0.0 | |
| # | |
| # Copyright (c) Thomas Aylott <http://subtlegradient.com/> | |
| # Modified by Mathias Bynens <http://mathiasbynens.be/> | |
| # Modified by Andrew Dvorak <http://OhReally.net/> | |
| # Rewritten by Duncan McGreggor <http://github.com/oubiwann/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <mach-o/dyld.h> | |
| #include <mach-o/nlist.h> | |
| #include <mach-o/dyld_images.h> | |
| #include <mach/mach_vm.h> | |
| /* Dyld is the OSX Dynamic Linker | |
| * /usr/include//mach-o/loader.h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| protocol CommandExecuting { | |
| func run(commandName: String, arguments: [String]) throws -> String | |
| } | |
| enum BashError: Error { | |
| case commandNotFound(name: String) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); | |
| begin | |
| // warn the user, that his working folder is going to be deleted and projects might get lost | |
| if (CurUninstallStep = usUninstall) then begin | |
| if MsgBox('***WARNING***'#13#10#13#10 + | |
| 'The installation folder is [ '+ ExpandConstant('{app}') +' ].'#13#10 + | |
| 'You are about to delete this folder and all its subfolders,'#13#10 + | |
| 'including [ '+ ExpandConstant('{app}') +'\important_projects_folder ], which may contain your projects.'#13#10#13#10 + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MIT License | |
| Copyright (c) 2018 Oleg Yamnikov | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NSWindow *topmostAppWindowAtPoint(CGPoint screenPoint) | |
| { | |
| const CGWindowLevel kScreensaverWindowLevel = CGWindowLevelForKey(kCGScreenSaverWindowLevelKey); | |
| /* This function returns a pointer to the app's topmost NSWindow that | |
| the point `screenPoint` is over. The important distinction here is that | |
| this function takes _all_ system windows into consideration and will return | |
| `nil` if there is a system window (or NSMenu etc.) that the cursor | |
| is over which is atop the app window, which is information that | |
| can't otherwise be gleaned by checking against `[NSApp orderedWindows]` etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| Unzip Helper for executing 7zip without blocking the InnoSetup GUI | |
| ---- | |
| The main procedure is the non-blocking Unzip(). | |
| Your GUI will remain responsive during the unzip operation. | |
| Written by Rik and Jens A. Koch (@jakoch) on StackOverflow: | |
| http://stackoverflow.com/questions/32256432/how-to-execute-7zip-without-blocking-the-innosetup-ui |