@mrcarlberg I had come to the same conclusions over the last few years. The best approach available now has been to use Xcode’s sidebar groups to provide useful organization. It works, but one must be careful to not select ‘Group with folder’. I had noticed #2963 when it was posted, but failed to grasp its significance. fwiw, there has long been a Ruby gem to synchronize Xcode’s virtual folder with the on-disk structure: https://github.com/venmo/synx
An analagous automated tool would nicely complement #2963
Anyone able to describe in detail how an app built for release bootstraps itself? I’m in the process of hardening ours, starting with prohibiting everything, then specifically allowing the pathnames required by the app.
Strangely, one of the first URL requests is for main.j, which isn’t a file in the Release build artifacts, despite having a reference in index.html. Having trouble understanding where the request for main.j originates - although I’m guessing it’s a fallback built into the Objective-J runtime file.
Insight welcomed. It will also help in process of defining the offline operation requirements.
Frameworks/Objective-J/Objective-J.jsis read and executed. It will setup the Objective-J runtime.
./Info.plistis read and parsed to get stuff like path to main file (usually
main.j), is it prebuilt etc...
@importthen read each of the imported files.
mainfunction. The function is called.
In depthsheader from the main wiki page :smile: : https://github.com/cappuccino/cappuccino/wiki/Bootstrap
Build/AppName.buildis, as you say, used in the build process. It stores all the compiled source files before the common source file is being created. It is not removed after the build process as it is also used the next time you build to only recompile the files that are changed. You can remove it by doing
jake cleanor just remove from command line with
rmor from the FInder.
@mrcarlberg Do you know if the Jakefile syntax is sufficiently close to that of a Makefile for a make linter to be usable?
I’ve just had a modification to the standard Jakefile in a project which unintentionally introduced invalid characters. Running
jake produced very unhelpful feedback — it complained the problem was in the Cappuccino’s narwhal bootstrap.js file :-(
Perhaps I hadn’t had my morning coffee, but it took an hour for the eureka moment when I realized the problem was in the Jakefile itself.
gtavares@Gustavos-MacBook-Air Browser % ./gtktest /Users/gtavares/Developer/cappuccino/node_modules/@objj/runtime/ lib/objective-j.js:3946 throw new Error("Could not load file at " + aURL + (compilingFileUrl ? " when compiling " + compilingFileUrl : "") + "\nwith includeURLs: " + StaticResource.includeURLs()); ^ Error: Could not load file at Foundation/Foundation.j when compiling file:/Users/gtavares/Desktop/Browser/gtktest with includeURLs: /Users/gtavares/Desktop/Browser/Frameworks/,/Users/gtavares/Developer/cappuccino/dist/objective-j/Frameworks/ at completed (/Users/gtavares/Developer/cappuccino/node_modules/@objj/runtime/lib/objective-j.js:3946:31)
/Users/gtavares/Developer/cappuccino/and my $CAPP_BUILD set to
gtavares@Gustavos-MacBook-Air Browser % ./gtktest @implementation CPBundle (IsEqual) ^ ERROR line 62 in file:/Users/gtavares/Desktop/Browser/gtktest:62: Class CPBundle not found /Users/gtavares/Developer/cappuccino/node_modules/@objj/runtime/lib/objective-j.js:3702 throw "Compilation error"; ^ Compilation error (Use `node --trace-uncaught ...` to show where the exception was thrown) Node.js v17.0.1
@mucholove Returned here to a project after a month’s absence to find
nib2cib refusing to compile xibs that previously worked. Only changes to the machine are a handful of new commits to Cappuccino (including my fixes for
nib2cib), and the 12.0.1 update to Monterey.
Has your system also moved from macOS 12.0 to 12.0.1 in your downtime interval?
In my case, the problem seems to be permissions problems at the
ibtool phase — despite that command working just fine when run manually in the terminal. Don’t have time just now to sort it out though — reverted to using a trusty High Sierra installation.
includeURLsare the paths to the current working directory
/Users/gtavares/Desktop/Browser/gtktestand the current installed version of the Objective-J framework
/Users/gtavares/Developer/cappuccino/dist/objective-j/Frameworks. What is missing is the path to the current installed Cappuccino framework
/Users/gtavares/Developer/cappuccino/dist/cappuccino/Frameworks. I think this is a bug in the
@objj/runtimenode module. I will look into why this is happening.
includeURLsbut could be added manually with the environment variable
Property List error: Unexpected character N at line 1 / JSON error: JSON text did not start with array or object and option to allow fragments not set. around line 1, column 0.
imagesizeneeds to be replaced in the node version — it is used by
nib2cibif a xib contains images.
imagesizerequired if a xib contains an image :-) For the immediate need it can be loaded programmatically, and will be in the final version. I’m wondering what else isn’t quite there, though?
imagesize- is that one of the legacy Java-native tools?