how can i create project by chromium gn tools? - chromium

install depot_tool then following the gn guide and standalone guide, but i always get error "gn.py: Could not find checkout in any parent of the current path."
so my problem is :
how to create the gn project which is not using chromium sub project, eg: only one function like helloword?
how to create the gn project which is using chromium sub project like v8/pdfium, eg: one console project is using pdfium to read pdf page count.?

I'm not completely sure from the error you describe but it sounds like you don't have a .gn file in the root.
I recently started getting into gn and made a simple starter project: https://github.com/aellerton/experiment-learn-gn
The first thing I didn't expect was the need to have a root .gn file, and that the file needs to point to the root config: https://github.com/aellerton/experiment-learn-gn/blob/master/.gn
The second thing I didn't expect was the need to provide an entire toolchain. I kind of like this now as it gives me full power. I used this one here, by making it a git submodule as the author suggests: https://github.com/timniederhausen/gn-build
Then building a trivial Hello World console program was straightforward.

Related

How to make erlang application?

i'm trying to build the example to run an erlang websocket server.
I created all that files and put them into one folder, add the rebar file and ran
./rebar get-deps
inside the folder direction.
But there is no
make
make runconsole
and nothing's happening.
Is there also a possibility to create that websocket server using IntelliJ? I tried to put that 3 .erl files into IntelliJ and want to Build the project but I receive
erlc: 2: Warning: behaviour cowboy_http_handler undefined
The make command reads something called a Makefile, which is a file written in a certain format, which tells the make command what it is supposed to do, e.g. compile some files with the listed names using the listed commands. Because there is no Makefile listed in that tutorial, you should have gotten an error something like this:
No targets specified and no makefile found.
You can contact the author of the tutorial at his github account and ask him where the Makefile is. Actually, the Makefile for the tutorial is here:
https://github.com/marcelog/erws
I created all that files and put them into one folder
The instructions in the Makefile depend on the exact directory structure that the author has here:
https://github.com/marcelog/erws
I tried using rebar3 and changing some stuff in the Makefile, but I still got errors. The problem is that rel directory: I don't know how to create all the stuff in there. You need to use rebar and reltool for that:
https://gist.github.com/FabioBatSilva/f1d1c4ea250302fed8c2
Here is a cowboy websockets example that I came up with last year, see if it helps:
How to Connect Cowboy (Erlang) websocket to webflow.io generated webpage
It uses the Erlang.mk build system as described in the cowboy docs here:
https://ninenines.eu/docs/en/cowboy/2.5/guide/getting_started/

React Native Xcode 13.2 Error no such file or directory for NativeVibration.js

After creating the project with react-native init, i found this issue in terminal as well as in xcode. After digging deep, i found that this particular file is showing missing in project node modules.
Here are example of error codes showing in xcode & terminal-
Error: ENOENT: no such file or directory,
/ios/Pods/../../node_modules/react-native/React/FBReactNativeSpec/../../Libraries/Vibration/NativeVibration.js
I've learned the hard way when programming in react native (for cross platform/hybrid application development), many unknown issues will be caused if you deviate from native OS clustering. Make sure you don't make the same mistakes as I have.
I have more specific help for you, apart from the obi wan style in my previously semi-answer.
Another guy had an issue with this a few years back, he asked and was answered,"delete your node_modules and app from simulator. Then re-install everything back, clear cache and see if it start bundler from root directory.
Before doing that, you can try 'react-native start' from your root directory.
I have seen that error message a lot, specifically with jest. But that's a different fix. I realize you are not using jest to test your reactjs, but it is jest tests runner that is the problem that causes the same outcome as you have come to- solution there is to disable the jest runner from running in the background while installing new packages.
I wonder if there isn't a similar solution here - only applicable to xcode - although you see it in terminal, that's probably just the cmdline not recognizing the path to the directory or at least that file.
Should be easy to figure out with terminal--
Go to $HOME~ type dir or ls, to see your directory folders, if you see the project listed, cd into it or, just search for the directory apt-get search [package] or apt, pkg, pip, pacman, snap etc etc whatever your flavor if OS terminal is, or search for the file-- $find / -iname [query] or even search for all paths containing the phrase: $locate [query]... If you created it, it exists. Just because xcode can't find it, and initial attempts in term produced nada, don't believe it is not in your system. just a matter of where, what, and why a process or dependancy is missing or malfunctioning in attempt to retrieve the file & open it.
You can definitely find it - i don't know jack about xcode, but terminal -- I can get anything from anywhere on cmdline-- you can too. I have to go, but I'm curious if you have figured it out. Let us know yeah? Best of luck to you. Cheers QwaziRidwanhasib.
-Cujo

Setup golang environment using jetbrains

