I have main.ts in which there is such a field
win.loadURL('https://example.com').then();
this thing allows you to update the electron application via github-release
but there is one thing! if I change something main.ts
then I have to build everything all over again and make a new exe
there are options for how to automate this?
Related
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.
I have an MVC project that I built in Visual Studio 2013 and when I publish the project up to Windows Server 2012, any changes I made in the bootstrap.css file don't migrate. I know it is just that file specifically because any changes I made to the Site.css file appear on the server. Everything else works except the one bootstrap.css file.
I really don't want to have to pull out the changes in bootstrap.css, it would take a lot of searching. Is this problem common? Has anyone even heard about this issue?
I had an idea to take the code from my bootstrap.css file and minify it manually, then copy it into the boostrap.min.css file. After doing that, I published the project back up to my server and everything is now working as expected.
In Visual Studio's Properties pane (for the file in question) check that the Copy To Output Directory property is set to Copy Always.
Also, in the Publish settings dialog, on the Settings tab,
expand the File Publish Options collapsible region and make sure Remove additional files at destination is checked (turned on).
When it has come to redoing or reinstalling Delphi, I've run into a hassle. When it comes to components and units I've produced to use in projects, I run into having to go through the entire backup of my projects to find all the things I've used in other projects and copy the units over, install the components through the Delphi interface, and make sure everything is present. Then, I usually forget something and then when I pull out a project that uses one of these units or components, I have to stop whatever I'm doing, find the backup disk, find the data do the install, before I continue...
Main question: Has anyone come up with anything to solve this scenario by automating all of this? Otherwise, what do most people here do when it comes to administration of Delphi in this way?
Some tips:
when possible, avoid installation of components and create instances at run time. This will reduce the time to install them in the IDE. For example, all non-visual components do not have to be installed for design mode.
use a build tool like Apache Ant to compile projects with a build script. The build script then also serves as documentation of environment and source path requirements. When I run the build on a new computer, I only need to check the Ant build script configuration file to see which dependencies exist.
Everytime I produce my own components I consider them as a product I would sell. In this sense, what I do is to build a setup wizard that installs the components in Delphi IDE in the very same way it would for a customer.
Anytime I have to reinstall my computer or Delphi, I just have to run my setup wizards and all the work environment gets ready.
I use InnoSetup (http://www.jrsoftware.org/isinfo.php) to build my setup wizards.
I set up Environment Variables
Delphi menu \Tools\Options\Environment Variables
New User Overrides, Example: Variable Name: OutsideComponents; Variable Value: C:\mycompdir\mycomp
Lots of options in how to use the EV's
You can Set them up to use for all your projects...
Delphi Menu \Tools\Options\Delphi Options\Library path Example: $(OutsideComponents)\
Or just link use them in the project..
Delphi Menu \Project\Options\Directories/Conditionals\Search Path Example: $(OusideComponents)\Comp1
I'm using TFS 2012 to automate a build of a solution which contains multiple windows services and two web applicaitons.
I've used the guide I found here to customize the build process template so that the windows services are put in a folder structure that I like. Specifically:
\dropserver\droproot\MyApp\BuildNumber\
\Service1
\Service2
\Service3
\Service4
This works great, but unfortunately it doesn't work for web applicaitons. If I used the same strategy for those, I just get the contents of /bin for each web app, rather than the full site contents.
MSBuild typically uses the web application targets to handle this, but for some reason, this doesn't work when you customize the build as I have. I no longer get the _PublishedWebSites folder in the build output. (I'm guessing that's because I cleared our the OutDir property of the MSBuild task.)
Has anybody done something like this and gotten it to work with web applications as well?
I think I can help with this, it looks like in the build targets that the published websites folder isn't created if the OutDir is the same as the OutputPath.
So this isn't perfect, but if you add the following into the csproj file in the first property group, you'll get everything deployed into "\bin\deploy\" including the _PublishedWebsites folder
<DeployOnBuild>True</DeployOnBuild>
<OutDir>bin\deploy\</OutDir>
With a bit of customization, this solution ended up working for me:
http://www.edsquared.com/2011/01/31/Customizable+Output+Directories+For+TFS+2010+Build.aspx
Basically, did what that link recommended, but also leveraged a new solution configuration (which I called TeamBuild) rather than conditional property definitions.
I believe the key to making this all work was the passing of the outputDirectory as the TeamBuildOutDir argument to MSBuild. Embedding this variable reference in the OutDir or OutputPath variable was allowed Team Build to build to the correct staging location and then automatically copy files from that location to the drop folder.
I'm going to take this a little futher and get rid of the whole _PublishedWebSites thing, but that will be done entirely in the build workflow.
EDIT: TFS 2013 supports this natively with a simply build configuration option:
Take a look at this thread as this post as well.
Team Build: Publish locally using MSDeploy
Since you need all the files for your web projects, you need to trigger the publishing process, and by tweaking the destination of that process, you can have all of your files copied where you need them.
I think option (2) from his answer will work for you.
I hope that helps.
As I can see in your reference link, it will just compile and package the binaries. It does not deploy the website by the steps mentioned in that.
If you want to get the .html, .css, .js etc. under the _PublishedWebSites folder, you need to do a Web Deployment. This manually we can do by clicking the publish option from right click menu of your VS project and by selecting Publish Method as File System.
But, since you need to automate this in your build and drop it in custom drop folder, you may need to manipulate your MSBuild script by calling a AspNetCompiler task. You can get more information on this at the MSDN link. By specifying the TargetPath while you call this target you can get your Web files deployed at the appropriate custom drop folder.
Happy Scripting.
Have you check this blog, this solved my problem where I wanted customized TeamBuild Ouput Directory.
Customizable O/P with TFS 2013
Customizaable O/P with TFS 2012 and .NET Framework 4.5
I've got a WPF application, developed using TFS 2010. I figured out how to get the continuous integration build basically working. On success, I want the build copied to a network location. It's not clear to me if I should be using the "drop location" or "publish" options. I really just want the simplest possible deployment: straight copy of build output.
Is there a straight-forward way to do this in TFS 2010?
Sounds like you want to use the 'This Build copies output to drop folder' option in the Build Defaults tab of a Build Definition that uses the out-of-the-box Default Template workflow. This will copy everything from your build's output including the symbols for debugging, etc. I'd recommend do this if you want the simplest way to copy the application to a network share as you stated above.