5625 Commits

Author SHA1 Message Date
Allan Odgaard
1477e0f5a8 Checkin release notes for 2.0.17 v2.0.17 2021-02-05 08:02:03 +01:00
Allan Odgaard
b9abd14e3c Checkin release notes for 2.0.16 v2.0.16 2021-02-04 22:33:04 +01:00
Allan Odgaard
f74aa3fde8 Fix truncated text in tool tips using Dark Mode on macOS 10.15
We add a border to the NSTextField in Dark Mode to match the system tool tips, but it appears that the frame returned by “fittingSize” does not take that into account, so it returns a frame 1-2 points too small to fit the text, resulting in the last line missing.

This appears to be a fairly new problem, so might depend on the SDK that we link with.
2021-02-04 22:33:04 +01:00
Allan Odgaard
5a9fc8d20c Only use atomic save for remote volumes (by default)
APFS does not support exchangedata(2) meaning that atomic save has to be done using a rename.

This means that the inode is not preserved and the date of the file’s directory is updated.

There are some disadvantages to this, and I have been running with atomic saving disabled shortly after switching to APFS, so I believe it is best to make this the default behavior.
2021-02-04 22:10:26 +01:00
Allan Odgaard
7e69f5bb2c Fix compiler warnings by initializing struct members in correct order 2021-02-04 09:35:27 +01:00
Allan Odgaard
4972c104d1 Use ${YEAR} variable in NewApplication template’s InfoPlist.strings 2021-02-04 09:35:27 +01:00
Allan Odgaard
a02b95ce7b Use public modifier when logging exception name/reason 2021-02-04 09:35:27 +01:00
Allan Odgaard
9393ef61b5 The encoding pop-up button could create an NSMenuItem with nil as title
This would happen when the encoding property was nil (no selection).

Reworked code slightly while also fixing this issue.
2021-02-04 09:35:27 +01:00
Allan Odgaard
fa2077b3c8 Remove non-matching tests/resources definitions from build files
The resources directory was removed when we introduced CP_InfoPlist. The tests were removed in fcee7b38ab.
2021-02-04 09:35:27 +01:00
Allan Odgaard
4d1aa7cba8 Define missing BSTR macro in test source 2021-02-04 09:35:27 +01:00
Allan Odgaard
0e27430e24 Remove “GetoptLong” usage comment in ruby scripts
This was used by GetoptLong but we switched to OptionParser in 2df7620b8d.

Also remove setting $KCODE (for ruby 1.8 compatibility).
2021-02-04 09:35:27 +01:00
Allan Odgaard
03f8939ae9 Remove DefaultBundles.tbz from git ignore file
This file is no longer built in the source directory.
2021-02-04 09:35:27 +01:00
Allan Odgaard
ba1c99f7bc build: Introduce CP_InfoPlist and move Info.plist files out of resources
Previously we would automatically pick up an Info.plist file copied using any of the CP_* keys, and both move it to the correct location (when belonging to target built) or ignore it, if we were copying it from an imported target.

To simplify the logic in the build system, it is however better to be explicit about this, also because we could actually want an Info.plist file among our copied files.
2021-01-24 10:38:54 +01:00
Allan Odgaard
8e6c60d013 build: Remove Info.plist files from frameworks
These were previously required when we built frameworks as dynamically linked, but the files are now explicitly ignored by our build system.
2021-01-24 10:37:22 +01:00
Allan Odgaard
edec8f1c67 Merge Info.plist and InfoPlist.strings variable expansion build rules 2021-01-24 09:33:57 +01:00
Allan Odgaard
5d77c2ad6a Call expand_variables with -o instead of redirecting stdout
The advantage is that using -o we do not need to write to a temporary file and then only if expand_variables exits successfully, overwrite output with temporary file.

