Electron Forge packaging configuration not working - electron-forge

I am trying to package my app with electron-forge package using the following configuration:
"config": {
"forge": {
"make_targets": {
"linux": [
"deb"
],
"win32": [
"squirrel"
]
},
"electronPackagerConfig": {
"asar": false,
"dir": "./src",
"platform": [
"linux",
"win32"
],
"arch": [
"ia32",
"x64"
],
"ignore": [
".idea"
]
}
}
}
The version of electron-forge I am using is 3.0.1.
Only the values asar and ignore are recognized, while dir, platform and arch are ignored. I do not see an error and would highly appreciate help, a hint or a link to any working example.
Update:
It has since been suggested here to use the command line for providing these options.
While
electron-forge package --arch=ia32,x64 --platform=win32,linux
does package the app for all the specified systems, although the output looks like this:
✔ Checking your system
✔ Preparing to Package Application for arch: ia32,x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✔ Preparing to Package Application for arch: armv7l <-- ???
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
It does not seems to actually be packaging the app for the armv7l architecture as it says there, I think that this is just a bug with the console output, the results in the output directory look good.
Anyway.. providing the packaging options via command line does not solve my initial problem, because I still can not specify the dir option for electron-packer that way. So, while the documentation for electronPackagerConfig suggests all options for electron-packer can be set with this configuration object:
This config object provides options directly to electron-packager, the tool we use to package your app behind the scenes.
And while electron-forge package --help says I can set the current working directory after the options:
Usage: electron-forge-package [options] [cwd]
Which is actually not the case, this just simply sets the out directory where everything is written to.
I am still stuck with this. Is there any way to provide the dir option via electron-forge? If not, my suggestion to the developers of electron-forge would be to implement the configuration for this in a way that makes my initial configuration from above work, because I think this is an intuitive way to configurate these parameters, using the command line to override them could still be an option, I guess.

Related

Downloading Binary-only Swift Packages that require authentication

I am using the Swift Package Manager that is built into Xcode 13.1 (not the command line version that uses Package.swift).
One of my dependencies is a Binary-only package. Here is what the Package.swift of that package looks like:
// swift-tools-version:5.5
import PackageDescription
let package = Package(
name: "MyLibrary",
products: [
.library(
name: "MyLibrary",
targets: ["MyLibrary"]),
],
dependencies: [],
targets: [
.binaryTarget(
name: "MyLibrary",
url: "https://gitlab.example.com/api/v4/projects/85/packages/generic/mylibrary/1.0.1/MyLibrary.xcframework.zip",
checksum: "..."
)
]
)
The binary is stored in GitLab's Generic Package Repository.
I have added the Git repository that hosts the package to my "Package Dependencies" in my project. I have generated a Personal Access Token that has API and Repository access and added it to my .netrc file:
machine gitlab.example.com
login gitlab-token
password MY_TOKEN_HERE
When I run xcodebuild -resolvePackageDependencies or use "File" -> "Packages" -> "Resolve Package Versions" in the Xcode GUI, the Git repository is cloned successfully but I get the following error message:
failed downloading 'https://gitlab.example.com/api/v4/projects/85/packages/generic/mylibrary/1.0.1/MyLibrary.xcframework.zip' which is required by binary target 'MyLibrary': badResponseStatusCode(401)
I have tried adding the same credentials to the macOS Keychain to see if Xcode can pick them up from there, but I still see the same error.
In the Swift Package Manager CLI source code, I can see that it handles crednetials for binary downloads too, but it seems that Xcode does not.
Unfortunately, I cannot switch from Xcode-integrated packaging to Package.swift packaging because other developers on the project will be confused by it.
Is it possible to get Xcode to use the .netrc credentials for downloading the file too?
Note: Cross-posted to Apple Developer Forum

producing flutter (Xcode) testflight archive fails with multiple commands produce

