How to create a CMS that exports to a memory stick that could then update a presentation on another computer - content-management-system

I have been asked to provide a solution for a client of mine. They have asked me to build a presentation for a exhibition in a museum that can be updated. The presentation will essentially be galleries of images/videos with associated captions. This presentation computer will have a poor internet connection at best.
I see the best way forward for my client to update the presentation would be to have created a presentation on another computer. They need to do this remotely from exhibition and there will be no network connection between the CMS and presentation computer.
I need them to then be able to export the presentation file onto a USB stick that they could then take to the exhibition.
Once at the exhibition I would like them to be able to put the USB stick into the computer and then for it to automatically copy the information into a folder on the computer and also update a XML file.
What I'm wondering is what would be the best way to program this? I am pretty experienced Flash and PHP programmer and would normally get round allot of these problems by running it all on networked computers running stuff from servers. I know I could quite easily create a presentation system in flash that would load all the info from a folder but getting that folder from one computer to the other seamlessly is not something I'm familiar with. I really don't want the administrators of the system to have to manually copy a folder from one computer to another. It really needs to be click a button and it exports to USB and click a button and it imports from the USB. When it comes to creating programs that export files and copy folders to and from USB sticks I'm pretty lost!! Would this be something that needed done in C++ or something similar? Any advice would be great!
Many thanks for taking the time to read this!
Cheers,
Craig

I think there are several options for this but one that comes to mind is to install and run a complete stack with CMS, MySQL, webserver from a bootable USB drive/stick.
Also check http://portableapps.com/
http://bitnami.org/ may also have something for you.
Another option is to use a CMS that can export and import its content easily.
e.g. hhttp://share.ez.no/download-develop/downloads/
allows users to create content and that content ( or any section of it ) can be exported as zipped package for import into another instance of the CMS. Usually takes less than a minute each way ( unless the export is very large ). The CMS would be installed at both locations running on the local machine. They don't need to be both running the same OS stack.

Related

Unity Build - Standalone file

