mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 21:35:30 +03:00
Merge remote-tracking branch 'origin/master' into dzikuvx-global-functions-ui
This commit is contained in:
commit
dd551f5ecb
4 changed files with 74 additions and 16 deletions
16
entitlements.plist
Normal file
16
entitlements.plist
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-jit</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
66
gulpfile.js
66
gulpfile.js
|
@ -165,18 +165,31 @@ function get_task_name(key) {
|
||||||
return 'build-' + key.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();});
|
return 'build-' + key.replace(/([A-Z])/g, function($1){return "-"+$1.toLowerCase();});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getArguments() {
|
||||||
|
return minimist(process.argv.slice(2));
|
||||||
|
}
|
||||||
|
|
||||||
function getPlatforms() {
|
function getPlatforms() {
|
||||||
var defaultPlatforms = ['win32', 'win64', 'osx64', 'linux32', 'linux64'];
|
const defaultPlatforms = ['win32', 'win64', 'osx64', 'linux32', 'linux64'];
|
||||||
var argv = minimist(process.argv.slice(2));
|
const platform = getArguments().platform;
|
||||||
if (argv.platform) {
|
if (platform) {
|
||||||
if (defaultPlatforms.indexOf(argv.platform) < 0) {
|
if (defaultPlatforms.indexOf(platform) < 0) {
|
||||||
throw "Invalid platform '" + argv.platform + "'. Available ones are: " + defaultPlatforms;
|
throw new Error(`Invalid platform "${platform}". Available ones are: ${defaultPlatforms}`)
|
||||||
}
|
}
|
||||||
return [argv.platform];
|
return [platform];
|
||||||
}
|
}
|
||||||
return defaultPlatforms;
|
return defaultPlatforms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function execSync() {
|
||||||
|
const cmd = arguments[0];
|
||||||
|
const args = Array.prototype.slice.call(arguments, 1);
|
||||||
|
const result = child_process.spawnSync(cmd, args, {stdio: 'inherit'});
|
||||||
|
if (result.error) {
|
||||||
|
throw result.error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Define build tasks dynamically based on the sources
|
// Define build tasks dynamically based on the sources
|
||||||
// and output variables.
|
// and output variables.
|
||||||
var buildCssTasks = [];
|
var buildCssTasks = [];
|
||||||
|
@ -293,15 +306,28 @@ gulp.task('release-win64', function() {
|
||||||
return archive.finalize();
|
return archive.finalize();
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task('release-osx64', function() {
|
gulp.task('release-osx64', function(done) {
|
||||||
var pkg = require('./package.json');
|
var pkg = require('./package.json');
|
||||||
var src = path.join(appsDir, pkg.name, 'osx64', pkg.name + '.app');
|
var src = path.join(appsDir, pkg.name, 'osx64', pkg.name + '.app');
|
||||||
// Check if we want to sign the .app bundle
|
// Check if we want to sign the .app bundle
|
||||||
if (process.env.CODESIGN_IDENTITY) {
|
if (getArguments().codesign) {
|
||||||
var sign_cmd = 'codesign --verbose --force --sign "' + process.env.CODESIGN_IDENTITY + '" ' + src;
|
// macapptool can be downloaded from
|
||||||
child_process.execSync(sign_cmd);
|
// https://github.com/fiam/macapptool
|
||||||
|
//
|
||||||
|
// Make sure the bundle is well formed
|
||||||
|
execSync('macapptool', '-v', '1', 'fix', src);
|
||||||
|
// Sign
|
||||||
|
const codesignArgs = ['macapptool', '-v', '1', 'sign'];
|
||||||
|
const codesignIdentity = getArguments()['codesign-identity'];
|
||||||
|
if (codesignIdentity) {
|
||||||
|
codesignArgs.push('-i', codesignIdentity);
|
||||||
|
}
|
||||||
|
codesignArgs.push('-e', 'entitlements.plist');
|
||||||
|
codesignArgs.push(src)
|
||||||
|
execSync.apply(this, codesignArgs);
|
||||||
}
|
}
|
||||||
var output = fs.createWriteStream(path.join(appsDir, get_release_filename('macOS', 'zip')));
|
const zipFilename = path.join(appsDir, get_release_filename('macOS', 'zip'));
|
||||||
|
var output = fs.createWriteStream(zipFilename);
|
||||||
var archive = archiver('zip', {
|
var archive = archiver('zip', {
|
||||||
zlib: { level: 9 }
|
zlib: { level: 9 }
|
||||||
});
|
});
|
||||||
|
@ -309,7 +335,23 @@ gulp.task('release-osx64', function() {
|
||||||
archive.on('error', function(err) { throw err; });
|
archive.on('error', function(err) { throw err; });
|
||||||
archive.pipe(output);
|
archive.pipe(output);
|
||||||
archive.directory(src, 'INAV Configurator.app');
|
archive.directory(src, 'INAV Configurator.app');
|
||||||
return archive.finalize();
|
output.on('close', function() {
|
||||||
|
if (getArguments().notarize) {
|
||||||
|
const notarizeArgs = ['macapptool', '-v', '1', 'notarize'];
|
||||||
|
const notarizationUsername = getArguments()['notarization-username'];
|
||||||
|
if (notarizationUsername) {
|
||||||
|
notarizeArgs.push('-u', notarizationUsername)
|
||||||
|
}
|
||||||
|
const notarizationPassword = getArguments()['notarization-password'];
|
||||||
|
if (notarizationPassword) {
|
||||||
|
notarizeArgs.push('-p', notarizationPassword)
|
||||||
|
}
|
||||||
|
notarizeArgs.push(zipFilename)
|
||||||
|
execSync.apply(this, notarizeArgs);
|
||||||
|
}
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
archive.finalize();
|
||||||
});
|
});
|
||||||
|
|
||||||
function releaseLinux(bits) {
|
function releaseLinux(bits) {
|
||||||
|
|
4
js/fc.js
4
js/fc.js
|
@ -66,10 +66,10 @@ var FC = {
|
||||||
MAX_SERVO_RATE: 125,
|
MAX_SERVO_RATE: 125,
|
||||||
MIN_SERVO_RATE: 0,
|
MIN_SERVO_RATE: 0,
|
||||||
isRpyFfComponentUsed: function () {
|
isRpyFfComponentUsed: function () {
|
||||||
return MIXER_CONFIG.platformType == PLATFORM_AIRPLANE;
|
return MIXER_CONFIG.platformType == PLATFORM_AIRPLANE || MIXER_CONFIG.platformType == PLATFORM_ROVER || MIXER_CONFIG.platformType == PLATFORM_BOAT;
|
||||||
},
|
},
|
||||||
isRpyDComponentUsed: function () {
|
isRpyDComponentUsed: function () {
|
||||||
return MIXER_CONFIG.platformType != PLATFORM_AIRPLANE;
|
return !FC.isRpyFfComponentUsed();
|
||||||
},
|
},
|
||||||
resetState: function () {
|
resetState: function () {
|
||||||
SENSOR_STATUS = {
|
SENSOR_STATUS = {
|
||||||
|
|
|
@ -128,7 +128,7 @@ function localizeAxisNames() {
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$(".button-enable").click(function() {
|
$("a.button-enable").click(function() {
|
||||||
var
|
var
|
||||||
shrinkHeight = $(".warning").height();
|
shrinkHeight = $(".warning").height();
|
||||||
|
|
||||||
|
@ -190,4 +190,4 @@ $(document).ready(function() {
|
||||||
updateControlPositions();
|
updateControlPositions();
|
||||||
|
|
||||||
setInterval(transmitChannels, 50);
|
setInterval(transmitChannels, 50);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue