Generating c# file from .proto file using protogen on pre build event - protocol-buffers

We've been using protobuf for a while at work and I decided to write a little console app for a client which would allow them to do some testing on site.
I started a new c# console app and downloaded google.protocolbuffers and protobuf-net from nuget.
What I'm trying to achieve is to turn my "messages.proto" file into "messages.cs"
I've tried to get the protobuf to build the messages file on a prebuild event but with no success, it seems the command arguments have changed since our first implementation. I followed the example here
http://code.google.com/p/protobuf-csharp-port/wiki/ProtoGen
And added the following pre build event
"$(projectdir)packages\Google.ProtocolBuffers.2.4.1.473\tools\protogen.exe" --proto_path=./protos protos/messages.proto --include_imports -output_directory=./
However I get the following error
Input file protos/messages.proto doesn't exist.
I've tried all sorts of combinations but nothing seems to work. Am I approaching this all wrong or is there a gotcha here? Any help much appreciated!

Have you tried using the absolute paths? I vaguely recall having a similar issue myself that turned out to be an issue with it not resolving relative paths correctly.

Related

MapBox SDK Download Not Authorized from build.gradle

I am trying to follow the instructions in the mapbox installation guide but I am getting the error:
{"message":"Not Authorized - No Token"}
I am reasonably confident that I am using the correct password - and have even generated a new one to be sure. I have tried both the private password (as recommended) and my public one. I have also hard-coded the password into my build.gradle file, just in case I was failing to get it from the properties file. This is incredibly frustrating since, clearly, until I get the SDK, I can't write any code :-(
This is a really shame, since the V10 SDK looks much better than previous versions and has more sample code, which looks like being a huge help!
I am using Android Studio V4.2.2 running on MacOS Big Sur 11.5.
In conclusion, my original error was due to me not following the advice on the mapbox website, by configuring a token/password with DOWNLOADS:READ scope. My investigation was greatly helped by #tim_yates' input, which lead me to write a shell script that tested the remote connection, using a command of the form:
curl -u mapbox:<token> -G <url>
This returned much more meaningful errors than the ones returned by gradle inside Android Studio.
Sadly, this is not the end, since it has now left me with a new tranche of errors. However, at least it has moved me me forward a bit ;-/

Cordova file plugin can't access the application directory on windows 8

Please help, I can't seem to get an answer for this anywhere.
If I use the Cordova file plugin to try and access the application directory on Windows 8, it always fails! Here is the basic code I am using:
window.resolveLocalFileSystemURL(cordova.file.dataDirectory + 'www/assets/images/image.png', gotFile, fail);
I have been using the same basic code on the Android and iOS versions of the app for some time now with no problem so I don't understand why the Windows 8 version doesn't like it.
Through console logs I can see that the link generated is in fact correct and it's actually exactly the same as one used to append the same image to the page (which works fine):
<img src="ms-appx:///www/assets/images/image.png">.
Can anyone please tell me why I can't use cordova.file.applicationDirectory with Windows? I know that folder is read only, I am just trying to read from it.
Note: I can use window.resolveLocalFileSystemURL with the cordova.file.applicationDirectory no problem at all, it works as expected. Its only the cordova.file.dataDirectory that always fails for me. The closest answer I could find was some people having trouble with the image paths of images saved from the camera plugin but that seems to have been a bug that was fixed by Cordova. If this is not a bug also then I'm assuming there is something really simple I can do to make the resolveLocalFileSystemURL work?
Thanks.
I found a solution to my problem by using 'windows.storage.storagefile', I had success with the following code:
Windows.Storage.StorageFile.getFileFromApplicationUriAsync(new Windows.Foundation.Uri('ms-appx:///www/test.html')).done(win, fail);
More info can be found here: msdn.microsoft.com/library/windows/apps/… I hope this helps some other people struggling with Windows 8 as I spent quite a time scratching my head about it and trying lots of different ways.
Cheers,
Stuart

BasicMediaPlayerPluginMac an example project by firebreath

I have followed the following steps:
ran prepmac.sh examples
tried to build the FireBreath.xcodeproj got a lot many errors then added two header files and SpriteKit/SpriteKit.h to the BasicMediaPlayerPluginMac.mm only then i was able to build the project on success i linked it to Library/InternetPlugins folder. On opening the html page for the media player it says plugin missing. Application of x-vnd.fbBasicMediaPlayer not found, cannot read the plugin as error. I tried adding two other frameworks namely coregraphics/coregraphics.h and cocoa/cocoa.h but the build was unsuccesfull. I'm trying to look into the plugin and how it is developed.
Start from simplest possible setup. Build FBTestPlugin, it should not require any changes to the setup. Put the plugin to /Library/Internet-Plug Ins and restart your browser before trying to load it by the html sample supplied.
Note that project files should be never modified explicitly, only through cmake files and prep-scripts.
Good luck, these plugins are not simple to develop :)

ngmin not working in windows

I am trying to minify all js files (start with controllers and app.js). As we know that regular minifier (uglify etc) won't work directly on angularjs files because of module declaration conventions.
So I tried using ngmin for that.
Concatenated all files and then tried using ngmin - but get this error ...
C:\Users\Rahul\AppData\Roaming\npm\node_modules\ngmin\node_modules\esprima\espri
ma.js:3872
throw e;
^
Error: Line 1007: Unexpected token *
at throwError (C:\Users\Rahul\AppData\Roaming\npm\node_modules\ngmin\node_mo
dules\esprima\esprima.js:1156:21)
at throwUnexpected (C:\Users\Rahul\AppData\Roaming\npm\node_modules\ngmin\no
de_modules\esprima\esprima.js:1213:9)
at parsePrimaryExpression (C:\Users\Rahul\AppData\Roaming\npm\node_modules\n
gmin\node_modules\esprima\esprima.js:1567:16)
at parseLeftHandSideExpressionAllowCall (C:\Users\Rahul\AppData\Roaming\npm\
node_modules\ngmin\node_modules\esprima\esprima.js:1644:61)
at parsePostfixExpression (C:\Users\Rahul\AppData\Roaming\npm\node_modules\n
gmin\node_modules\esprima\esprima.js:1703:20)
at parseUnaryExpression (C:\Users\Rahul\AppData\Roaming\npm\node_modules\ngm
in\node_modules\esprima\esprima.js:1784:16)
at parseMultiplicativeExpression (C:\Users\Rahul\AppData\Roaming\npm\node_mo
dules\ngmin\node_modules\esprima\esprima.js:1790:20)
at parseAdditiveExpression (C:\Users\Rahul\AppData\Roaming\npm\node_modules\
ngmin\node_modules\esprima\esprima.js:1807:20)
at parseShiftExpression (C:\Users\Rahul\AppData\Roaming\npm\node_modules\ngm
in\node_modules\esprima\esprima.js:1824:20)
at parseRelationalExpression (C:\Users\Rahul\AppData\Roaming\npm\node_module
s\ngmin\node_modules\esprima\esprima.js:1845:16)
I believe the issue is related to running ngmin in windows environment. I shall try it again with Mac - but trying to gauge if anybody faced this issue and able to find any work-around ?
Thanks in advance ...
It looks like this might be related to concatenating. It's most likely not a Windows issue (I've run ngmin on Windows just fine). There's an open issue for this: https://github.com/btford/grunt-ngmin/issues/12.
I know the recommendation is to run it once on a concatenated file, but you might want to try running ngmin prior to concatenation and see what happens. If that ends up fine, try to concatenate afterwards.

Running Umbraco source code in Windows 7 only produces login screen

I am trying to get started in development of my website and plugins using Umbraco. When I download the binaries from Codeplex, the installation and running of the website works fine. When I downloaded the source code, All I get is a login screen even when the web.config files are the same. Am I doing something wrong or is there something I missed.
The path I use to map IIS to is
branches\4.1.0\umbraco\presentation
You need to compile the source code to get it to work.
To be honest, you shouldn't need the full source unless you really want to start hacking around in the core (which may cause you problems with future updates) or you want to see how stuff works. The Umbraco framework is pretty extensible, I've not found too much so far that I couldn't do without having to touch the core source.
I had a similar issue when running the source and that was that the hashing of the admin password did not work. So i debugged it to see what value was expected and then changed it in the database.

Resources