This is only possible because we know that expand_variables does not touch the output file unless it succeeds. Updating the output file and failing would cause a rebuild to continue, as if the output had been successfully built.
2021-01-24 09:33:57 +01:00
Allan Odgaard
a482cd71af Add -o,--output option to bin/expand_variables 2021-01-24 09:33:57 +01:00
Allan Odgaard
bf19be721d fixup! Rename process_plist as it makes no assumption about input format 2021-01-24 09:33:57 +01:00
Ronald Wampler
5168278b2a Set Preferences window toolbar style to NSWindowToolbarStylePreference
This is necessary when linking with the macOS 11.0 SDK.
2021-01-17 14:11:41 +01:00
Allan Odgaard
88481bdd12 Add NSWindow’s new toolbarStyle property to sdk-compat.h 2021-01-17 14:09:53 +01:00
Allan Odgaard
b42bbfc5fe Organize the sdk-compat.h file 2021-01-17 14:09:53 +01:00
Allan Odgaard
bbb16f5a99 Update dialog plug-ins (NSHumanReadableCopyright in InfoPlist.strings) 2021-01-17 14:06:36 +01:00
Allan Odgaard
6d188e41e5 build: Bump file date after copying file to build directory
Using /bin/cp with -p (preserve) appears to round down the modification date, so we can end up with a file in the build directory that appears older than the source.

We also remove -R since this command is never used with directories.
2021-01-17 14:06:36 +01:00
Allan Odgaard
978c5a32a2 build: Expand variables in InfoPlist.strings files
We previously did this for InfoPlist.vstrings files, but the changed extension was only a temporary workaround for not allowing multiple filters to run on a build input.
2021-01-17 14:06:36 +01:00
Allan Odgaard
918c4f3bb2 Make bin/expand_variables work with UTF-8/16BE/16LE
This is because we may want to use it with strings files, which must be in UTF-16 encoding.
2021-01-17 14:06:36 +01:00
Allan Odgaard
22918c50ef build: Do not disable filters after first “generator”
Previously we would only allow a filter when going from source to build directory, since the output base name is unchanged for a filter’s output, and would thus cause multiple targets with same output name.

Since we now add the generator’s name to the output path, this is no longer a problem.
2021-01-17 14:06:36 +01:00
Allan Odgaard
a8a84d394a build: Add “generator” name to output path when extension is unchanged
For example we have a “generator” that ensures our *.strings files are UTF-16, if this is applied to files already in the build directory, the output will now include the generator’s class name, to ensure we do not create a target with identical input and output paths.
2021-01-17 14:06:36 +01:00
Allan Odgaard
a55e557ae1 build: Catch exception raised when failing to delete old target
This can happen if the target is a directory, which should only be possible with the “tbz.bl” generator.
2021-01-17 14:06:36 +01:00
Allan Odgaard
6b6ff32e99 Avoid compiler warning by typecasting anonymous enum
The warning only appears when the anonymous enum is used in a conditional, hence why we do not need this change for all calls to NSFileTypeForHFSTypeCode.
2021-01-17 14:06:36 +01:00
Allan Odgaard
4606fdefff Create default bundles archive in ninja file and store in build dir
Previously we would download and archive the default bundles as part of ./configure and place the result in our source directory, this however both pollutes the source directory with generated files, but also had the ./configure step actually do a partial build, since we need to build the ‘bl’ executable to download bundles.
2021-01-16 19:14:22 +01:00
Michael Sheets
c90a9bb329 Prevent UTTypeConformsTo self-reference
Prevent public.shell-script from conforming to itself creating a loop, should conform to public.script.

Reported by Thomas Tempelmann.
2021-01-16 09:49:53 -06:00
Allan Odgaard
a7406b832d Use tertiary label color for shortcuts and tab triggers on macOS 10.16
For bundle items we have to decorate the menu items ourselves with shortcut keys and tab triggers, which were previously rendered with the system text color, but starting with Big Sur, it appears to use the tertiary label color, which we now match.
2021-01-15 16:03:03 +01:00
Allan Odgaard
4468362b40 Add leading/trailing padding for the save dialog’s encoding options
On Big Sur, using the compact view, these would extend to the left/right borders of the sheet.
2021-01-15 16:03:03 +01:00
Allan Odgaard
eb59a21ccd Do not set NSWindowStyleMaskFullSizeContentView for clipboard history
Setting this flag means the content view spans the full window size, thus is rendered “behind” the window chrome, which is how we have designed these windows, which hold a scroll view as the main content.

However, starting with macOS 10.16 (Big Sur) the scroll view doesn’t automatically set the top inset to adjust for the title bar (and auxiliary view), at least it has not yet been set, when we adjust the bottom inset, and disable further (automatic) changes of the scroll view insets.

