Modify a vcpkg triplet file, how can I rebuild? - vcpkg

We use a custom triplet file MyTriplet.cmake with some specific settings. Everything is built but now we need to change one setting in the triplet file. The problem is, when we re-run vcpkg install it reports everything is already built.
I know the nuclear option of deleting my entire vcpkg directory and starting again, but this means downloading everything again too.
I could also create a new triplet `MyTriplet2' and build that, but it doesn't seem ideal either.
In the past I have tried to manually remove directories but either I don't delete enough, or I delete too much and then end up having to start from scratch anyway.
We build about 30 different ports so a solution that doesn't involve iterating over each port would be preferred! Is there one key folder I can remove that will make vcpkg think "MyTriplet hasn't been built yet?"

your options:
delete the folder <vcpkgroot>/installed/ if you only have this one triplet.
remove all installed ports manually
use manifest mode in cmake + binary caching. This automatically removes all ports if the hash changed. Since the triplet is part of the hash it will automatically rebuild everything.

Related

Git repository/solution with projects as submodules

I have an interesting configuration I might be going completely wrong about.
I have a solution that has it's own project, and another two projects that are loaded from two separate submodules of the repository.
I use those projects to build two libraries I use for my own project and then use the pre-build event of the main project to copy freshly built .dlls to the output folder of my project.
However, I've come to a snag. One of the submodule projects is using multi-byte character set, while the other one uses unicode character set.
I can change the character set of my own project, but I cannot change anything within the submodules since I'm changing just my local copy - anyone else who clones the repository would still get the unchanged version.
Is there a way I can somehow edit the project properties via some sort of pre-built event of another project, or something similar?
Doing it this way ensures that anyone who tries to modify project has the .dll version compiled on their own machine. Is that worth the effort or am I just over-complicating things? Should I just compile the libraries and then add the compiled .dlls to my project and leave the submodules out of it?

TFS Build 2015 - Using Globally Referred Files in Every Build

So, we are in this process of migrating XAML Builds to vNext (2015) Builds on TFS, and we are trying to "do things as clean as possible", since we had many, many customizations on the XAML builds that could be avoided and actually gave us problems along the way.
One major issue we are facing is with paths and "global files". Let me explain:
There are some files that, for commodity reasons, we have on a single place and every SLN file on that Collection refers them. Those files are such ones as Code Analysis RuleSets, Signing Files (SNK), etc. So the change is made in one place only and it affects every build.
Well, in XAML Builds we have a Build that runs with CI that downloads (Gets) those files, and since we hammered-in the same exact pathing for TFS and Machine (with a environment variable for the beginning of the path), the path is the same on the Developers and Build machines. However, this creates dependencies between builds and workspace issues.
My question here is, is there a configuration that I am missing that allows referring to files in other branches other than the build one? Since I’m trying to keep the build machines as “disposable” as possible, it’s running with an Agent Config Out of the Box: No custom paths, no hardwiring.
I already tried referring the files directly with their source control path, for example. The only options I’m seeing are either creating a PowerShell/CMD Script that downloads those files right into the same folder as the SLN or keeping it “as it is” and use relative paths putting a “Build” Build Step before the actual Build Step so it downloads the files to the server.
Isn’t there an “Elegant” way of doing this? Or is our methodology wrong from the get go?
You can add a Copy Files step to copy the files that the build needs:

Qt/C++: How to deploy Qt application for windows

I tried to follow this link to deploy application for Windows, but I don't have the file configure and I am unable to run the command.
Any help ?
Skip the configure step. What you need is the windeployqt utility.
Afterwards you may need to remove some libraries your project doesn't use. For my projects, windeployqt insists to deploy a huge openglsw.dll (or something like that), even though I don't need it.
I also recommend simply copying the MSVC libraries into your distribution rather than installing from the supplied installer package. Just make sure you got all of them, the right version and for the right architecture.
If you use the Qt Network module, you may want to also deploy the OpenSSL binaries - you'll need them if you want to access HTTPS resources.
And my last advice - use Inno Setup for installer. It is well documented, very well written, very easy to use and produces no junk.
P. S. You could use one of my open source projects for reference, I have a script to copy all the necessary files into one folder and pack it into an installer using Inno Setup. I try to keep the scripts as simple and short as possible, no junk there.

Building Archive in Xcode does not create archive

It seems all my searches to figure this out are fruitless. Knowing me it's one stupid checkbox or pulldown I'm missing. Is it maybe my install? Do I need to uninstall Xcode 4 and reinstall?
I've gone through all these steps and tricks and fixes all over the net and on SO, yet nothing gets me closer to getting an archive to pop up in my organizer. When I go to look at the archive that was built, it's just a zero k file. I get a build succeed, I change skip install to both yes and no ... I do all these things I find on the net, I'm going crazy. I'm pretty sure my certificates are all set up correctly, I have things checked where I'm told to be checked. It's driving me crazy. 99% of the solutions I see are:
"Anyway, in the "Skip Install", set the value for "Release" as "NO" (the help doc told you the opposite). Once you set it to "NO", archive again. You'll immediately see your app showing up in the archive organizer."
Well, it's not working or any further answers after aren't either.
Archive only seems to include those build products that are set to be "installed", so make sure that you deactivate Skip Install in your build settings:
Go to BuildSettings.
Find "Skip Install".
Select "NO" for Release.
Additionally, Xcode needs an Install Path. For Applications this is usually /Applications, but when e.g. building a plugin you might want to set this to just /, which will put the build product in the root of your archive. Note that you must use a "real" path, not a relative one like ~/Library.
Make sure you use Product > Archive, instead of Product > Build For > Archive.
I had this issue after I updated to High Sierra. I went to my library folder. /Users/your_user/Library/Developer/Xcode/Archives
In this folder was an empty folder named to the date I had created this archive. But the folder was empty. I removed the folder and archived again. That fixed the issue for me.
For me, I had to also change the following blank build setting, to something like...
"Installation Directory" --> /Applications
Finally, it started appearing in Organizer/Archives.
P.S. Interestingly, without this setting the old archive file was being created, but it was always empty.
I just had this issue and what resolved it for me was this:
Verify Code Signing on the release is set to your Distribution Profile. I did this and it actually reverted it at one point. Make sure that setting wasn't reverted and try again.
You mentioned the "Skip Install" value, I also had similar results. Setting to YES would not open the archive list, setting to NO would.
Hope this helps (more that #1 above helps).
Go through this checklist, and you should find an answer somewhere:
Create a new scheme labeled "[App name]-AppStore"
Create a build configuration labeled "Distribution" by duplicating release
Click the project and hit the + under build configurations in the "Info" tab.
Set the archive to build as "Distribution" under the new scheme
Verify all certificates
Verify all provisioning profiles
Verify your private key under your name in your keychain. (in the system keychain)
Make sure that in the Distribution code signing, you are setting the profile to your iPhone/iPad distribution profile in ALL signing instances.
Make sure that in your project info, the Distribution code signing is set to your iPhone/iPad distribution profile.
Make sure that you have the option, skip install, in build settings of your target set to "NO" for Distribution.
Make sure that your currently selected scheme is "[App Name]-AppStore > iOS Device"
If nothing else, clean all builds, delete all old archive attempts, build for archiving, and if there are no other errors, try archiving again. One problem that I ran into was when I let XCode always allow signing with my private key. Simply deleting that and redownloading the certificates forced XCode to re-ask me to allow code signing. I only click allow now and I haven't had that problem ever again.
If you are still having problems, you should delete all of your provisioning, revoke all of your certificates, reissue them all, and reinstall them all. Try resetting your code signing after that, and if it still doesn't work, use one of your two free TSIs given to you by Apple Dev Support. If nothing works, they can fix it for you I'm sure.
Hope this helps.
I did the following to make it work for me:
I replaced some subprojects/static libraries i had (ie three20) by using cocoapods to include the files within the main project.. it just got rid of all the trouble three20 was giving me (and they are lots..)
set skip install to yes under build settings for all other sub projects/static libraries and switched the copy headers from public to project under build phases
most importantly: under the sub libraries.. under build phases i ensured that copy files destination was changed from Absolute path to products directory.
and that was it!
hint: to get an idea of the offending files that's causing your archive to create an archive file rather than an ipa do this:
Select the archive and click the Distribute button.
Select the 'Save Built Products' option.
Hit Next and Save.
Browse the created directory in Finder.
The 'libraries' subdirectory will identify the libraries that you need to set the Skip Install to Yes.
in some cases usr/local/include will identify the culprit header files you need to move from Public to Project or the files that you have to change from absolute path to products directory. but that directory (ie usr/local/include) varies depending on your sublibrary directory structure

How would I build Box2D to work in Code::Blocks/Mingw32(Windows)

hey the title pretty much says it all. i have been trying different methods from internet sources, but whenever i try something goes wrong..this is where i got Box2D
in cMake, i get a bunch of errors when building it(i was going through the steps in the readme.txt, but onfortunately, theyre for Visual C++...)
so im wondering hot to set this up as i guess a library (.lib or .a) and use it in my project(my friend passed me his library and when i loaded it in and tried #includeing the box2D headers, they didnt read at all(i got a list of undefined errors) also his box2d was i believe made for linux/unix so i think thats the reason...)
if anyone can help provide some steps that would be nice.
thanks for reading.
Assumptions:
You have installed cmake.
You have installed Code::Blocks/MinGW to C:\codeblocks.
You have downloaded Box2D and extracted it to C:\Box2D_v2.1.2.
If any of those are wrong, modify the paths to match what you have.
Start->Run->cmd.
Navigate to the Box2D "Build" folder:
cd C:\Box2D_v2.1.2\Box2D\Build
Create the makefiles:
cmake -G "MinGW Makefiles" ..
Do it:
mingw32-make
This will throw some warnings, but should work almost completely. Then, near the end, it will error trying to compile the Testbed. AFAIK, there is no way to compile the Testbed using MinGW (you have to use Visual Studio, I believe). Luckily, an .exe of it is available on the Box2D site.
In the Box2D\Build\Box2D folder, there should now be a file called libBox2D.a. Copy this file into C:\codeblocks\mingw\lib.
Copy the Box2D\Box2D folder (the one containing Box2D.h) into C:\codeblocks\mingw\include.
[Thus, after this step, you should have a file C:\codeblocks\mingw\include\Box2D\Box2d.h, and NOT C:\codeblocks\mingw\include\Box2d.h]
And that's it. You should be able to compile and run the "Hello Box2D" example. Don't forget to link to the library.
[EDIT]
From the looks of your error, I'm going to guess that your MinGW Path environment variable is not setup correctly. Which is unusual, since when you install Code::Blocks/MinGW it usually sets it for you, I believe.
Anyway, (these steps may vary slightly depending on your version of Windows):
Right-click on "[My] Computer"-> Properties -> Advanced System Settings
Click "Environment Variables"
Depending on which Windows you have, you may see User Variables and System Variables, or it may be just one group (I can't remember the name). Anyway, create a new System Environment Variable called MINGDIR, with the value C:\codeblocks\mingw or wherever you installed it to. Then, find the variable called Path (or PATH) and append this to the end: C:\codeblocks\mingw\bin. Put a semicolon at the end of the previous entry, and do not use a space.
Also make sure that C:\CMake\bin is present in either the System Variable called Path, or the user variable called Path. If not, append it to the end.
I think that's it.