import adobe xd file to c++ project - c++

so im working on a bot and made an interface for it in adobe xd. My question is: can I import it to a c++ project somehow to be an executable. Im asking this because Ive only seen it used in webpages and not in an actual exe

The AdobeXd project file is an actual zip file. If you rename it to a ".zip" you can open it and see a bunch of json files, folders and images.
The artboards are in the manifest file and each will have a PATH value
Each artboard is in artwork/PATH/graphics/graphicContent.agc
The symbols/components are in the resources/graphics/graphicContent.agc file
The images are in the resources folder

Unless you're willing to write a parser for the Adobe XD file format, code to render it and code to process events to this gui, you should consider it "not possible".

Related

A Qt spreadsheet app shows stored files like unknown ones

Here is the program and below is the screenshot of the issue.
I using Qt Installer Framework (QtIFW2.0.1) created an installer for that Qt app (the spreadsheet). Then installed it on my PC. Now when I create a New File and then save it on the Desktop (Windows 7 x64), the app handles the file but its shape is like unknown files!
Here are some samples:
I searched on the web and did these:
I edited the package.xml file and changed all #component.addOperation to #component.addElevatedOperation in the installscript file.
There were three operations all for creating shortcuts.
Now I seemingly should add this line of code into the code:
addElevatedOperation("GlobalConfig", "SystemScope", "Company", "App", "key", "value")
My question is, is it sufficient to solve the issue? And if so, where in the code, what .h or .cpp file to use it into, please?
If any other file is needed I will pleasantly upload it.

How to write a file in to an OS X app Resources folder?

I have an xcode project, the used language is C++. while my program is running writes a txt file in to
My App.app/Contents/Resources/
folder using fstream. After a month pause don't work anymore. Nothing is modified on the project but the OS X is updated. The file path is ok, i can read the file. What is wrong?
You should not write into your app bundle, and instead use one of the following folders to store files, which can be obtained using NSSearchPathForDirectoriesInDomains:
Document folder (NSDocumentDirectory).
Application Support folder (NSApplicationSupportDirectory).
Caches folder (NSCachesDirectory).
If you write to your app bundle you will cause issues with the code signing of the app and might not even have write access, if it's installed in the default location (/Applications).

How to add and use .zip (or .pak) files to c++ project?

I'm compiling CEF (Chromium Embedded Framework) for our local html5 presentation.
I should say I'm very new for all this (CEF and C++).
I've already optimized cefclient project for the presentation, but I need to embed all html/js/css/etc files into project (reading from local storage is not an option).
As I understood, I should use .zip or .pak (renamed zip) files to embed. But how can I use them inside the project?
Should I use some lib for unzipping (zlib?) or there is another popular way? And how can I be sure that files will be compiled into project?
Sorry for such basic questions but there are very few information about this (or google hates me today).
Thank you for any help!
UPD: found great tool - WBEA (http://asterclick.drclue.net/WBEA.html), it looks like exactly what I want to, but works pretty slow (with JS).
UPD 2: It turns out that there are many ways to make HTML5 desktop application, for example Node-Webkit.
Here is an article that compares some of them http://clintberry.com/2013/html5-apps-desktop-2013/
You need:
Create zip file whitin your resources.
Embed it as win32 resource (after this step you will get correct executable with .zip file inside).
Create custom scheme handler to access this zip file.
CefZipReader class will be handly to implement handler from step 3.
Look around, may be something like what you want already exist somewhere.
This sounds very similar to self extracting installers.
No need to compile anything, just concatenate the zip to the end of the executable. All you need to do is find the offset at runtime from the start of the executable. This can be done easily by writing a large magic number and looking for it later.
Example Linux:
cat app magic_number data > new_app
Example Windows:
copy app.exe /B + magic.dat /B + data.dat /B new_app.exe

Open pdf,txt,doc,jpg etc files in a popup using jQuery and coldfusion

I am working on a small project and I have a file links to download from server. However, instead of downloading the file I want them open in fixed size pop up. I tried facebox but facebox(http://defunkt.io/facebox/) fail to display pdf files and other text files. any one have any idea what I suppose to do in order to accomplish this task.
Thanks you

PyAIML not loading startup

I am beginning a project on Python that implements PyAIML and I wrote the following code to create a brain for my project:
import aiml
k=aiml.Kernel()
k.learn("std-startup.xml")
k.respond("LOAD AIML B")
k.saveBrain("jarvis.brn")
When I run the program I get this error: WARNING: No match found for input: LOAD AIML B
I understand that I needed to download an AIML set to begin development. So I did, but I'm stuck there.
Please help. I'm a noob programmer so don't be rough on me for this dumb mistake.
Thanks in advance!
The .learn() method will not throw an error if the file you pass it does not exist, and I'm guessing that you are trying to learn patterns from "std-startup.xml" without having this file in your directory.
Make sure the file std-startup.xml is in the directory you are running your script from. You should also have a directory called standard in your working directory that contains the standard set of aiml files. Basically your directory should look like this:
mydir/my_script.py
mydir/std-startup.xml
mydir/standard/a-bunch-of-std-aiml-files.aiml
These files can be found in the "Other Files/Standard AIML Set/" folder on the pyaiml source forge site. Go to that folder and download the one of the tarballs or the zip.
A few things:
If your AIML is loading properly, pyAIML will respond with a line that will read something like:
Loading std-startup.aiml... done (1.00 seconds)
It will not necessarily throw an error if it does not find a file to load, so if you don't see this line, pyAIML has not loaded the AIML file.
I don't see 'std-startup.xml' in the sourceforge directory either, but this shouldn't matter. All that you're loading is any AIML file that will allow you to test the kernel. Try loading the 'self-test.aiml' file in the /aiml directory instead. (Double-check to make sure the file suffix in your code is .aiml and not .xml)
k.respond() is for giving the bot some input and 'LOAD AIML B' is just a test phrase. Once you've loaded 'self-test.aiml' try k.respond('test date') and you should get
The date is Wed Mar 13 01:37:07 2013 in response.