Questions tagged [multiplatform]

Software and methods said to be platform independent.

Also referred to as cross-platform, is an attribute of computer software that is implemented to inter-operate on multiple computer platforms (hardware architecture, an operating system (OS) and runtime libraries).

http://en.wikipedia.org/wiki/Cross-platform

486 questions
548
votes
20 answers

Programmatically find the number of cores on a machine

Is there a way to determine how many cores a machine has from C/C++ in a platform-independent way? If no such thing exists, what about determining it per-platform (Windows/*nix/Mac)?
hazzen
  • 17,128
  • 6
  • 41
  • 33
185
votes
7 answers

Bash/sh - difference between && and ;

I normally use ; to combine more than one command in a line, but some people prefer &&. Is there any difference? For example, cd ~; cd - and cd ~ && cd - seems to make the same thing. What version is more portable, e.g. will be supported by a…
psihodelia
  • 29,566
  • 35
  • 108
  • 157
174
votes
7 answers

Forcing docker to use linux/amd64 platform by default on macOS

Current beta version of docker requires you to specify a --platform=linux/amd64 each time you need to build or run an amd64 image/container. The documentation mentions When running an image with multi-architecture support, docker will automatically…
Vojtech Letal
  • 2,168
  • 3
  • 13
  • 17
134
votes
10 answers

How can I beautify JavaScript code using Command Line?

I am writing a batch script in order to beautify JavaScript code. It needs to work on both Windows and Linux. How can I beautify JavaScript code using the command line tools?
grom
  • 15,842
  • 19
  • 64
  • 67
65
votes
7 answers

Initializing a union with a non-trivial constructor

I have a structure which I create a custom constructor to initialize the members to 0's. I've seen in older compilers that when in release mode, without doing a memset to 0, the values are not initialized. I now want to use this structure in a…
Superpolock
  • 3,515
  • 7
  • 30
  • 24
55
votes
9 answers

cross-platform scripting for windows, Linux, MacOS X

I'm looking for cross-platform scripting (language) for windows, Linux, MacOS X. I'm tired of .bat / bash . I would like to do things like for example ,,lock workstation'' at automatic login (I had this in X-Window but the solution was pretty ugly;…
KarolDepka
  • 8,318
  • 10
  • 45
  • 58
46
votes
4 answers

R: determine if a script is running in Windows or Linux

Is there a simple way to programmatically determine if an R script is being executed in Windows vs. Linux?
JD Long
  • 59,675
  • 58
  • 202
  • 294
31
votes
5 answers

What version of the .NET framework is installed on Windows XP, Vista, and 7?

I have an application that uses the .NET framework 3.5. I am building this application for a college to help students to study. Most students usually have Windows XP SP2, Windows Vista, or Windows 7. (Sorry Mac users! The Mac version will come out…
Mohit Deshpande
  • 53,877
  • 76
  • 193
  • 251
23
votes
1 answer

Recursively copy files cross-platform via npm script

We have within a package.json build script a copy command (no we cant quickly change that). Is there any solution we can make this work multiplatform with the same syntax easily? I looked in several npm copy packages, but they don't transpile from…
fredalex
  • 433
  • 5
  • 15
21
votes
1 answer

Can I load resources from a Kotlin common module (multiplatform project)

I am porting a maven JVM Kotlin project to a gradle multiplatform Kotlin project. After creating the default Kotlin multiplatform project from Intellij IDEA, I notice there is a resources directory, but the only way I know how to load from the…
Sean
  • 311
  • 1
  • 6
21
votes
1 answer

QTouchEvent instead QMouseEvent on Linux

I am trying to handle QTouchEvent from M3 touchscreen in Qt 5.9. I use Qt Finger Print example and it works fine on Windows 7 but on Ubuntu 16.04 I receive mouse events instead of touch events. Is it Qt's fault or wrong OS configuration? What is…
Mariusz Jaskółka
  • 4,137
  • 2
  • 21
  • 47
20
votes
6 answers

What is the optimal multiplatform way of dealing with Unicode strings under C++?

I know that there are already several questions on StackOverflow about std::string versus std::wstring or similar but none of them proposed a full solution. In order to obtain a good answer I should define the requirements: multiplatform usage,…
sorin
  • 161,544
  • 178
  • 535
  • 806
20
votes
3 answers

Multi-framework NuGet build with symbols for internal dependency management

Maybe I'm pushing the envelope here, but I'm desperate to leverage NuGet to ease the DLL Hell that I've found myself in. We have 4 main products that all live in interrelated Mercurial repositories. All of them "share" 3 core assemblies and then…
David Boike
  • 18,545
  • 7
  • 59
  • 94
16
votes
4 answers

Visual Studio: how to check used C++ platform toolset programmatically

I have to build project using MSVC2012 and v100 platform toolset (from MSVC2010). Unfortunately I'm using C++11 feature "range based for" across the code. I wondering if there is a preprocessor directive that allows to know current platform toolset…
Serhii
  • 405
  • 1
  • 4
  • 11
14
votes
1 answer

App Sandbox blocking FirebaseApp.configure() on macOS with SwiftUI

I am writing an app for both macOS and iOS. When I started my multiplatform project, I decided to see if the Firebase SDKs work with macOS, because I have seen this error before: tvOS and macOS SDK support is not part of the official Firebase…
Tahmid Azam
  • 566
  • 4
  • 16
1
2 3
32 33