I have made a Unity build and would like to share it with colleagues.
But i dont want to share it as the standard "folder structure" -build.
So, I have made a single .exe file with an icon, using Winrar selfextracting file.
It works great....BUT Windows and antivirus apps screams bloody murder when they try and open it, thinking it is a potential virus of course.
That makes the file unusable for web sharing (Sharing on a USB drive there are no problems).
How can I make a single file build, for web download, that does not make Windows and Antivirus apps go crazy?
Basically...
You need to pack(age) the build of the app.
(Note the boxing app in the linked tutorial is just an example. There are many ways to pack the game into an executable, and you don't need that specific one.)
Depending on platform, it's also either required or recommended that you sign (1)(2) the app and/or executable.
That's not that trivial since antivirus hate selfextracting exe files ;)
Either go with the usual folder structure and ship it as a .zip.
Or you could go the correct but more complex way and create a proper Installer that correctly asks for admin permissions and then is allowed to extract content into the usual program paths.
Or you can try and use this but it might underly the same issue as the selfextracting exe.

Possible to programmatically copy files from a USB drive to a user's computer?

I am working on a solution to provide files to my vendors and was thinking that sending out USB thumb drives that would allow users to easily copy the files on the thumb drive to their computers. Of course, I want to make this as idiot-proof as possible so I would like to do it programatically. My initial thought was to make a bootable USB drive with an autorun.ini file which would, in turn, launch a batch file which would copy the files to their computer. However, after a bit of research, I have discovered that Windows 7 and later does not support autorun.
So my next thought was to maybe use Javascript or some other language to do this for me but I have not found any solutions.
Is it possible to programmatically copy files from a USB drive to a users computer? It can be user initiated, just want it to be something simple like a button they click and then a pop-up asks them where they want to save the files on their computer.
make the batch file and instead of activating it with autorun.ini make them execute it manually or from windows+r "h:\batch.bat"

Packaging a GWT app to run completely offline NOT installed via a "marketplace"

Theres a few questions similar to this, so I'll try to be clear as possible.
We have an existing, fairly large and complex, GWT webgame I have been asked to make work offline. It has to be offline in pretty much the strictest sense.
Imagine we have been told to make it work off a CD Rom.
So installation is allowed, but we cant expect the users to go to a Chrome/Firefox store and install it from there. It would need to be off the disc.
Likewise, altering of the browsers start-up flags would be unreasonable to expect of users.
Ideally, it would be nice if they just clicked a HTML file for the start page and it opened in their browsers of choice.
We successfully got it working this way in Firefox by adding;
"<add-linker name='xsiframe' />"
To our gwt.xml settings. This seems to solve any security issues FF has with local file access.
However, this does not solve the problem for Chrome.
The main game starts up, but various file requests are blocked due to security issues like these;
XMLHttpRequest cannot load file:///E:/Game%20projects/[Thorn]%20Game/ThornGame/text/messages_en.properties. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.MyApplication-0.js:34053 com_google_gwt_http_client_RequestBuilder_$doSend__Lcom_google_gwt_http_client_RequestBuilder_2Ljava_lang_String_2Lcom_google_gwt_http_client_RequestCallback_2Lcom_google_gwt_http_client_Request_2 MyApplication-0.js:34053
Now I was aware same origin policy issues might popup as during development we often tested locally using flags in chrome to bi-pass them.
Thing is...now I dont know how to get around them when we cant use startup flags.
Obviously in the example given its just the .properties file GWT uses to get some language related text. I could dump that inline in one way or another.
However, its only one of many,many,many files being blocked.
The whole game was made to run off *.txt game scripts on the sever - to allow easy updating by non-coders. Really the actual GWT code is just an "engine" and all the XMLHttpRequested files supply the actual "game".
These files are of various types; csv, txt, ntlist, jam.
The last two being custom extensions for what are really just txt files.
All these files are blocked by chromes security. It seems from what I can make out only images are allowed to be accessed locally.
Having all these files compiled in would just be impossible, as they are not fixed in number (ie, one central .txt file determains various scene .txt files which in turn determain various object files and directory's...).
Putting all this into a bundle would be nightmare to create and maintain.
So in essence I need some way to supply a offline version of a GWT project that can access a large number of various files in its subdirectories without security issues.
So far all I can think of is;
A) Theres something I can tell chrome via html or gwt that allows these files to be read in Chrome like FF can. (I suspect this isn't possible).
An alternative to XMLHttpRequest maybe?
B) I need to somehow package a game+a webbrowser in a executable package that has permission to access files in its directory's. (http://www.appcelerator.com/titanium ? ?? ).
C) I need to package and have the user run a full webserver that can then deliver all these files in a XMLHttp accessible way.
D) Bit of a funny one...we cant tell the user to add flags to browser start up...but Maybe I could write a game installer which just detects if they have Chrome or Firefox. It then opens up the games html in their browser with the correct flags for them? This would open up security issues if they browse elsewhere with that instance though, so Id presumably need other flags to disable the url bar if that's possible.
I am happy to make various changes to our code to achieve any of this - but as mentioned above theres no way to determain all the files needing to be accessed at compile time.
And finally, of course, it all has to be as easy as possible for the end user.
Ideally just clicking a html file, or installing something no more complex then a standard windows program.
Thanks for reading this rather long explanation, any pointers and ideas would be very welcome. I especially will appreciate multiple different options or feedback from anyone that's done this.
========================================
I accepted the suggestion to use Chromiumembedded below.
This works and does what I need (and much much more)
To help others that might want to use it, I specifically made two critical changes to the example project;
Because CEF needs a absolute path to the web apps local html, I wrote a c++ function to get the directory the .exe was launched from. This was a platform specific implementation, so if supporting a few OS's (which CEF does) be sure to write dedicated code for each.
Because my webapp will make use of local files, I enabled the Chrome flag for this by changing the browser settings;
browser_settings.file_access_from_file_urls = STATE_ENABLED;
These two changes were enough to get my app working, but it is obviously the bare minimum to make a application. Hopefully my finding will help others.
I'd suggest going the wrapper route. That is, provide a minimal browser implementation that opens your files directly. Options are Chromium Embedded[1]. If the nature of the application absolutely requires the files to be served as non-file urls then bundle a minimal webserver, have the on-disk executable start the server and open the bundled browser with whatever startup arguments you want.
[1] https://bitbucket.org/chromiumembedded/cef

Command line arguments for Scratch 1.4

