For development a app bundle is not needed. The app bundle is only
needed for distribution and macdeployqt takes a lot of time.
Signed-off-by: Felix Weilbach <felix.weilbach@nextcloud.com>
cmake/modules/ECMAddAppIcon.cmake is heavily patched to support sidebar icons, OUTFILE_BASE parameter and to not include 64 and 64@2x icons on macOS which are not supported. All changes are made in a way that we can upstream this.
Having to update the plugins to add a submenu in the context menu,
it's more cost-effective to remove support for legacy macOS versions
than implementing and testing this setup.
The SocketAPI now only sends status pushes for paths requested by the
shell. We have to make sure that Finder doesn't just show the entry
from its cache after a reconnect.
Tell cmake not to escape shell strings adding backslashes before
spaces by passing the VERBATIM optiton. Also add the quotes to
whole command line arguments to prevent quotes from appearing on the
XCode side, because of the VERBATIM option.
This only affects themed clients since the default theme doesn't
have space in its APPLICATION_NAME.
OwnCloudFinderRequestManager::_shareMenuTitle was not retained anymore
after the FinderSync refactoring which would cause it to contain any
kind of garbage value for some reason.
Fix the issue by also enabling ARC for RequestManager.m.
We can't enable ARC for the whole project since Finder.h is included
by many .m files and it's not trivial to port to ARC.
Now that the client is pushing all changes of state, we don't need
to track the requested URLs anymore and risk that the way that we
reseted that list could leave a few entries in Finder's cache outdated.
We can remove the same code from other platforms in a later release,
a bit earlier than a week before beta1.
This allows developers to build and run the extension by default.
Official packages bundles will be re-signed after the build, we
The SocketApi prefix can be set at configure time through cmake and
should match the key that will be used to sign the whole .app bundle
(including the embedded FindexSync .appex bundle).
Since we use that class to lookup the NSBundle using bundleForClass
use a more specific name to avoid any clash with any othe liferay
extension. I couldn't figure out from the documentation if that is
only resolved using the class name, but found some warnings on
stackoverflow and better be safe than sorry for what it costs.
It was only used on OS X and couldn't be used by the FinderSync
extension since that one runs in a sandbox. So use the same system
to load images in the legacy extension by shipping them in the
extension bundle instead of the owncloud.app bundle.
This is also given that the legacy extension needs padded icons
while the FinderSync one needs unpadded icons.
The archive buildaction causes this. Use the default build while
forcing the Release configuration instead.
In both cases the result will end up in SYMROOT.
This uses the new official API to show overlay icons and add our
custom context menu entry instead of hooking directly into the
Finder process and intercept drawind routines.
A dummy desktopclient target is also in the project to allow debugging
directly in Xcode while the official client can be started from the
command line. Otherwise Xcode won't allow attaching to the debugee.
Dummy icon files have been added while we get proper icon produced.
We can't use the old icons since what we use for the legacy shell
integration is already padded according to where the badge should
appear on the full icon.
This prepares the switch to the official FinderSync API on Yosemite
which requires the extension to run in a sandbox. This complicates
the usage of a local socket to communicate with a non-sandboxed GUI
client. An NSConnection is easier to use in this case, which we can
use as long as the server name (i.e. Mach port registered name) is
prefixed with the code signing Team Identifier.
A placeholder server implementation is also added to the client's
SocketApi which basically reproduces the interface of a QLocalSocket.
Most of the references to individual sockets we're only using
QIODevice methods so the type was simply reduced. A typedef to
replace the QLocalServer was the only other part needed.
Do not request the status of all entries in the cache. Instead force Finder
to request the ones that it deems necessary by keeping the old statuses
in a separate dictionary which are only used while the new status arrives.
removeIcons isn't called and clearFileNameCacheForPath was always
called with a "nil" path.
Remove the return value of askForIcon which was always 0, and use
that value explicitly at the only call site.
Remove the "-1" code path in iconByPath since setIcons prevents
-1 from getting into _fileNamesCache in all cases.
By enabling ARC for GCDAsyncSocket (as we should have done before
https://github.com/robbiehanson/CocoaAsyncSocket/wiki/ARC) there
is no chance anymore for a situation where the to-be-written NSData*
is deleted before the socket has had a chance to write it.
Interestingly, this only happened after switching to local sockets,
probably because of how immediatly the NSData* would be sent.
This commit also keeps the debug symbols for the Finder plugin.
The client (in this case mirall) tells the Finder plugin where to get the icons.
This enables installation in different locations and in branded clients.
Re-retrieve all icons for a path in case we receive UPDATE_VIEW.
(But in contrast to previous code, don't delete the icons which then
would have caused screen flickering)
With UPDATE_VIEW the plugin gets notified to update the overlays.
It invalidates the entries in the file icon cache for the path
that comes with the UPDATE_VIEW and than refreshes the view.