need to produce an archive so we can upload to TestFlight so followed instructions in https://flutter.dev/docs/deployment/ios . my flutter runs on both real iPhone and simulator with no problem. so I produce a release version as required then open the resultant Xcode project (runner). immediately see the error
:-1: Multiple commands produce '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from '/Users/jmcfet/AndroidStudioProjects/sis/ios/Flutter/Flutter.framework' to '/Users/jmcfet/Library/Developer/Xcode/DerivedData/Runner-cwxykfeiijpirmgbtrkzktdrahbt/ArchiveIntermediates/Runner/InstallationBuildProductsLocation/Applications/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script phase “[CP] Embed Pods Frameworks”
now this does not happen when I do the same against the "Flutter Hello world" app so wondering what is messed up in my Flutter app
no luck :
johns-MacBook-Air:ios jmcfet$ pod install
Analyzing dependencies
Fetching podspec for Flutter from .symlinks/flutter/ios
Fetching podspec for video_player from .symlinks/plugins/video_player/ios
Downloading dependencies
Using Flutter (1.0.0)
Using video_player (0.0.1)
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 2 total pods installed.
[!] Automatically assigning platform ios with version 8.0 on target Runner because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform.
[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig or include the Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig in your build configuration (Flutter/Release.xcconfig).
not an IOS expert but looks like the install was not successful. little confused as the Xcode project was generated by Flutter so why is Flutter generating a bad config file. if so looks like a bug to me

UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found error

I have recently installed a few updates to windows / visual studio 2017, and now when I create a package of my UWP app and try deploying it to any of the machine where it used to work just fine - installation fails and there is this error message in windows error log:
AppX Deployment operation failed for package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_neutral_~_n78qa84z3g9aj with error 0x80073CF3. The specific error text for this failure is: Windows cannot install package 92211ab1-5481-4a1a-9111-a3dd87b81b72_1.0.26.0_x86__n78qa84z3g9aj because this package depends on a framework that could not be found. Provide the framework "Microsoft.NET.Native.Runtime.1.7" published by "CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US", with neutral or x86 processor architecture and minimum version 1.7.25531.0, along with this package to install. The frameworks with name "Microsoft.NET.Native.Runtime.1.7" currently installed are: {}
I can not find any reference on the web for this package.
The package installs just fine on the developement machine.
Any help would be greatly appreciated.
EDIT 1:
Screenshot of my dependencies folder below:
UWP Deployment Microsoft.NET.Native.Runtime.1.7 not found
The problem is that there is no Microsoft.NET.Native.Runtime.1.7 dependence in current OS system. And you could install Microsoft.NET.Native.Runtime.1.7 dependence manually.
The Microsoft.NET.Native.Runtime.1.7 dependence will be stored in the Dependencies folder where under the appx folder.
Update1
I have checked your screenshot. It seems that you generate your package in debug mode and I can reproduce the same dependency in this way. The .NET Native tool chain is checked by default in the release mode. So you could regenerate your package in release mode to get files above.
Looks like these dependencies only appear on a Release build, and not in Debug.

Flow issue: "required module not found"

I am trying to add permissions module in our app, using
react-native-permissions#1.0.1
When i am trying to use it like this:
import Permissions from 'react-native-permissions'
During runtime, i got the following error:
file: 'file/RunTimePermissionsExample.js'
severity: 'Error'
message: 'react-native-permissions (Required module not found)'
at: '8,25'
source: 'flow'
Note
I had gone through these issue's:
https://github.com/facebook/flow/issues/2092,
https://github.com/facebook/flow/issues/3875,
Flow required module not found
and tried different methods suggested in them like:
Add this to .flowconfig under options:
module.name_mapper='(react-native-permissions)' -> 'empty/object'
Add this to .flowconfig under options
module.name_mapper='(react-native-permissions)' ->
'/flow/GeneralStub.js.flow'
Add this to .flowconfig under [lib]
declare module 'react-native-permissions' {
declare module.exports: any;
}
Unfortunately, the error is not resolved.
Additional Information
React Native version: ~0.48.4
React: 16.0.0
flow-bin: 0.38.0
eslint: 4.8.0,
babel-preset-flow: 6.23.0
Platform: [Android 5.1 and above]
Development Operating System: [Windows 7 Professional]
Dev tools: [ Android Studio version 2.3.2, Android SDK 23.1.2]
After some blind hits by rebuild, clean, reinstalling fixed the issue.

How to include plugins into a SNAP for a QT5 desktop app?

I have got a desktop application for Linux written with QT5 and I want to deploy it as a SNAP package.
The build and install works but the app is not executable and gives the following error:
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Here is my snapcraft.yaml
name: animationmaker
version: '1.0'
summary: Create keyframe animation and export them to a movie file
description: |
This app can be used to create animated movie based on keyframe animations.
grade: stable
confinement: strict
apps:
animationmaker:
command: AnimationMaker
parts:
animationmaker:
plugin: qmake
qt-version: qt5
source: https://github.com/Artanidos/AnimationMaker.git
I think the plugins from QT5 are missing but I don't know how to alter the yaml to include them.
When I builded an AppImage there were the following plugins included iconengines, imageformats and platform.
Any ideas?
The plugins are included in libqt5gui5, which you can add as a stage package like so:
parts:
animationmaker:
plugin: qmake
qt-version: qt5
source: https://github.com/Artanidos/AnimationMaker.git
stage-packages: [libqt5gui5]
However, Snapcraft supports remote parts, one of which is an excellent desktop Qt helper that pull this type of thing in for you and sets a common environment, etc. It's pretty well documented in this tutorial, but for completeness, try this:
parts:
animationmaker:
plugin: qmake
qt-version: qt5
source: https://github.com/Artanidos/AnimationMaker.git
after: [desktop-qt5]
And make your app use the desktop-launch helper:
apps:
animationmaker:
command: desktop-launch AnimationMaker