How to change boost path - firebreath

I would like to recreate my build/ folder with prep2010.cmd and also set the boost folder to my own boost installation.
I run:
prep2010.cmd -D WITH_SYSTEM_BOOST=1 -D BOOST_ROOT="c:\boost"
But when I open the plugin solution the boost include folder is still set to firebreath's one. Am I missing something?
Thanks,
Christian

try:
prep2010.cmd "-DWITH_SYSTEM_BOOST=1" "-DBOOST_ROOT=C:\boost"
The windows prep scripts are a little funny; we haven't been able to figure out why they act that way, but if someone with more batch file experience than I have wants to fix them they are welcome to do so =]

Turns out I have to Boost_USE_STATIC_RUNTIME=off so findboost.cmake will be able to match my boost binaries. My boost libs use shared runtime libs.

Related

Can the Trinidad server use log files in development?

I'm working on an app that's served using Trinidad, and in development, the server defaults to pushing all of its output to stdout. This is making it very difficult to use a command line debugger (in my case Pry). Is there some way to make it use log files in dev the way that it does in prod? For reference, I'm using version 1.4.4 of Trinidad.
Alternatively, if there's some workaround for this in Pry, I'd love to learn about that too.
Thanks!
It turns out this was actually due to a logger monkey patch in my specific app, which was otherwise using log files. I was just thrown off by the Trinidad README on GitHub, which claims that printing to stdout is the default in dev.
If anyone has clever ideas for working around a situation like this using Pry and/or Unix utilities, please share anyway as that might be useful in other similar scenarios.

How to upgrade Magento 1.9.2.2 to 1.9.3.8 and security patch in localhost?

I am beginner Magento developer. I have worked on Magento 1.9.2.2. How to upgrade Magento 1.9.3.8 and security patch in my localhost?
Here is a quick and dirty method I sometimes use for upgrades. It is "dirty" because there are much better ways using version control and Composer.
Make a backup of your site. Lots of things can go wrong.
Download clean copies of 1.9.2.2 and 1.9.3.8 from the release archives. Extract them into sub-folders of your Magento folder, let's call them old and new for clarity.
Check for a file called app/etc/applied.patches.list. If it exists then download all those patches from the archive and apply them to the old folder. That folder should now be a pretty good representation of your actual site without any customisations.
Open a console (you are using Linux, right?), change to the Magento folder and run this command:
diff -ruN old new | patch -fp1
The -f option means 'force' and assumes common sense answers to any problems that might come up. Let's deal with the consequences of that.
Now find all file changes that were rejected:
find -name "*.rej"
Manually edit each file listed and copy-paste the new code into place. Rejects happen when a core file has already been altered and the patch program cannot work out what to do by itself. In my experience this is more common with older, badly managed sites. If you're lucky there may be none.
Flush Magento's caches. Upgrade scripts will automatically run and update the database. Test all aspects of your site and restore from backup if it is badly broken, otherwise:
Clean up temporary files:
find -name "*.rej" -delete
rm -rf old new

Composer could not find a composer.json file even when the file exists

I have installed Laravel and and I am playing around with it.
I am following the tutorial :-
http://geekanddummy.com/how-to-laravel-4-tutorial-part-3-using-external-libraries/
I need a new library and have added that in composer.json.
But when I run
php composer.phar update
I get the following message :-
Composer could not find a composer.json file in
What do I need to do to get this corrected..?
I'm the author of the tutorial you link to (hope our Laravel tutorial series is of some use, by the way). I can't quite tell from your answer whether you restored all the content of the original composer.json file when you created a new file of the same name...? You definitely shouldn't need to nuke the composer.json file and start again. As you probably know, that file contains all the Composer-based dependencies for your Laravel project, so you would of course lose significant functionality if you were to wipe it and leave anything out when you start again.
The error message looks to me like you're either in the wrong directory or it's a permissions problem with the composer.json file. It's too late to be certain now, but if you come across the problem again, try running:
chmod a+r composer.json
at the console/ssh shell before running composer update. This restores read permissions (for all users). You may also wish to check file ownership. (Both commands assume we're in a Unix/Linux system, so YMMV.)
Watch out also for instances where you're running a Composer command with the global parameter. This will cause an change that relates to wherever you've installed Composer, rather than the directory you're currently working in.
Note that you can also update using the --working-dir parameter, thus:
php composer.phar --working-dir=/path/to/laravel/project update
Hope this helps.
Rob
Deleting the existing composer.json after copying the content and then saving a new file with the same name works.
If your on windows (at least in my experience) you actually use just 'composer', not composer.phar/.json or any extension.
composer update
composer dump-autoload
This is all I need to type in to be able to access composer in my laravel directory.
i had the same issue, tried several many solutions that worked for others but not in my case.
then some-one told me to drop the 'php' and '.phar' from my command. i.e. directly use
composer update
composer create-project etc.etc.
and to my surprise it worked..
Occasionally, and for reasons that remain a bit vague, restarting the server seems to solve the issue. That step might be worth trying before making changes to file permissions.
Go to https://git-scm.com/download/win
Then download related version and run your composer command inside the git bash
Or else you can use vscode bash;
enter image description here

Can you recovered delete folders with sublime text 2?

I think i've deleted a whole folder by accident in sublime text 2. Is it possible to recover this deleted folder? I've checked my trash and nothing.
Using windows 7.
Same thing just happened to me.
Not to worry! Sublime does not permanently delete your files, but only moves them to trash (Recycle Bin). You will find your hard work sitting right there :)
See this reference for more information.
You can easily recover it from thrash / Recycle Bin folder on your machine.
Sublime or any other third party software never delete files permanently, in case of windows, it catches deleted files and move it to Recycle Bin.
In case you don't find in trash as in my case you can use "restore-trash" utility on linux. It can be installed using following command
sudo apt install trash-cli
After installing open command line and navigate to the folder.
Enter command
restore-trash
Choose the file which you wish to restore
If you are on windows, You can look at Recycle Bin.
Otherwise not possible without any advance tool.
Its gone buddy ! I did something similar and couldn't retrieve a file.
Anyway, not sure if it is going to help you but I wrote a simple SLT-plugin to back up modified files (locally and remote).
Local backup plugin:
class RemoteEdit(sublime_plugin.EventListener):
def on_post_save(self, view):
os.system('cp -r %s %s' % (view.file_name(), <backup_path>)) #use scp for remote backup

How to install MySQL Connector/C on Mac OS X?

I'm writing an app in C that requires MySQL interaction, so I downloaded the Connector/C archive from the official website, and it contains bin, lib and include folders, but I don't know where to install them.
I could copy the include files into my project folder, but where can I put the lib file so that my compiled binary (and other binaries) can find it?
Thanks in advance!
This is confusing, isn't it.. don't know why they don't make this more clear.
The lib/ files go in /usr/local/lib
The include/ files go in /usr/local/include
The bin/ files go in /usr/local/bin
The /usr/.. directory isn't visible through finder afaik so you have to go at it via commandline. Best of luck
Also, in your Xcode project, make sure you add a Linked Library by going to your Target's settings, General, then adding Linked Library "libmysqlclient.dylib"
Alternatively, to do everything on the commandline by "mv", you could also execute (on cmdline):
defaults write com.apple.finder AppleShowAllFiles TRUE
and
killall Finder
to make the hidden folder /usr (and everything else) visible.
After placing your connector files (like Nektarios explicitly discribed where) and closing all "hidden folder - finder windows", execute on your cmd:
defaults write com.apple.finder AppleShowAllFiles FALSE
and again
killall Finder
to hide what have to be hidden.