Can Gnome Builder actually produce something else than flatpaks? - gnome-builder

I can't seem to find any documentation as to how to configure builds to produce something else than the pre-configured flatpaks. Duplicating build configurations and changing the settings doesn't seem to give me the option to produce anything else than flatpaks. Changing the application runtime to "Host System" produces only flatpaks as well. I can't even find the preliminary binaries that seem to be produced somewhere before they're packaged. What am I doing wrong?

For reference, I am using Builder 3.36. My assumption based on your post is you're looking only for your application binary, and not a way to build some other package like .deb or .rpm.
There are a few ways you can do this.
Method 1: From your Flatpak build's directory
Click the omnibar and click "build", not "Export Bundle". When it's completed, click the "View build console contents" button from the same omnibar drop down where the "Export Bundle" button is.
Look at the last lines of output in the terminal for the "flatpak build" command. Look for the "build-dir" parameter passed to this command.
The path will be something like "~/.cache/gnome-builder/projects/AppName/builds/org.your.App.json-flatpak-org.gnome.Platform-x86_64-3.34-unversioned"
Go into this directory. It will have a subdirectory "src" which has your app.
Method 2: Change build configuration
If you click the "Switch Surface" button in the top left and go to "Build Configurations" you should see two configurations created for you by default (if you created the project through Builder). Builder defaults to your JSON file which builds Flatpaks.
Click the "Default" configuration, then click "Make Active" under "Overview". Then you can build the app as normal (e.g. with the omnibar at the top). Once it says "Build succeeded" the binary has been built.
But where? Look for the path listed in the "Overview" for the "Default" configuration -- under "Install Prefix". This will be something like "/home/user/.cache/gnome-builder/install/AppName/host"
In there is a "bin" directory with your app.
Method 3 (Preferred): Build using ninja
From the Editor surface, press CTRL+SHIFT+ALT+T to open a terminal inside Builder, which defaults to your $BUILDDIR
In the terminal that's open, simply type "ninja". If it says "ninja: no work to do." your app is already built and up to date. You can type "ninja clean" and then "ninja" if you want to do a fresh rebuild.
Inside this directory, (something like "~/.cache/gnome-builder/projects/AppName/builds/default-host-unversioned") there will be a "src" directory which is where the app is built.
Running your app
You may not be able to double click this from a file manager, so open the directory in a terminal and type "./appname" to run the app.

In addition to wappa's answer, for GNOME Builder 43, the file system is ~/.var/app/org.gnome.Builder/cache/gnome-builder/projects/<your-project-name>. The default build directory is builds/<your-application-id>.json-flatpak-org.gnome.Platform-43-x86_64-main under the file system; you can find object files, executable files, Meson and Ninja files including build.ninja, etc. here.
Besides, you can find the output Flatpak files at flatpak/staging/x86_64-main under the file system. To export a Flatpak bundle, you can click the down arrow on the top bar and click "export". The exported Flatpak bundle is at this directory. The executable binary file is under files/bin. You can also find application data, icons, font configurations, etc., under the files directory.
To configure the location, you can still click the down arrow on the top bar and click "Configure Project...". On the "Overview" page, you can view which configuration you are using currently, corresponding to the configuration options on the sidebar: "Default" (~/.var/app/org.gnome.Builder/cache/gnome-builder/install/<your-project-name>/host) and <your-application-id>.json. By default, the latter one is selected, whose installation prefix is /app. If you look at the Build Output, you can observe that the desktop file, source files, GSchema XML, AppData XML, Icons, etc., are installed into /app. The /app is the path in Flatpak's sandbox filesystem rather than the path in the main filesystem of your Linux OS.
If you want to avoid using Flatpak, you can go to the build directory and manually build by Meson and Ninja.

Related

How to run 'node' and 'npm' commands outside of the nodejs folder that was downloaded from nodejs.org

So, I installed node.js in a computer and saved the nodejs folder in program files folder.
However, I am not able to run an node or npm command in cmd unless the path I am in is either Program Files or in Program Files. How do I use the commands everywhere?
Thanks in advance!
Well, you need to add the directory to your Path environment variable.
Usually, nodejs does this for you during the installation but if you forgot to select that option, you can always add it manually:
Open the Start menu in Windows, type "env" and select "Edit the system environment variables", you end up on the "Advanced" tab of the System properties dialog. On this tab, you can see four buttons, the last of which says "Environment variables"
Click that button to open the environment variables dialog, in which you will see two panels, the upper being the variables for your current user, the lower one being the system-wide variables.
In both panels, you can find a variable named "Path". Select the one you want to edit (user-wide or system-wide) and click on "Edit".
In the Edit dialogue, you see a list of Windows paths currently in the "Path" variable. You'll want to click on "New", which creates a new entry and then click on "Find..." to open a window to let you select a folder on your system. There, find and select the folder you installed nodejs to, that is, the folder containing the "node.exe" executable as well as the "npm" and "npx" scripts.
Save everything, fire up a CMD or PowerShell and test by entering node --version
Alternatively, just re-install node and during the installation, watch out for a checkbox say something the likes of "Add installation folder to %PATH%".
If you use Windows.
From www.howtogeek.com:
The Windows System PATH tells your PC where it can find specific directories that contain executable files. ipconfig.exe, for example, is found in the C:\Windows\System32 directory, which is a part of the system PATH by default. When you type ipconfig into a Command Prompt, Windows doesn’t need to know where that EXE is–it’ll check all the folders in its PATH until it finds the right one.
So we have to add the path of the nodejs installation folder(which contains node.exe and npm.exe files) in the path environment variable.
So windows button on keyboard and search edit the system environment variables.
Open it and then in the System Variables settings search Path
Click edit and then insert in a new line:
C:\Program Files\nodejs\
Or where you have installed node.
(if you go in this dir you see the npm.cmd and node.exe files).
Restart.
Now try npm or node commands on cmd everywhere you want.

When trying to export libgdx desktop using command on android studio, the command is not recognized

So I went onto the internet to find out how to export my libgdx project from android studio, and I learned that you can generate it by using the command gradlew desktop:dist. But when I type this into the terminal window in android studio, it says, 'gradlew' is not recognized as an internal or external command, operable program or batch file. Why is this happening?
This is happening because the terminal can't find the gradlew program. If you're using Linux, make sure to type ./gradlew- but my guess is that you're using windows.
First, use your file browser to navigate to your project directory and make sure that gradlew.bat is present. If it isn't, you don't have gradlew as part of your project and need to go get it from The Gradle Website.
If you have gradlew.bat, make sure that your terminal is navigated to your project directory. On windows you can see where it is currently pointed using echo %cd% - if it doesn't show your current directory, you need to use the cd command to navigate to your project directory.
You can also confirm you're in the right place by running dir in the terminal- you should see gradlew.bat.

TYPO3 Dumy package does not show installation screen

I am trying to install the Dummy package to my laptop.
I have installed WAMP and i have placed the dummy package into the WWW directory.
However when i go to my Localhost from WAMP and click on the dummy page, instead of showing me the installation screen it shows my the directory index.
to create ENABLE_INSTALL_TOOL just use command line
win+r -> type cmd -> navigate to directory -> type: echo > ENABLE_INSTALL_TOOL
Dummy package has no sources inside, you can see, there's no even index.php file.
Use Source + Dummy which will give you an empty TYPO3 system or even better Introduction Package for learning purposes - working and containing lot of samples.
To create ENABLE_INSTALL_TOOL make sure that your system displays files' names with extension ie: open with the Windows Explorer folder where you unziped the package and make sure that it can see filenames as INSTALL.txt (not only INSTALL) if it doesn't you need to search in options of Windows Explorer...)
Then go to folder typo3conf and create just common, empty file ENABLE_INSTALL_TOOL.txt and finally chane it's name and remove .txt extension.
TYPOe install tool will be satisfied.

How to run NDK samples?

Sorry to ask such a noob question, but the NDK documentation is wrong (r7b):
If you are developing in Eclipse with ADT, use the New Project Wizard
to create a new Android project for each sample, using the "Import
from Existing Source" option and importing the source from
<ndk>/apps/<app_name>/project/. Then, set up an AVD, if necessary, and
build/run the application in the emulator.
There is no "apps" folder, and the samples do not contain a "project" folder. So ... what is the correct way to run a sample?
Also, can I configure Eclipse to build the C++ portion of the code automatically?
Click File | New | Project...
Choose Android project, Next
Project Name: This is the project name shown in Package Explorer. It is just a string stored in the .project file that Eclipse creates. No file or folder is created with this name, and the output binaries do not seem to contain this name.
Click "Create project from existing source"
Location: choose the project's root folder, e.g. .../android-ndk-r7b/samples/bitmap-plasma
Click Next and choose your target API. Eclipse does not seem to allow this to be changed later, at least not from the GUI. I don't know why Eclipse does not simply get this information from <uses-sdk> in AndroidManifest.xml or from the "target" line in default.properties. I also don't know why the two may be different (e.g. in the bitmap-plasma sample, target=android-9 but <uses-sdk android:minSdkVersion="8"/>.)
Click next and consider changing the "Package Name" field which defaults to "your.package.namespace". However, the project will run fine if you do not change this field. Leave "Create Activity" and "Create a Test Project" unchecked.
Click Finish. Eclipse will create numerous extra files (e.g. .classpath, .project, project.properties) and folders (bin, gen, assets) alongside the existing code. That's in addition to the output folders created by ndk-build (obj and libs).
Eclipse won't build the native code by itself, but it will automatically deploy the native code (e.g. libplasma.so) if it is aware of it. After you build the native code on the command line, e.g.:
C:\...\android-ndk-r7b\samples\bitmap-plasma>..\..\ndk-build
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi-v7a/gdbserver
Gdbsetup : libs/armeabi-v7a/gdb.setup
"Compile thumb : plasma <= plasma.c
SharedLibrary : libplasma.so
Install : libplasma.so => libs/armeabi/libplasma.so
"Compile thumb : plasma <= plasma.c
SharedLibrary : libplasma.so
Install : libplasma.so => libs/armeabi-v7a/libplasma.so
Right-click your project and choose "Refresh", otherwise Eclipse might fail to upload the native code when it starts the emulator.
Finally, to run the sample, right-click the project and choose Run As | Android application. See here about choosing which emulator is used.
See here about configuring Eclipse to build the native code automatically.
I am curious why NDK produces two *.so files with very different sizes for each ABI, e.g. it creates libs/armeabi-v7a/libplasma.so (15 KB) but also obj/local/armeabi-v7a/libplasma.so (63 KB). Anyone know the difference?
Instead of going the long winded way ( seasoned programmer love it - but for beginners). There is a way to build the native library in Eclipse and NDK.
1> First you need to make sure NDK path is correct in Windows -> Preference -> (tabs) Android -> NDK - If not set - point it to ndk directory.
2> Assuming you have you imported project as described above (New | Project | Create from existing code) - You right click the project and go to " Android Tools -> Add Native Support ..". If the path is set it will build the example. And then you can deploy it to the device or AVM by pressing the play button.
SOURCE
I'm working with Eclipse ADT and Android ndk 5b. My correct path to the project is android-ndk-5b/samples/project
When you import from existing source you have to choose a correct target, I use Android 2.3.3.
After, I've updated my project from command line, look this link, http://developer.android.com/sdk/ndk/overview.html
From the samples path write: android update project -p . -s and $Your_Path_Android_ndk/ndk-build
Finally, only run as android app in Eclipse and it's done
It seems that with Eclipse Juno, you can now
Click File | New | Project...
Under Android category select Android Project from Existing Code and click Next.
In Root Directory you can then browse and confirm your sample project location.
From here, Eclipse can automatically detect the jni and find the projects.
If this didn't work, go to terminal or command prompt and navigate to your project root directory (where you see jni folder). Then input
android update project -p . -t <your target level>
Here should be, e.g., android-9
After this, try again the initial steps.

Eclipse Helios fails to load toy plugin

I am trying to install a toy plugin that I wrote in Eclipse Helios 20100617-1415 under Fedora 12. Attempts at installing the plugin have all failed. The plugin does actually run when executed as an Eclipse Application (another copy of Eclipse is loaded and the plugin appears on the menu and does what it's supposed to). I put the jar file for the plugin in the /dropins/plugins directory and after several reboots Eclipse fails to load it and seems to not generate any error messages either. I also tried to load it directly using the Install New Software UI and that failed (added a directory where the toy plugin is and the response is: a dialog box pops up: No software site found at DIR_NAME. Do you wish to edit the location? At the same time in the name list area box behind the popup it says: Could not find file:DIR_NAME (the directory is valid and the jar file is there) - the other attempts are to load the jar file directly selecting archive instead of local in the Add Repository dialog - that too fails: first the jar name is mangled somewhat to jar:file:/DIR_NAME/TOY_NAME.jar!/ and then the same error messages come up already mentioned for just trying to use the directory location). So the installation mechanism is a complete failure but - how can I get it working? (Yes I can install plugins from the Eclipse marketPlace and other repositories). Thanks!
There are several ways to install your plug-in,
put your plug-ins into "dropins" folder if your eclipse enables polling that folder. The structure should look like below,
-dropins
-cdt
-features
-plugins
-myplugin_1.0.0.jar
export your plug-ins to your eclipse via menu 'File' - 'Export' - 'Plug-in development' - 'Deploy plug-ins and fragments' - 'Install to'

Resources