Commit Graph

5136 Commits

Author SHA1 Message Date
Allan Odgaard
2bc982dfd8 Refactor bin/gen_build 2019-07-16 20:24:07 +02:00
Allan Odgaard
77bc9f7a6f Remove test for localized folder names as it does not work (10.14)
I cannot find any information online about Apple dropping support for this, but I also cannot make it work, and it wouldn’t surprise me if they view localized folder names as a security problem.
2019-07-16 20:02:42 +02:00
Allan Odgaard
b42cbb1f7e No need to explicitly set builddir as it’s already among our variables 2019-07-16 19:42:29 +02:00
Allan Odgaard
4e6e765e5f Update CxxTest 2019-07-16 19:42:29 +02:00
Allan Odgaard
dae1103728 Update LINK declarations 2019-07-16 19:42:29 +02:00
Allan Odgaard
36f414dbea Add missing include in test file 2019-07-16 19:42:20 +02:00
Allan Odgaard
f21d570b73 Remove test for VOL_CAP_INT_EXCHANGEDATA
This is no longer supported (with APFS) so there is no reason to keep this code around.
2019-07-16 14:29:20 +02:00
Allan Odgaard
eb4e0bfcd0 Update tests to reflect how the code works
The “matching pair” move behavior was changed in 7f99c4cbc7
2019-07-16 14:27:28 +02:00
Allan Odgaard
f47a7b5f53 Code to bump date in filename is no longer a testable separate function 2019-07-16 14:24:07 +02:00
Allan Odgaard
c920035f99 Variables from ./configure are now in the “local” (bootstrap) build file
This seems like a logical separation, as the build directory now contains things 100% generated, whereas the “local” build file has variables that came from the original ./configure step and may be edited.
2019-07-16 12:05:11 +02:00
Allan Odgaard
608c53a423 Refactor bin/gen_build 2019-07-16 12:02:16 +02:00
Allan Odgaard
d8fcf27cb5 Fix test for whether or not we have default targets 2019-07-16 11:53:48 +02:00
Allan Odgaard
72bf77c2e5 Handle a failing ‘xcrun altool --notarization-info’ gracefully
We now write the captured output to stderr and retry after 10 seconds.
2019-07-16 09:18:43 +02:00
Allan Odgaard
c4cec82869 Checkin release notes for 2.0-rc.29 v2.0-rc.29 2019-07-16 08:35:13 +02:00
Allan Odgaard
eecfe6e619 Add more debug output for when TextMate is activated via mate
Related to 2ffc74ad8b
2019-07-16 08:33:05 +02:00
Allan Odgaard
ad74df7824 Include explanation in the log message for when a plug-in fails to load
Credit: https://lists.macromates.com/textmate/2019-July/041047.html
2019-07-15 21:41:30 +02:00
Allan Odgaard
b176bf8f9a Use number formatter for count in Find All / Replace All status text
The Find dialog was already using number formatters, but the tool tips shown in the text view (when doing searches or replacements without going through the find dialog) were not.

This makes a difference when the count is > 999, as it will then format the number with thousand separators.
2019-07-14 11:26:31 +02:00
Allan Odgaard
dfd5f85fb5 Remove unnecessary Info.plist file from Find framework 2019-07-14 10:59:30 +02:00
Allan Odgaard
63e82b9bc0 Drop localization support in Find dialog
This was unnecessary indirection as we don’t generally lookup strings for the UI (so TextMate is not actually localizable) and the catalog for the strings we did look up was actually out of date.
2019-07-14 10:57:27 +02:00
Allan Odgaard
6b3c8747e7 Remove unused localization strings 2019-07-14 10:46:31 +02:00
Allan Odgaard
a7542c7ea1 Retain current thread’s run loop 2019-07-13 11:43:24 +02:00
Allan Odgaard
f5d0f38cc7 Don’t update NSUSerDefaults in OakTabBarView’s initialize
The use of an animator proxy is causing the initialize method to be called during animation, and when registering user defaults in initialize, we may trigger key/value observers to be notified, which for this code can result in a crash in OS code with the message: “Trying to recursively lock an os_unfair_lock”.
2019-07-13 11:18:20 +02:00
Allan Odgaard
066e020265 Ensure temporary std::string stays in scope when using its data 2019-07-13 11:02:25 +02:00
Allan Odgaard
027038aaed Checkin release notes for 2.0-rc.28 v2.0-rc.28 2019-07-13 10:21:44 +02:00
Allan Odgaard
57c2e25af1 Update dialog plug-in (Rename symbols for the 10.14 SDK) 2019-07-13 10:20:09 +02:00
Allan Odgaard
2ffc74ad8b Add debug output when TextMate is activated via mate
Some users report a significant delay from executing mate until the TextMate window is brought to front.

The debug information can be extracted by running the following in a terminal:

    log show --predicate 'subsystem = "com.macromates.TextMate" && category = "BringToFront"'

Alternatively use `stream` instead of `log` to get a live stream of debug output.

