Closed curtisblackwell closed 8 years ago
@curtisblackwell I don’t have a mac because of poverty... So sorry I cannot maintain Homebrew packages. I’ve suggested this to @schriftgestalt, or you can maintain one :)
I'd be willing to help out with that if I was able to figure out how to get this running. I can't seem to get premake5 working in order to build.
@curtisblackwell It is simple:
dep/bin-osx/
.premake5 xcode4
So my reason for using otfcc is to customize Iosevka, which requires that everything be runnable via my command line. The problem was that I was trying to put things in the wrong directory on Friday.
I'll look into what it takes to set up a homebrew package later.
I usually do this to build the two otfcc* executables from the command line:
$ premake5 xcode4
$ xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccbuild -configuration Release
$ xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccdump -configuration Release
the output is generated in bin/Release-x64
or bin/Debug-x64
depending on the configuration you passed in.
@curtisblackwell Leave a comment if your package is published. @anthrotype I'll add this commands to README :)
that works for me but I'm not an Xcode expert; maybe somebody else knows a better command for that... /cc @schriftgestalt
@anthrotype My friend @darkfall also follows this and successfully built the binaries.
I don’t use the command line to build with Xcode. But the command looks good. But do you need to rebuild the often binaries all the time? You could build it from Xcode and then use them in a script?
@schriftgestalt For me, my development is done one a PC so I often use the scripts to build them and test. But for users, providing a pre-built package is good enough. Actually I already provide EXEs for Windows, but I do not have the platform to build homebrew packages... Maybe you can help me?
@anthrotype So the first line works, but the other two just hang. Should they take a long while?
I also realized I didn't finish getting this running and update the instructions or anything for Mac, so I'm reopening until I get it figured out and update the instructions/include a Mac build.
premake5 xcode4 xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccbuild -configuration Release xcodebuild -workspace build/xcode/otfcc.xcworkspace -scheme otfccdump -configuration Release
@curtisblackwell Have you tried to open build/xcode/otfcc.xcworkspace
directly with XCode?
I also noticed that the xcodebuild command sometimes hangs when running from a fresh checkout. If I then load the generated xcworkspace file in the Xcode.app, and then I simply quit without (apparently) modifying it, if I re-run xcodebuild it does not get stuck this time. I have no idea of that thing works I'm afraid. You should try digging the documentation or look at how other similar homebrew formulas solves this.
@anthrotype @darkfall does not encountered into such a situation.
I don’t have time to look into this right now. But you could compare the project.pbxproj
file (somewhere inside the workspace bundle) before and after you open it in Xcode.
@schriftgestalt Yeah, and I can modify the "xcode" plugin to make it work
$ git diff --staged
diff --git a/build/xcode/otfcc.xcworkspace/contents.xcworkspacedata b/build/xcode/otfcc.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..19ac855
--- /dev/null
+++ b/build/xcode/otfcc.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "group:deps.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:libotfcc.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:otfccdump.xcodeproj">
+ </FileRef>
+ <FileRef
+ location = "group:otfccbuild.xcodeproj">
+ </FileRef>
+</Workspace>
\ No newline at end of file
@anthrotype Nope, the xcworkspacedata
generated in my computer is identical to yours...
@anthrotype @schriftgestalt I think you should follow this:
build/
and bin/
directory.premake5 xcode4
to produce build/xcode directory.build/
into build_old/
.premake5 xcode4
again.build/xcode/otfcc.xcworkspace
with XCode, do nothing, and close.build/
and build_old/
.So I thought I'd already had Xcode set up properly, but turns out I was wrong. I opened up build/xcode/otfcc.xcworkspace
directly as suggested by @be5invis, and clicked build. It asked me if I was sure I wanted to enable Developer Mode. Yes. Then the commands ran successfully.
I need to stop for now and actually get some work done, but so I can come back later and finish this, I'll keep track of the missing steps so far:
premake5
.Sorry ignore that diff.
OK, I just did what @be5invis suggested and I noticed that the .pbxproj files in the .xcodeproj bundles have no differences. But all of them have a new subfolder called xcuserdata
with some extra content:
$ ls -R build/xcode/otfccdump.xcodeproj
project.pbxproj xcuserdata
build/xcode/otfccdump.xcodeproj/xcuserdata:
cosimolupo.xcuserdatad
build/xcode/otfccdump.xcodeproj/xcuserdata/cosimolupo.xcuserdatad:
xcschemes
build/xcode/otfccdump.xcodeproj/xcuserdata/cosimolupo.xcuserdatad/xcschemes:
otfccdump.xcscheme xcschememanagement.plist
I have no idea what these are for, but they seem to make a difference as to whether xcodebuild
runs or gets stuck.
xcuserdata
are, well user data...
They should be automatically generated for saving things like scroll bar position...
Maybe @curtisblackwell’s report is the true reason
No, because Developer Mode is already enabled on my machine
$ DevToolsSecurity -enable
Developer mode is already enabled.
@anthrotype I have no idea now... Instructions are now updated to directly open with IDE.
have a look at this: https://github.com/nomad/shenzhen/issues/217 it seems related.
the problem looks like missing .xcscheme
files. Xcode seems to auto-generate them when they are missing.
I’ve added prebuilt Mac OS binaries to “Releases”.
@curtisblackwell @anthrotype
Thanks @be5invis. I'll give that a go tonight.
@curtisblackwell Finally @Liam0205 is making a Homebrew package. This issue can be closed. Installation:
brew tap caryll/tap && brew install otfcc-mac64
@curtisblackwell Have you tried this?
@schriftgestalt @anthrotype Does the brew package work?
@be5invis the brew package works for me.
@Liam0205 Sorry for the delayed response, I'm at a conference, so I've been really busy. The brew package does work.
@curtisblackwell It's ok. +@moyogo Glad to know that the brew package works fine, since this was my first time to make one.
are you planning to send a pull request to add the formula to https://github.com/Homebrew/homebrew-core?
@anthrotype This is a good suggestion. Semi unfortunately, however, the brew community won’t just add our app to brew, because:
otfcc
is current a beta version app, but the community only accepts stable ones;otfcc
is too niche, which the community dislikes.Homebrew has fontforge, fonttools, woff2, zopfli and probably others so it might be fine once it’s stable.
@moyogo Thanks for your info. Let's look forward to the stable version, then.
the brew tap is fine for now. why "otfcc-mac64" and not just "otfcc"? brew is mac-only, and 32 bit is no option nowadays, is it?
I just realised the formula simply unzips and installs the pre-compiled binaries for otfccdump and otfccbuild, downloaded from the github releases page. That'll never going to be accepted by hombrew-core I guess.
The formula should be able to compile from source. "Bottles" are automatically generated by homebrew.
premake5 is on homebrew (you need to pass --devel
or you get the stable, premake 4). So we should have everything we need to have brew build otfcc from source.
So far, it's just installing premake5, but I'm giving up on that for now. Not on homebrew which means it's tedious on El Capitan.