By not setting the full size flag, the content view’s size is limited to the “visible are” of the window, but there seems to be some special detection of full size scroll views, so this one still gets the “full size” effect with content behind window chrome.
2021-01-15 16:03:03 +01:00
Allan Odgaard
c0a211582d Remove mercurial build dependency
This is only for running the SCM tests, which we currently omit.
2021-01-13 22:59:11 +01:00
Allan Odgaard
bc6623154a Remove stuff about libressl from README
We removed the libressl dependency in e06109a3b5.
2021-01-13 22:59:11 +01:00
Allan Odgaard
bcd44a8d14 Ensure we are running on the main thread when updating property
Since we bind the disabled state of the “Check Now” button (in preferences) to this property, we cannot update the property in a background thread, as the UI can only be updated from the main thread.
2021-01-13 22:59:11 +01:00
Allan Odgaard
8ed4b43b63 Remove “Add License” button from window chrome 2021-01-13 22:59:11 +01:00
Allan Odgaard
b24eea89a5 Introduce ${YEAR} variable in our InfoPlist.strings
This saves us from having to update the copyright each year.
2021-01-12 10:43:53 +01:00
Allan Odgaard
05ab01e857 Add build rule that expands variables in InfoPlist.vstrings files
The extension is converted to from ‘vstrings’ to ‘strings’ and it is saved as UTF-16. Ideally this would not introduce a new extension (and rely on the existing ‘strings’ filter to convert to UTF-16), but see previous commit for the technical limitation preventing this.

TARGET_NAME and YEAR are predefined variables.
2021-01-12 10:43:53 +01:00
Allan Odgaard
ae9bdf5d7b Rename process_plist as it makes no assumption about input format 2021-01-12 10:43:53 +01:00
Allan Odgaard
2c6a825a95 Fix usage summary for process_plist
Old text looks like copy/paste from somewhere else.
2021-01-12 10:43:53 +01:00
Allan Odgaard
4e922dde99 Disable transformations with unchanged paths for assets in build dir
This relates to the build system: Transformations that does not change file name are called filters, this could e.g. be converting UTF-8 to UTF-16 or converting a property list to binary representation (without changing extension).

This currently works when the filter is applied to a file in the source directory, as we write the result to the build directory, but if the input is already in the build directory, we would create a new output with the same path, which would result in a malformed build file (multiple targets generate the same file and/or cycles in the dependency graph).

As a workaround, we only allow filters to be applied to files in the source directory. But it would be nice to lift this limitation.
2021-01-12 10:43:53 +01:00
Allan Odgaard
418de67329 Update dialog plug-ins (class property dot notation) 2021-01-12 10:43:53 +01:00
Allan Odgaard
937b6e0401 Use single quotes when using ‘notarize_pass’ and ‘notarize_user’
These variables are passed as arguments to commands that go through a shell interpreter, therefore spaces would be a problem.

Previously we expected the variables themselves to include proper escaping (or quotes), but that is problematic if they are set in build.ninja, as we recreate this file via a rule that passes all variables as arguments, and this rule already uses single quotes for escaping, so it would cause a problem, if the variables contains single quotes.
2021-01-11 16:19:02 +01:00
Allan Odgaard
53897ce4d5 Improve “estimated time remaining” code for software update
Use int64_t instead of NSUInteger, check against NSURLSessionTransferSizeUnknown, and ensure that completedUnitCount is the last thing we set on the NSProgress object, so that there is no potential race condition with a progress object being completed, but still having a non-zero estimated time remaining value.
2021-01-11 12:09:02 +01:00
Allan Odgaard
f032db7aeb Set lineBreakMode for text fields in OakChooser windows
We already setup proper line break mode for the strings displayed (via paragraph attributes), but having good defaults makes sense, so subclasses can forego setting it.
2020-12-29 15:57:09 +01:00
Allan Odgaard
2c528c31f3 Do not use ‘new metadata only’ option with replaceItemAtURL:…
We want to preserve the existing file’s metadata, although we manually take steps to do so, but no reason to disable the system’s functionality for this.
2020-12-29 15:57:09 +01:00
Ronald Wampler
a52383a099 Set the frame size via NSTitlebarAccessoryViewController's view property
When linking against the macos 11.0 SDK, the view size fails to update.
2020-12-29 15:57:09 +01:00
Jordan Rose
ea09ac026b Add "Close Tabs to the Left" as alternate of "Close Tabs to the Right"
This is useful when working with one set of files in a project, then moving to another set without closing the original set first.

Alternate menu items are pretty subtle, but there are already a lot of ways to close tabs, and I didn't want to clutter the menu further.
2020-12-29 15:57:09 +01:00