See `man log` for options such as `--start date/time` (to limit the query to e.g. the last 10 minutes)
2019-07-13 10:20:09 +02:00
Allan Odgaard
72f4b7447e Do not hardcode code signing flags in bin/gen_build 2019-07-13 08:49:45 +02:00
Allan Odgaard
168915307d Assign small icon to sieve scripts (file browser etc.) 2019-07-13 08:23:06 +02:00
Allan Odgaard
087e0ce0a7 Import os/log.h when deployment target is macOS 10.12 or later 2019-07-13 08:22:00 +02:00
Allan Odgaard
ba60e7091d Use flat_map instead of map { … }.flatten 2019-07-10 20:32:40 +02:00
Allan Odgaard
be677cb0b4 Checkin release notes for 2.0-rc.27 v2.0-rc.27 2019-07-08 13:10:18 +02:00
Allan Odgaard
a9b5925f57 Saving a file would lose existing file permission flags 2019-07-08 13:07:28 +02:00
Allan Odgaard
f36efa747e Prefix variables related to notarization rules with notarize 2019-07-08 13:04:32 +02:00
Allan Odgaard
74029c7584 Use ‘bash -c’ when calling openssl
This is to provide more flexibility when providing the private key.

It would be preferably to allow setting the shell (globally) but such feature was not desired by the maintainer of ninja: https://github.com/ninja-build/ninja/pull/827
2019-07-08 13:04:32 +02:00
Allan Odgaard
7f703d2953 Add ninja rule for pushing the git release tag 2019-07-08 13:04:32 +02:00
Elia Schito
e9033911f0 Fix the background-size of the about window
Using background-size: 50% results in really bad scrolling performance and 
doesn't not achieve the effect of scaling the image to double the pixel density,
it rather sets the image width to 50% of the element.

Using the non-retina image size solves both the problems.

A similar issue was found in this SO page: https://stackoverflow.com/a/7034772
2019-07-08 13:04:32 +02:00
Allan Odgaard
7f9f295870 Checkin release notes for 2.0-rc.26 v2.0-rc.26 2019-07-08 07:35:33 +02:00
Allan Odgaard
58414e9def Resolve potential symbolic link in path to save
Trying to save a file as /path/to/symlink will fail with “file does not exist” using the new NSFileManager API, even when the symbolic link does point to an existing file.
2019-07-08 07:27:36 +02:00
Allan Odgaard
9cc10e7b72 Checkin release notes for 2.0-rc.25 v2.0-rc.25 2019-07-07 23:11:52 +02:00
Allan Odgaard
824981eaa2 Produce error string for any failure from saving with NSFileManager 2019-07-07 22:10:11 +02:00
Allan Odgaard
3f8c2d0bbd No need for visibility setting when all objects are linked together
I’m keeping it in the sources though as it provides semantic value and may be required if the build system is updated, e.g. we may want to create static libraries for some targets and would thus need to know which symbols to export.
2019-07-07 20:52:50 +02:00
Allan Odgaard
116e5e9a6c Check that build files do not reference unknown targets 2019-07-07 20:52:50 +02:00
Allan Odgaard
a1c969174a Instructions for creating a combined include directory
This is to allow finding TextMate’s include files when using Quick Open (⇧⌘D) or completion (escape) in include/import lines.
2019-07-07 20:52:50 +02:00
Allan Odgaard
423e8e9a43 Allow disabling atomic save via .tm_properties
This is done by setting `atomicSave` to one of the following values:

    always           Always use atomic saving (default)
    externalVolumes  Use for non-internal volumes (e.g. USB drives)
    remoteVolumes    Use for non-local volumes (e.g. network mounts)
    never            Never use atomic saving
    legacy           Always enabled, but do not use NSFileManager

Setting it to `externalVolumes` also includes `remoteVolumes`.
2019-07-07 20:52:50 +02:00
Allan Odgaard
538283cc67 Use NSFileManager’s replaceItemAtURL:… as default way to save atomically
NSFileManager’s approach is inferior to exchangedata(), but as this feature is no longer supported with Apple’s default file system (APFS), there is little reason to maintain our own implementation of the fallback code required when we cannot use exchangedata(), especially as the OS know more about file references (aliases), metadata, and other stuff that should be preserved when writing a new (replacement) file.

In theory the NSFileManager strategy can fail to create the temporary destination, in which case we will pass NULL to open() and crash.

Will fix this in a later commit.
2019-07-07 20:52:50 +02:00
Allan Odgaard
8f3f3d9d16 Update deployment version for xibs to 10.12
This was done using search and replace. Presumably it should be done in Xcode so that it can adjust the xib for the new deployment target, otherwise what is the point of storing deployment version in the xib and provide it as a command line argument to the xib compiler as well (only to get a warning if the versions do not match)?
2019-07-07 18:03:30 +02:00
Allan Odgaard
63724e67a4 Bump required OS version to 10.12
This is so that we can use the new logging infrastructure.
2019-07-07 17:57:50 +02:00
Allan Odgaard
997e70059a Switch to Objective-C for the implementation of atomic saving
The most appropriate API for dealing with temporary files and atomic saving seems to be NSFileManager.
2019-07-07 11:37:59 +02:00
Allan Odgaard
4c4822e1ca Make it easier to change (atomic) saving strategy
The intermediate_t type now wraps the actual saving strategy to make it easier to change strategy based on the destination file system, user preferences, or other factors.
2019-07-07 11:12:16 +02:00
Allan Odgaard
ba43f2ec5e The $1-n variables in nested replacements weren’t cleared properly
When searching for a regular expression with captures, we have $1-n available in the replacement (format) string.

If this format string does further replacements with optional captures (e.g. /^(_)?foo/) then $1 would be inherited from the parent match, when the optional capture did not match anything.

This bug was introduced in 0b1496011f.
2019-07-06 19:35:51 +02:00