cross-platform

Run a C executable in another distro

夙愿已清 提交于 2019-12-06 14:20:46
I have a C program that I'm developing using Ubuntu 11.10 (Linux version 3.0.0-12-generic-pae kernel). I need to run that program in a cluster that has Debian 3.1 (Linux version 2.4.24-om2) installed, and uses Intel(R) Pentium(R) 4 CPU 3.20GHz processors. The problem is that I can't compile in the Debian cluster because it doesn't have installed the GSL library that my program needs, and I don't know how to install it (or make use of it) without root privileges. If I try to run the executable I compiled in Ubuntu (or a simple hello world program, for the case), it doesn't work, even if I

How to disable outside clicks while an element is visible?

人走茶凉 提交于 2019-12-06 14:18:12
问题 I have a div, divDialog, that contains a simple dialog box. It begins life invisible, but at a certain point I make it visible. The page has several other elements on it (menus, etc.) that have event listeners for the click event. My question is, once divDialog is visible, how can I disable all click events for everything except divDialog? Of course, once divDialog is invisible again, I'd like to restore all listeners to normal behavior. I read this elegant answer, but it doesn't disable

WxPython: Cross-Platform Way to Conform Ok/Cancel Button Order

自古美人都是妖i 提交于 2019-12-06 13:15:19
I'm learning wxPython so most of the libraries and classes are new to me. I'm creating a Preferences dialog class but don't know the best way to make sure the OK/Cancel (or Save/Close) buttons are in the correct order for the platform. This program is intended to run both on GNOME and Windows, so I want to make sure that the buttons are in the correct order for each platform. Does wxPython provide functionality that prevents me from doing a if platform.system() == 'Linux' kind of hack? The appearance of a dialog can change only if you use stock dialogs (like wx.FileDialog), if you make your

Compiling windows binaries from Ubuntu?

对着背影说爱祢 提交于 2019-12-06 12:15:00
问题 I am doing a cross-platform C (not ++) game with both linux (main) and windows (alternate) binaries. Until now I used devcpp to compile in windows, but I have trouble getting some libraries to work right, and I heard it is possible to compile a windows binary from withing Linux. However, I don't know where to get started. The game uses a few libraries (GLEW, GL, SDL, SDL_mixer, SDL_image and Lua 5.1) that would clutter the distribution directory though, so is it possible to make a static

Cross platform C++ filesystem watcher

人盡茶涼 提交于 2019-12-06 12:12:47
I'm looking for a cross platform file system watcher, similar to the FileSystemWatcher class in .NET. As it's for a daemon/service, I'm not keen on Qt's QFileSystemWatcher . I'd really like to avoid it as I don't want to have a dependency on Qt as my program is going to be a daemon. I've also seen a proposal for such a class to be included in Boost, but as far as I know such a class has not yet been included. Is there a cross platform C++ file system watcher? Qt is divided into modules , so using this feature doesn't mean you have to use the GUI library. QFileSystemWatcher is in QtCore , which

Is there any crossplatform GUI library for C language? [duplicate]

不想你离开。 提交于 2019-12-06 11:43:40
问题 This question already has answers here : Closed 9 years ago . Possible Duplicate: Cross Platform C library for GUI Apps? Is there any crossplatform GUI library for C language? (I mean at least win mac lin) If there is any XML-like GUI editing model, any GUI editing crossplatform visual programms it'l be grate!) 回答1: I use Gtk a lot it is consistent and nice to use. It was formerly used as a common platform for Gimp but became widely used and is the base toolkit for the Gnome desktop under

Supporting SWT on Windows/Mac & 32bit/64bit

核能气质少年 提交于 2019-12-06 11:27:52
I'm currently working with the DJProject to put a browser into my Java Swing application. DJProject uses SWT to run and I have very little experience with SWT. I want to support Windows and Mac both 32bit and 64bit. I understand there is a swt.jar file for each of these platforms. I have all 4 swt.jar libraries added to my classpath as a library to the main application. My problem is when I try running the application on a Mac for example I get the error: Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM how would I go about to

How to change the file's permission and last modified in Java?

假装没事ソ 提交于 2019-12-06 11:07:21
To my knowledge, Java's File class does not support to change the file's permission and last modified date. Is there any proper way to do this in a cross-platform style? I'm looking at the Java 6 documentation , and there is a setLastModified() method, as well as setReadable(...) and setWritable(...) and setExecutable(...) methods (all in the java.io.File class). So yes, there is a way... 来源: https://stackoverflow.com/questions/459622/how-to-change-the-files-permission-and-last-modified-in-java

Application to generate installers for Linux, Windows and MacOSX from a single configuration

ε祈祈猫儿з 提交于 2019-12-06 09:49:42
问题 Here's what I want: Given a set of definitions (preferably in Python) on what files to install where and what post-install script to run, etc.. I would like this program to generate installers for the three major platforms: MSI on Windows dmg on MacOSX Tarball w/ install.sh (and rpm/deb, if possible) on Linux For example, installconfig.py: name = 'Foo' version = '1.0' components = { 'core': {'recursive-include': 'image/' 'target_dir': '$APPDIR'} 'plugins': {'recursive-include': 'contrib

How to identify/handle text file newlines in Java?

夙愿已清 提交于 2019-12-06 09:03:39
问题 I get files in different formats coming from different systems that I need to import into our database. Part of the import process it to check the line length to make sure the format is correct. We seem to be having issues with files coming from UNIX systems where one character is added. I suspect this is due to the return carriage being encoded differently on UNIX and windows platform. Is there a way to detect on which file system a file was created, other than checking the last character on