I'm using Scratch 1.4 for preparing a course for children.
The course is about controlling real devices (self built traffic lights, modified toys having motors, sensors, etc.)
For interfacing the hardware I'm using the Remote Sensor Protocol and the control-lines of a RS232 interface (3-in/3-out, all digital).
Everything works great, except small inconveniences:
The children have to do many steps manually:
start scratch first,
load a template project which enables remote sensor protocol and defines variables
accept the warning message notifying, that remote sensor protocol is enabled
start RSP-RS232 proxy
I'd like to simplify it by starting scratch from my tool, ask Scratch to perform steps 2,3 by command-line arguments and finally connect to the RSP port.
Is it possible?
If not, is it hard to implement these parameters in Smalltalk for someone with no Smalltalk experience (but other languages like C++)?
Thank you!
Ok, after some readings I could answer my question.
Bad news is: there is obviously no command line argument in Scratch passing a project-file as a start-project.
However good news is, it is not difficult to change the scratch for own needs. Several projects do it, e.g.:
Scratch 4 Arduino
Scratch GPIO
How to do it is described here:
http://wiki.scratch.mit.edu/wiki/Scratch_1.4_Source_Code
Scratch and Squeak
...
To get started, first copy the Scratch application ("Scratch.exe" or
"Scratch.app") from your normal Scratch folder into the Scratch source
code folder. (The Scratch application is actually just a Squeak
virtual machine, so any recent Squeak virtual machine should also
work.) Also, put copy of the Squeak source code file in that folder if
needed (this file is included in the zip file starting with the 1.4
source release). Finally, drop the file "ScratchSourceCode1.4.image"
onto the Scratch application. The Squeak programming environment will
start up, allowing you to view and modify the Scratch source code.
I was able to disable the dialogue notifying that remote sensors protocol is enabled
and to enable remote sensors at start by default. Took me 2 hours.
P.S.:
For those interested, I host my project here: https://github.com/vheinitz/Qratzfest
As I've found out, my Idea was not new (I've looked for this possibility about 3 years ago, but there was nothing). What is different, the proxy-tool is for PC, and is intended to use any hardware, not dedicated only to a specially firmwared Arduino or PI. Currently only control-pins of a serial interface are supported and linked to fixed names.
Soon it will provide the possibility to map any pin to any Scratch-variable.

How to make Custom Application to persist reboot of WinCE 6.0 OS?

I am looking for a solution on how to setup the Windows CE 6.0 design image to integrate my custom application.
I want after building the image and starting it on the target machine to be able
to access my application from the \Hard Disk\Program Files\CustomApp folder.
In addition I require the application to be persistent. It must not be lost after reboot.
I am aware of copying the application to the Hard Disk out of the NK.BIN but if is possible I want a solution like adding dlls or other files to Windows folder.
I am usign an SQL CE database along with the application so I want the data to be persistent too.
Thanks in advance.
If the \Hard Disk folder contents are not persistent (and I assume they aren't since you're asking this questions), then getting the app to "persist" can be done only as a slight-of-hand trick, just like the contents of the Windows Folder. At boot, the OS will get expanded into RAM, and if you've included your app in that OS, it will get extracted too.
First, you must include your app files (exe, dlls, all dependencies, etc) into the OS image by adding them to a BIB file.
Next, you must understand that all files get extracted to the \Windows folder. There are no exceptions. If you want it in a different folder, you must use a DAT file to tell the OS where to put it one the OS has been extracted. Be aware that the DAT file does a copy, not a move, so if you want it elsewhere, you'll have two copies of the app on the device. A typical solution is to use the DAT file to place a shortcut, not a full copy.
The last part of your question is the hard, or maybe impossible, part. Your database is not going to persist. You could include a copy in the OS, but every time you hard reset, a new copy of the database as it was when the OS was built will get copied out. No new data will survive.
To get that to work, you need a persistent file store on the device. If you're the OEM, you might be able to implement one with any remaining on-board storage (where the OS image file resides) or with separate mounted USB/CF/SD/HDD media. How you do this is highly hardware and BSP dependent, plus it's way more complex than can be described here on SO.Without knowing anything about the target device, it difficult to even give you any pointer on where to begin. Here's a very generic starting point for Flash storage.