Just starting out with the Trigger.io workflow. Was wondering if anybody could enlighten me as to the deal with different projects in different directories. I've inadvertently created another test application through my local Trigger Toolkit via the terminal, and have noted (after some searching) that it has created a new app project deep within my ~/Library/Trigger Toolkit/ directory. The original app I created (via the web interface) was plonked in /Users/[Name]/[Name of App].
When I forge run/build it runs the local version deep within the Trigger \Toolkit directory, not the version within my Users directory. How can I register this one with my local build? And destroy the test created with the local build.
If you know what the hell I'm trying to get at then you deserve a stack overflow crown.
Not sure how you've managed to get an app appearing in ~/Library/Trigger Toolkit. This overview might help:
The folder structure for a forge app is something like:
my-app/
local_config.json
src/
config.json
identity.json
index.html
The forge commandline program tries to treat the current working directory as an app (i.e. it expects you to run it in a folder like my-app above).
The exception is forge create which sets up this structure. For example if you ran forge create in /Users/tim/my-app then it would set up something like the above.
The Trigger Toolkit has two actions for dealing with these sorts of folders - create and import. The create action sets up an app structure like the above, the import action allows to import the my-app folder above into the list of apps available to work on in the Toolkit.
You can remove an app from the list by using the "forget" button next to the app in the list. If you want to "destroy" an app it always comes down to just deleting a folder, in this case I'd delete the my-app folder.
The folder ~/Library/Trigger Toolkit contains the code for the Trigger Toolkit itself, as well as a file which keeps track of the apps listed in the Toolkit. The only way I can see that you'd get an app appearing in this folder is to manually cd to it and use forge create.
To summarise, each app is isolated to a folder. When using the commandline tools you just need to use e.g. forge build android and forge run android in the specific folder for that app. If using the Toolkit you need to import the folder or have created it through the Toolkit, clicking that app in the app list puts you in the context of it, and run/package actions from there will run using the folder registered for that app.
Related
I am creating an .msix package from VS 2019. The application being packaged is a .NET Core 3.1 WFP desktop app.
The package (.msixbundle) executes correctly and is named correctly.
However, the folder that the package is placed always has a "_Test" appended (suffix) to the end of the folder it is located in. If I publish the package to a web server or file share there will be an accumulation of folders ending in "_Test". This occurs regardless of whether I'm creating a debug or release version.
I have search the Solution for the word Test but it's not there. I've created simple generic apps and the "_Test" suffix is always present on the folder names of the packages.
Where does this come from?
I'm looking to make a folder outside of a portable electron build.
I'm thinking that creating the folder when the app starts will trigger permissions so I'm hoping to find a way to do it within the build process.
I'm using electron-build for packaging the app.
What's the best way to do that?
Take a look at electron build hook: https://www.electron.build/configuration/configuration#hooks
You might want to put some function such as fs.mkdir at afterPack hook (after pack electron app but before creating installer). Hope this help.
To debug remotely with Delphi, now that the PAServer is normally used, one usually follows the following preliminary steps, as outlined on the online docwiki:
Create a remote profile inside your ide, in my case I'm calling it win7vm, this contains the IP address of the remote system, and a few options, and the PAServer connection password, but as far as I can see, it doesn't contain any context information like "I want to use the following remote folders".
The remote folders that are usually used to contain my target executable are usually a subdirectory underneath the scratch directory. If I configure the main scratch directory to be c:\scratch, and my remote profile was named win7vm and my project is name project1, then the IDE and PA Server are going to compile and deliver my executable to c:\scratch\win7vm\project1 and run it from there.
What I actually want is to have my executable be delivered to and run right in #c:\scratch#. I have a gigabyte of supporting files that all need to be in the same directory as my main executable and I don't want to have 8 copies of these supporting files. So, can this be done? Can I make PA Server NOT create a sub-folder with the name of my project and another for the name of my session? If so, is this done inside the paserver.config file, or on my client side, or somewhere else?
Update: I tried to change the Remote Path in the Project -> Deployment, but it does not work to use a relative path here. For example, change it to ..\..\ and the working directory in Project Options to ..\..\, but it still only delivers my executable to the folder c:\scratch\win7vm\project1 instead of directly into c:\scratch\
Update 2: It appears you can't do what I want, which is have the scratch directory be the main folder, and NOT create any sub-folders per-profile and per-project, and that if you don't like working in a scratch sub-folder, you should just set Absolute Remote Paths in Deployment and Absolute working folder in your project's Run options, and you should turn off restricted mode, however this means that the entire VM or machine you are remotely debugging can be manipulated by the PAServer, which is also hardly ideal. I believe that having a fixed root scratch folder would be a safer and more flexible way of working, so I'm leaving this question open, hoping to find an effective way to achieve a safe but flexible remote debugging technique.
If I'm creating a rails app and will also be writing other code for the project (think tools and background processes that will be run separately from the website), how should I structure the repository?
If my project is called Foobar, is it better to name my repository/top level directory foobar and then name my rails app "website" so that I don't end up with a directory structure like foobar/foobar/...? Should I create them as separate repos on Github so my rails app can be its own repo?
You don't need to move your supporting tools outside of your project directory.
There are already subfolders which are meant to include things "to be run separately from the website" (for example, /lib/tasks and /script folders). It's absolutely ok to create your own /tools or /any-other-name-you-like subfolder inside your project directory tree.
And especially background processes - it's so likely that they will be closely connected with project internals... they are certainly part of the project.
If it's an actual self contained entity, roll it up in a gem so you can use it in other projects easily. That way it can have it's own repository, test, etc... The more you can break apart your application at logical components, the easier it is to maintain in the long run.
Just because the other code runs separately doesn't mean you have to have separate repositories. If the code is somehow related to each other it's fine to keep it in the same one.
We had a Project in our solution called DatabaseCreation - which was responsible for creating the database and running the scripts (contained in directories within the project).
Everything was fine.
We then wanted to make the creation of this database to be available from an app and from a console, so re-factored so that we had ...
DatabaseCreation.Core
DatabaseCreation.App
DatabaseCreation.Console
Core has the directories containing scripts, and the App and Console run them.
When built with Visual Studio the directories containing the scripts are copied to the Output bin directory (either App or Console) but problem is: when the build server runs, the script directories don't get copied to the bin folder.
We've tried with TFS and Team City. I realise I could just copy them over, but its frustrating that it works when building in Visual Studio!
Can anyone put me on the right track please?
Check the Build Type for the files in the scripts directory. Find that by clicking one or many files (ctrl+click) then hitting properties (often f4). You likely want them to be content with Copy Always or Copy if newer.
The files were set to copy always, but the build just wouldn't pick them up.
The slightly awkward work around was to add the files as links from one project to another.
Add Existing -> navigate to other project - Looking for the little arrow on the right of the add button -> press that, Add as link option appears.