I have setup an golang developing envionemnt using idea (13.1 community edition).
It seems the SDK is recognized.
However, I could not create a GO file by right click the "New" under the source folder. (The item of "go" is grayed)
Currently I have to manually set the file extension to ".go" and edit the file, but autocomplete is OK.
This only exist on my Mac(with version 10.9.4)
I have set the GOPATH directory access mode to 777 but still not work.
This works fine on windows7.
So what should I do ?
This is what it looks like in windows
Thanks VonC, I already tried the /Users/Tom/go setting, this doesn't work and I switch to this root path.
here's my previous setting
macbook:home root# go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/mac/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
And this is what is look like in the /Users/Tom/Go
Thanks VonC, however, this doesn't work. I am not sure what's the reason.
This is the envionment setting using GOCODE
This is several steps!
step1
By the way, I noticed that there are a difference from mac and windows when creating a new Go Project
at this step, the windows platform will show a "project sdk" while mac won't.
Make sure your IntelliJ project reference the right path within GOPATH.
From the plugin page:
If you have only one directory in the GOPATH and you are creating a project inside that path when you are working with packages that are part of the project you must still specify the whole import path for them, not the relative one. Example:
GOPATH is: /home/florin/go
the correct way to setup a project called demogo is: /home/florin/go/src/github.com/dlsniper/demogo/
new package is: /home/florin/go/src/github.com/dlsniper/demogo/newpack
the correct import statement is: github.com/dlsniper/demogo/newpack not newpack
Also make sure you have the latest version of the plugin, as issue 756 illustrates that IntelliJ IDEA 13 doesn't create the project directory structure on Mac OS X.
Finally, check if IDEA has correctly detected GOROOT and GOPATH:
See the page "Fix missing environment paths (Mac)".
The OP python adds in the comments:
If I have create a new Go project, this new feature is disabled.
If I create a new Java Command line App, then I could right click and add new Go file.
Right-click on either the top-level project or on the src directory and then go to Mark Directory As > Sources Root. After this you will be able to access the enabled Go context menus.

iOS UI Test Project 'MailCore/MailCore.h' file not found

I did a
git clone https://github.com/MailCore/mailcore2.git
I open the
iOS UI Test.xcodeproj
I run the Build
I get the error
'MailCore/MailCore.h' file not found
I cannot understand why that is happening.
What should I do to get this to build?
Some other sources I have found and followed their instructions are below. None of which fixed this problem.
https://github.com/MailCore/mailcore2/issues/316
https://github.com/MailCore/MailCore/issues/19
https://github.com/MailCore/mailcore2/issues/276
I also was able to open the
mailcore2.xcodeproj
and successfully build each of the targets. Which is interesting that I can do that but cannot build the test project independently.
I also followed the video and read me instructions to add to an existing project and was able to build until I added the
#import <MailCore/MailCore.h>
to one of my files.
UPDATE:
The above process I initiated on my iMac.
On my MacBook Pro after I cloned mailcore2 I opened
mailcore2.xcodeproj
first then did the build on each of the targets.
Then I closed that project.
Opened the iOS UI Test.xcodeproj and did a build on that.
This was successful.
However, I still want to know what would cause the problem with the "file not found"
UPDATE 2:
I removed to trash all mailcore2 code from my iMac.
I created different locations in Finder for doing another clone of mailcore2.
I did the git clone.
I opened mailcore2.xcodeproj
I followed the exact same process of building each target like I did on my MacBook
I then opened the iOS UI Test.xcodeproj and did a build.
I get the same problem of
'MailCore/MailCore.h' file not found
Makes no sense to me how it works on macbook but not on iMac.
You can add in target dependency static mailcore ios(mailcore2).
and add the framework libmailcore-ios.a
Its working.
What I finally did was drop mailcore2 into an existing app I already had started.
To do this I did the following:
I removed all traces of mailcore2
I again followed the instructions in the README and the video help.
This time I followed some instructions from
https://github.com/MailCore/mailcore2/issues/276
The instructions in that link says to add the following to Library Search Path:
$(PROJECT_DIR)/mailcore2/Externals/ctemplate-ios/lib
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator
And the Header Search Path to
$(PROJECT_DIR)/mailcore2/build-mac/build/Debug-iphonesimulator/include - recursively
But, that did not work for me. I had to add the HARD CODED PATH to each of those 3 folders.
After doing a clean and build I was then able to add the
#import <MailCore/MailCore.h>
Now it BUILDs completely without error for me.
I will go back and try to add proper relative paths to each of those Search Paths.
Hopefully this helps somebody else with same issue.
FWIW
Had same problem, spend hours trying - nothing worked, not ever hardcoding paths.
Then I stumbled on one issue:
if in XCode\Preferences\Locations I go to Derived Data - Advanced and set it to different locations it always reverts it to Unique, when I go back and check it.
Then I went in File\Project Setting to Derived Data - Advanced and there it was set to Unique. I changed it there to Default and now it does not have that issue anymore!
I delete Derived data, clean project and Start build (Ctrl+B) and I can see now how Build is being created in derived data w/o problems. And that what mailcore needs to function.
And, I checked - no need for hardcoded paths either!
Hope it helps somebody.
PS Another feature maybe useful too - XCode\Preferences\Continue building after error though it did not matter in my case

Create class diagram from already existent iphone code

does anybody know, how i could create automatically a UML class diagram from an already existent iphone project. Is it possible?
Thanks in advance.
Yes, you can use Doxygen:
Install Doxygen (with MacPorts: sudo port install doxygen).
Get a script like this and change the first lines to match your configuration.
Download these files and edit the Doxygen file so it says HAVE_DOT=YES and UML_LOOK=YES.
It will then generate and install a docset that you can read from the documentation browser, or just right click and show contents from Finder.
Or, if you want a graph of dependencies check: https://github.com/nst/objc_dep It uses graphviz.
See also OmniGraffle of all things. If you open an Xcode project with it, it will generate a full class diagram. It can be fairly overwhelming for a large project.