I've been through the Windows and Mac video tutorials on the FireBreath (FB) website, through all the documentation and even seen the ActiveX example that a person has provided.
It's been an entire week, but I still can't understand how to create a new project in FB. The only thing explained on the website is how to get the FB sln compiled, where the PluginTest example is already coded. Even for the ActiveX example, only the code is given. It isn't explained as to how they created the project.
So how do I create a new project in FB? Should I just take the existing FB sln file and create a new empty project in it? How do I know what classes I should add to the project? How do I edit cmakeLists.txt to recognize my project? How does running prep2010.cmd make my newly added project compile?
If I need to create a wrapper for my ActiveX, how do I go about creating that project in Windows?
If you have been through the windows video tutorials and didn't see how to create a new project then you were obviously not paying attention. The first video tutorial on both windows and mac tells you how to use fbgen to create a new project.
To get text instructions, you can find them fairly easily:
Go to http://firebreath.org and click on "Getting Started". Scroll down to "Creating a new plugin project" and click on the link.
Either method will walk you through essentially the following steps:
1) Install cmake, visual studio, and python (if you don't have any of them)
2) Get FireBreath (the video tutorials suggest using git; I made the tutorials, so you can guess my suggested method).
3) Run fbgen.py with python and follow the steps.
Congratulations! You have now created a new plugin project!
To build it, you'll need to run the prep script appropriate for your platform and then open the build/FireBreath.(sln | xcodeproj) file in (visual studio | xcode). Note that this differs a bit depending on whether you're on Windows or Mac.
The prep script (such as prep2010.cmd) does not make your project compile; instead it uses cmake to generate the project files for that project for your computer which can then be used to build the project, as explained in the pages linked above. You should never modify anything in the build directory directly, instead you should modify the CMakeLists.txt file in your project directory or if you have platform-specific changes you need to make you can modify Win/projectDef.cmake and Mac/projectDef.cmake.
FireBreath.org is a wiki, so feel free to help us make these things easier to find; as you can see from the links all of the information is there. To me it seems easy to find, so obviously I'm not a good one to try to fix the problem (since I can't see it).
As for making an ActiveX wrapper, there is an example of doing this but it's not really something that is just "easy to do". FireBreath does not in any way attempt to make this a simple thing to do -- that's not the purpose of FireBreath. FireBreath is simply a framework for creating browser plugins; if you want your plugin to act as an activex wrapper you'll have to implement all of the activex for containing your control yourself.
Hopefully that's enough information to get you started. If you are confused, please go read those links. If you're still confused, read them again -- all of this information is there. If you're still confused, come ask in the FireBreath chat room on IRC and I'll try to help you figure it out.
Related
I am new into software developing. I have found this GitHub repository which I plan to modify. Let's just say I fork this repository and modify it. How would I then be able to export it from there. By export it I meant turn all of those files into one windows executable file. Thanks.
In general, building a project is a project-specific task unless the project is written in a language (such as Rust) that has a built-in build tool. If you're unclear about the steps to build a project, you should look in the documentation or the wiki for steps about how to do so, and failing that open an issue asking them to document the procedure for building the project.
Just looking at the project, it does not seem obvious that it should produce a binary executable of any sort since it's written mostly in JavaScript.
Usually you use a compiler to turn source code into machine code (exe files).
As bk2204 mentioned, this project is based on Javascript and Node.js.
Javascript is interpreted instead of compiled, so another program (Node.js) reads the source code and executes it directly every time instead of first compiling it into an exe file. That other program itself may be in an exe file.
The project you have linked is a fork of this project, and that one seems to have a Windows launcher/installer exe file (that probably installs or contains Node.js, but I haven't checked).
That installer is available here in both exe and source code form. So you could modify the launcher and rebuild it, but the main app is not in the launcher, instead it's in all the JS files. You may be able to edit the JS files and just use the same launcher without modifying it. There may be a packaging step required after editing the JS files, to package them into a form that the launcher expects. You would need to run this build step after every time you modify the JS files, to provide the new code to the launcher.
You would have to explore the project's structure and build process to find out the exact steps.
If you're very new that may be exceedingly difficult.
You may want to practice by learning Javascript and Node.js.
You could after that try Java which is compiled, and possibly more powerful than Javascript. Just for fun.
Maybe you could do 30 of these practice projects, then you'll have a chance of being able to modify this project successfully.
I'm creating a RN app that is meant to be some kind of wrapper. It should have multiple targets (like in Xcode) and all its content (images, text, etc.) should be target dependent. Unfortunately, I cannot find any useful informations about how to achieve this without opening Xcode or Android Studio project and create those targets manually (like here). Is there any other solutions for this?
I was still struggling with described problem but I finally found a solution. It's not easy, needs writing a bit of boilerplate code and looks more like a workaround but I hope it will help someone in the future. What I did is I have completed my wrapper app with the resources for one of my targets so I can have visual effect. In the project's root directory I've created a folder with subfolders for each target. Inside each I have put files (images, source code files, other assets) that are target-dependent. Then I've created bash script that takes one argument - target's name. Based on it, it replaces all the target-dependent files from target's subfolder to the original file's destination in the project structure. In this proces all meta-data informations are also replaced so after firing .sh file I can build the app and upload it to both stores. It's really time consuming to create all these apps separately and publish them and it's maybe not the best solution, but at least it works!
On android, you can edit build.gradle files, java or properties, without having to launch Android Studio (which simply uses Gradle)
You can build different type flavours by only changing app/build.gradle
On iOS, that's another story. Project file (.pbxproj) is a mess,and other Workspace/Scheme files are not easy to read or script. So XCode is the way to Go.
I tried to have dynamic target & Info.plist, there are tools to script that like PlistBuddy
in the end, I saw there are many ways to launch a React Native app for developpers. Some prefer the command line, and only VSCode.
Others want to play with native IDE.
By the way, native IDEs are VERY useful.
e.g. : you want to fine-tune your application performance, using XCode view hierarchy debugger or android Studio Layout Inspector (and be sure you don't use to many views), or use any other performance tools these IDEs offer...
In the end, I used react-native-config along with multiple almost similar configs (Info.plist < target < Scheme for each), here's a post giving an overview of the setup.
What I like to do is compile a custom file to generate a C# file. I only need it to compile when its been changed but compiling everytime is ok.
When I looked around I kept finding reference to Custom Tool and found this pretty good article. I remember pre2010 I was able to have a build rule for extensions but it looks like that doesn't exist anymore? It allowed me to specify an extension and bin+args to run against when the file changed. Whats the closest thing to that? It looks like it no longer supported which is exactly what I want
Custom Tool requires me to mess around with registry, create a dll and requires VS SDK. Its way overkill for something I done with ease in the past.
How do I have visual studios run my exe to build a custom extension source file without going into overkill like custom tool above? Must work for C# project, C++ projects would be nice but not required.
I'm doing a Unity-iPhone project, but want to automatically add some native code and relative frameworks and libraries to the XCode 4 project when I get it from Unity. What I know is the basic usage of the script to post-process building in Unity, and some basic knowledge about AppleScript.
Now comes the problem. There are plenty of web pages on the internet (including StackOverflow) about this topic, basic steps of which includes:
Get the path of the file / framework / lib you want to add to the XCode project.
Tell XCode and its inner objects to do some preparing work.
Create file references for what you want to add, and add them to the right phases.
But in the last step, difficulty comes. I follow something like
add myFileRef to compile sources phase of target 1 of project 1
and
add myFrameworkRef to link binary with libraries phase of target 1 of project 1
to really add the files, but when the script is run, these steps just throw errors like
blahblahblah doesn't understand the add message
which drives me mad. According to my searching results, this kind of things work for XCode 3 (but break in XCode 4), so could anyone here please share his/her knowledge about what I'm likely to miss in the AppleScript listed above? or is there any good alternatives to do such things programmatically?
Up till now, I've found no way of doing it with AppleScript. So, my only shot is to directly modify the Xcode project file to add what I want to add.
I have recently begun the process of learning OpenGL to start making some Graphical applications using C++. I have installed the OpenGL SDK and I am able to build the projects properly on that. However, on the OpenGL SDK site there is little to no information what-so-ever on how to create new projects using the elements of the SDK, such as freeglut etc. I have Premake 4.0 and I understand I have to do something with the lua files, I do not know lua however and am not sure how to use the Lua files to create a new project. So could you help me out? Im using VS2010, should I create the project, then do something with premake? Or create some sort of lua file, then use premake on that? Any help would be wonderful because I am very lost, and would really like to get started with OpenGL. I have experimented a lot with this, such as copying the lua files from the sdk, but that came with no luck.
If you are not familiar with Premake4, then I strongly advise you to just use Visual Studio projects directly. If you're having trouble with that, then please amend your question with exactly what you did, and exactly the error messages that Visual Studio gave you when attempting to build. You should include:
The include paths. The full set of include paths, including full absolute directory names (including the path of your project and solution files).
The static library search paths.
The static libraries you are including.
The defines you are building with.
Note: If you don't know what any of these are, then you need to stop and learn a lot more about how C++ projects work. You need to understand how compilers deal with include paths, static libraries, #defines, etc.
If you are not familiar with Premake4, and you still want to use Premake4 with the SDK, then you first must become familiar with Premake4 without the SDK. I could give you an entire premake4.lua script that you could just plug in, change a few lines, and everything would magically work (and if you want that, you could look at how the SDK's examples are built. Specifically examples/premake4.lua). But if I did that, you wouldn't learn anything. You'd just be copy-and-pasting code, without having the slightest understanding of how it works.
So instead, I'm going to tell you what steps you should take to learn how to use Premake4.
Step 1: Hello World, Premake-style. You should make a single .cpp file that is a Hello World application. It just has a standard main function that prints "Hello World" to the console. That's the easy part.
The hard part is the Premake4 script. Rather than creating a Visual Studio project directly, you are going to write a Premake4 script to build that project for you.
The Premake4 documentation can walk you through the steps of making your first solution and project. You will of course need to add files to that project. You should also learn how to use configurations, so that you can have a Debug and Release build. The Debug build should have symbols, and the Release build should be optimized.
Step 2: Multiple projects. Here, you have two .cpp files: test.cpp and main.cpp. In test.cpp, place a function that prints something. The function shouldn't take parameters or anything. In main.cpp, you should have the main function that calls the function defined in test.cpp. There should also be a test.h which has a prototype for the function defined in test.cpp.
The trick here is that you aren't compiling them into the same executable. Not directly. You want two projects: one named test and one named main. The test project should be a static library, which compiles test.cpp. The main project will be the actual executable, which compiles main.cpp. Both of them should include test.h in their file lists.
Here, you're learning that solutions can have multiple projects. The two projects have different file lists. Each project can have a separate kind, which determines the type of build for that project alone. The test project should be a StaticLib, while the main project should be a ConsoleApp.
You will also need to learn to use the links command to link them together. The main project should use links to specify test. test does not need to link to something.
Step 3: Mastering directories.
Here, you're going to do the same thing as Step 2. Except for one thing: put test.h and test.cpp in a different directory (a subdirectory of the current one). You also want a test.lua file in that directory, which you will execute from your main premake4.lua file with a dofile command. The test.lua is where you define your test project. You can call dofile on the test.lua file anytime after you have created the solution with the solution command.
Note that the main project will need to change the directory where it finds test.h. You will also need to use the includedirs command in the main project to tell the compiler where to search for the test.h header you include in main.cpp.
Step 4: Back to the SDK. At this point, you should now be familiar enough with Premake4 to look back at the instructions I pointed you to and understand them a bit better. Then, just do what the instructions say. When it tells you what the first line of your script should be, make that the first line of your script. Put the UseLibs function where it says to put them; it even gives you an example of where it goes. Think of UseLibs as a fancy combination of links and includedirs.