Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make app bundle ? #5

Closed
freebrowser1 opened this issue Sep 28, 2021 · 12 comments
Closed

How to make app bundle ? #5

freebrowser1 opened this issue Sep 28, 2021 · 12 comments

Comments

@freebrowser1
Copy link

The install page tells:

Simply clone, open and build this project in XCode.
Like upstream XCode will first build the AutoRaise binary by running

g++ -O2 -Wall -fobjc-arc -o AutoRaise AutoRaise.mm -framework AppKit

and include it when finally building the Launcher app bundle (AutoRaise.app).
To install copy AutoRaise.app into the /Applications folder and/or the AutoRaise binary to e.g. /usr/local/bin .

But when I run the compile command, no Autoraise.app bundle is created. How can I create it ?
I have macOS BigSur 10.16.5 and Xcode 12.5.

@lhaeger
Copy link
Owner

lhaeger commented Oct 29, 2021

Sorry, can't say if/how it works on Big Sur. I'm still on Catalina (and probably stay there until Apple comes back with a professional macOS version instead of the current iPad/Candy/Arcade design) where it works as described in the readme.
Did you check the logs for any hint of what exactly is not working?

@freebrowser1
Copy link
Author

This is what it mentions:
The difference between Catalina and Big Sur is minimal under the hood. It is mainly, what you say, fancy eyecandy design. The same applies to Monterey (which I have now).

klaaspc:~/scratch/AutoRaise-launcher-v2.1.0 % g++ -O2 -Wall -fobjc-arc -o AutoRaise AutoRaise.mm -framework AppKit
AutoRaise.mm:58:22: warning: 'GetProcessForPID' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
OSStatus error = GetProcessForPID(pid, &process);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:930:1: note: 'GetProcessForPID' has been explicitly marked deprecated here
GetProcessForPID(
^
AutoRaise.mm:59:19: warning: 'SetFrontProcessWithOptions' is deprecated: first deprecated in macOS 10.9 [-Wdeprecated-declarations]
if (!error) { SetFrontProcessWithOptions(&process, kSetFrontProcessFrontWindowOnly); }
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks/HIServices.framework/Headers/Processes.h:658:1: note: 'SetFrontProcessWithOptions' has been explicitly marked deprecated here
SetFrontProcessWithOptions(
^
2 warnings generated.

@lhaeger
Copy link
Owner

lhaeger commented Dec 2, 2021

You may want to try again with the update v2.5 code from upstream now integrated here as well.

@freebrowser1
Copy link
Author

I tried it again with the original 2.1 zip and the updated Autoraise.mm.

g++ -O2 -Wall -fobjc-arc -o AutoRaise AutoRaise.mm -framework AppKit

Now no errors appeared. But no .app bundle is made yet.

@lhaeger
Copy link
Owner

lhaeger commented Dec 4, 2021

To build an app bundle, you need to open the xcode project in the launcher subfolder and build it in xcode. The gcc command only builds the CLI application from upstream, not the menu bar app.
I had hoped to explain that well enough in the readme: "Simply clone, open and build this project in XCode."

@freebrowser1
Copy link
Author

There are no instructions. I find some files in Launcher, I guessed and tried the .swift file and that opened Xcode, but how can I make the bundle ?

@lhaeger
Copy link
Owner

lhaeger commented Dec 6, 2021

Yes, I assumed "open in Xcode" and "build in Xcode" would be sufficient and did not explain how to operate XCode, there are some good tutorials out there, already :-)

Off the top of my head:

  • Launch XCode
  • open the project via "CMD-O" or File>Open
  • use the "Build" menu item to build it
  • In the Project Explorer view on the left, you'll see the app bundle. Right-click on it and choose "View in Finder"

@freebrowser1
Copy link
Author

I tried with xcode, but an app bundle is not made.
Can you publish an app bundle on Github ? Most developers do that, a ready to use app.

@lhaeger
Copy link
Owner

lhaeger commented Dec 8, 2021

I do not have a developer account with Apple, therefore cannot sign app bundles for use by others, sorry.

@lhaeger lhaeger closed this as completed Dec 8, 2021
@freebrowser1
Copy link
Author

Signing is not needed for macOS apps (unlike iOS apps), the user should just once notarize it, no developer account needed.

@lhaeger
Copy link
Owner

lhaeger commented Dec 8, 2021

Well, then try how far you get with https://github.com/lhaeger/AutoRaise/releases/tag/launcher-v2.5.0

@freebrowser1
Copy link
Author

This bundle does not show any output at all, and also nothing in the menu bar, it appears to be a dummy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants