Dart language standard installation directory? - dart

Is there a standard or recommended installation directory for the Dart language? If so, I would like to know what it is for both Windows and Mac. I searched online on dartlang.org, Google, and StackOverflow. For Mac specifically, I have seen many programming languages installed under /Library.
I believe the standard workspace for Dart projects is ~/dart. When you download the Dart language, you are given a /dart folder containing the Editor, SDK, Chromium with Dart VM installed, and some extras. I am wondering what the standard location for this folder is. Thank you in advance!

The standard workspace directory for Dart projects is like you wrote ~/dart in Linux (don't know about other OS).
The standard installation directory is depending on conventions of your OS than the Dart language.
You should have an environment variable DART_SDK pointing to the dart-sdk subdirectory of the installation directory and include the DART_SDK/bin in your path.

On MAC, just drop the directory on App directory, then in terminal you put : "export PATH=$PATH:/Applications/dart/dart-sdk/bin"

Related

I get a Can't load package error although the BPL is there

This issue is driving me crazy. I'm trying to compile and install The QR Designer from QuickReports 6. I have an issue just with the one package. When I right the package in the IDE > Install the IDE gives me:
Can't load package C:\xe10_3\QRDesign\Win32\Debug\dclqrd_DXE10_3.bpl.
The specified module could not be found.
But the exact file is there.
I've also tried installing it via the menu under Components > Install Packages and then choosing the BPL from there, with the same issue.
I've tried to use Process Monitor as on this post here to find the issue:
Delphi Can't load package the specified module cannot be found
I couldn't fix the issue, but what I did pick up from Process Monitor was that some process was looking for the package here:
Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\21.0\Package Cache\dclqrd_DXE10_3.bpl
That key didn't exists. I tried manually creating the key, but that didn't do a thing.
Any ideas?
UPDATE
Here is the list of packages:
As you can see, dclqrd_DXE10_3 is dependant on two others. Which I already built and installed. I removed its references and re-added them again now, to make sure the references are sound. I guess its like Remy said, the Specified module not found is probably not referring to dclqrd_DXE10_3 although I don't know what other module it could be referring to.
To install a package successfully in IDE, follow the steps:
Open the dpk/dproj/groupproj file in IDE
Build the package(s) for Windows 32-bit platform.
IDE itself is a 32-bit applicaton, so it should match.
Normally, it will build all dependent/required packages
Check if all chain of BPL & DCP files are generated in package Output directory.
It defaults to $(BDSCOMMONDIR)\Bpl & Dcp folders, but can be changed individually for each Package in Settings.
PBL packages are like DLL files. In order to load them, it requires all dependent BPLs.
If you have custom package output paths:
Check if your DCP output path is included in Tools\Options\Language\Delphi\Library Library Path for Windows 32-bit platform
Check if no duplicates of outdated compiled packages in default $(BDSCOMMONDIR)\Bpl & Dcp directories
Add the paths to library source pas files in Tools\Options\Language\Delphi\Library Browsing path or Library path
In some specific cases, if the package requires some extra dll-s like DB Client libraries, check if these dlls are 32-bit and are loadable, like included in %path% environement variable.
Note, some libraries offers package installer tools, that automagically do all mentioned things for you.
Also, there are universal package installer tools for quick working environement setup in one click.
I don't know why this fixed my issue, but it did.
The output directories for the bpl and dcp was set to be $(Platform)\$(Config)
The project files for the different packages exists in the same folder so the above config was supposed to be the debug folder or the release folder. Why only this package was thrown off I still don't know, but since changing the above packages to have a fixed path suddenly I could now install dclqrd_DXE10_3.bpl.
Thank you all for helping.

VS Code-'dart' is not recognized as an internal or external command, operable program or batch file

I am trying to install flutter and run the basic flutter example on visual studio code . I used flutter doctor in the command line and installed all the missing requirements , now i try to run a basic program in flutter ,but in visual studio code output i get the following error
[Running] dart "c:\fluttercode\mobile_test1\lib\main.dart"
'dart' is not recognized as an internal or external command,
operable program or batch file.
[Done] exited with code=1 in 64.965 seconds
I could find only one question similar to this in stack overflow ,
Visual Studio Code: dart not found
they told to change environment variables ,i added the environment variables (however the name of the environment variables was not mentioned in the answer )
I checked the dart site in case they mentioned it ,but i couldn't find anything related to the name of the environment variable
This is what i got from dart site
Windows:
In Windows, setting your PATH and environment variables can be done by opening Control Panel and typing “Environment” and then clicking the “Edit the system environment variables” option. You’ll be presented with a list of environment variables including PATH where you can edit or add new ones.
Note: You should reboot your computer after making changes to PATH to ensure all processes (including explorer) are updated.
So i just did a guess and added an environment variable with the name FLUTTER_ROOT(cause i remember reading somewhere in one of the settings in VS Code for dart ,this name was used) and pointed it to my flutter bin directory
I restarted my PC and opened vs code and changed in VS Settings >user settings>dart and flutter>Dart:Env and updated my path
{
"files.autoSave": "afterDelay",
"dart.flutterSdkPath": "C:\\src\\flutter\\bin"
}
But i get the same error
this is how my flutter bin folder looks like
Environment variables in PATH after installing Dart
You don't have to install the dart SDK if you already have the flutter SDK installed. When you specify the path of flutter, VSCode only recognizes the flutter commands and not the dart commands. What you should do is change the system environment variables (type env in the windows search bar) and add the dart sdk inside the PATH variable. The dart sdk is usually found inside /bin/cache/dart/bin. This worked for me, so give it a try
Try to add the flutter\bin sdk path and also the windows\system32 path to the user variables and/or system variables.
I had the same problem. Here is how I resolved it.
Download and extract dart sdk (I used the stable release)
https://v1-dartlang-org.firebaseapp.com/install/archive
add the dart sdk bin folder to your path
after you have added it to your path run
flutter pub global activate webdev
now i can run
webdev serve
without error.
I'm using windows so I used choco install dart-sdk -<version> to install dart through the powershell in admin mode. That got rid of my error
Installing flutter is not enough. You need to install the dart sdk.
Pre-req: Make sure you have Chocolatey installed on your machine.
Run "choco install dart-sdk" from an elevated prompt.
Restart vscode.
That did it for me.
I went to the dart website and searched for the dart sdk.
i then chose the option to install dart using setup wizard.
After running the executable file on my laptop it took some time to download all the files but once the setup was complete the error no longer occurred and i was able to run the code successfully.
Downloading dart setup from dart website
Installing using setup wizard

Instructions for how to lay out the Mac OS X and Linux versions of Electron apps?

I've just spent a very long time looking through everything on https://electron.atom.io/docs/ but I cannot find any mention of how to put the files for Mac and Linux. Only Windows, which I already have set up.
I remember that NW.js had such instructions, which I followed in the past, but it's obviously too ridiculous to accept that I should have to look at a competitor's manual to figure out how to distribute Electron apps.
I remember that at both Linux and Mac had some very fancy/weird packaging need, very unlike Windows.
I would recommend looking into electron-builder which would help you with generating packages for all of the mentioned systems (with auto-update and other goodies).
You can also take a look at electron-boilerplate to see how it can be nicely implemented (this boilerplate has a release command that allows you to generate packages).
For the mac version you can use electron packager to generate a .app file then you can use appdmg to generate a .dmg
For the linux version you can use electron packager to generate a executable although it comes with lots of other files.
I've tried electron-installer-debian but I couldn't install the output .deb

WinObjC: Could not acquire lock file for module 'UIKit'

When trying to port the Calculator sample from the official Windows Bridge for iOS blog, I always get the following error after converting the project and trying to compile it:
could not acquire lock file for module 'UIKit' Calculator (Calculator\Calculator) W:\Source\Bridgetest\Calculator\Calculator\ViewController.h 9
I am using the latest version of the bridge 0.1 Preview (April 29, 2016).
Oh, and I am using Parallels for my Windows VM.
Any ideas?
I believe your question has been answered on Github, but I'll answer it here as well in case it's useful to anyone who finds this:
The problem here was the project and the WinObjC SDK were both located on a network share, which is how Windows identifies folders that Parallels shares between Windows and OS X. This causes problems for both vsimporter and Visual Studio.
Normally, vsimporter writes an absolute path to the WinObjC SDK in any imported projects. If you invoke vsimporter with the -relativepath option it will write a relative path instead. In either case, you also have the option to define WINOBJC_SDK_ROOT as an environment variable, which will take precedence over the path hard-coded in the project file.
If you would like to keep your code on a shared directory that is accessible from both OS X and Windows (so you can develop in Xcode and Visual Studio simultaneously from the same code base), you can do so. However, by default, Visual Studio will not register an app with the system if its files are on a network drive, so you'll have to change a few settings to get Visual Studio to build and run. Instructions for doing so can be found in our FAQ on Github.

Unable to find ant program

I am an experienced (but retired) Windows software developer, with more years experience than I care to admit, developing in C++, C#, VB and Java. I therefore decided to have a crack at Android development. My development machine is a Windows 7 box. My IDE of choice would be Microsoft Visual Studio but, for now, I am happy doing hand editing and launching tools from the command line.
I started by downloading the Android SDK and various additional items it suggested. I then started working my way through the tutorial at developer.android.com/training/basics/firstapp. Android list targets gave me a couple of choices (Android 4.2.2 and Google APIs:17). I then did Android create project from the command line and that appeared to do its stuff, creating MyFirstApp in my development folder. I then ran Android avd and created an emulator. I also added the android SDK's tools and platform-tools to my path. So far so good.
I fell at the next hurdle. The tutorial told me to change to the root folder of my project and run ant debug. At this point, Windows reports:
'ant' is not recognized as an internal or external command,
operable program or batch file.
I've searched around for ant.exe without success. Did I miss installing something or did I miss a vital step in the set-up? Any advice for this very green newbie would be greatly appreciated.
There is no ant.exe. Only ant.bat. Ant is a Java build tool.
If it comes with the Android SDK, make sure its bin directory is in your PATH environment variable. Otherwise, download it (from [http://ant.apache.org][1]), and follow the installation instructions on the web site.
Normally, simply unzipping it, putting its bin directory in the PATH envieonment variable, and setting a JAVA_HOME environment variable that points to your preferred JDK directory is sufficient.

Resources