How to change artifacts name, for nsis-web with autoupdater?
By default archives for web installer named like {appName}{version}-{arch}.{ext}
• building embedded block map file=dist/nsis-web/app-1.0.0-ia32.nsis.7z
• building embedded block map file=dist/nsis-web/app-1.0.0-x64.nsis.7z
How i can remove versioning from here?
It should be like this
• building embedded block map file=dist/nsis-web/app-ia32.nsis.7z
• building embedded block map file=dist/nsis-web/app-x64.nsis.7z
according to electron-build nsis build docs , you can define the application name
artifactName String - The artifact file name template. Defaults to ${productName} Setup ${version}.${ext}
you can add following macros listed here
${arch} — expanded to ia32, x64. If no arch, macro will be removed
from your pattern with leading space, - and _ (so, you don’t need to
worry and can reuse pattern).
${os} — expanded to mac, linux or win
according to target platform.
${platform} — expanded to darwin, linux or win32 according to Node.js process.platform property.
${name} – package.json name.
${productName} — Sanitized product name.
${version}
${channel} — detected prerelease component from version (e.g. beta).
${env.ENV_NAME} — any environment variable.
Related
I'm trying to use architecture-specific build settings in my Xcode Framework so that I can handle the case of the Apple Silicon Mac and the Intel Mac separately. I need to use this build setting as a macro in Metal to check whether the half data type is supported on the CPU (it's supported on Apple Silicon but not supported on Intel).
My current implementation uses an xcconfig file with the following line:
IS_X86_64[arch=x86_64] = 1
Then, in my build settings I have the following user-defined condition (from the xcconfig):
I then create the macro IS_INTEL so it can be used in Metal:
Here's The Problem
In theory I feel like this should work. However, running my Metal app on my Intel mac yields 0 for IS_X86_64. The first thing I did was check whether I set up my build setting correctly and replaced
IS_X86_64[arch=x86_64] = 1
with
IS_X86_64[arch=*] = 1
This worked so I knew that the problem had to be that my current architecture wasn't being represented correctly. Diving further into why this was happening, it turns out that the value for CURRENT_ARCH (which should hold the value for the current device architecture that the project is being run on) is undefined_arch.
In their Xcode 10 release notes, apple mentioned something about undefined_arch saying:
The new build system passes undefined_arch as the value for the ARCH environment variable when running shell script build phases. The value was previously not well defined. Any shell scripts depending on this value must behave correctly for all defined architectures being built, available via the ARCHS environment variable.
However, I'm not building my project on the shell and I don't have any shell scripts.
Does anyone know how I can fix this so that architecture-specific build settings behave as they should?
You can check the architecture via built-in macros. You can see how they are used in usr/include/TargetConditionals.h:
#if __is_target_arch(x86_64)
...
#endif
More macros:
__is_target_arch(arm64)
__is_target_arch(arm64e)
__is_target_os(ios)
__is_target_environment(macabi)
__is_target_environment(simulator)
I am using pkg_deb to build debian packages for different target platforms. I would like to use the same target in my BUILD file to achieve that, but the attributes "package" and "architecture" cannot use "select" because they are used in the "outputs" attribute of the rule itself.
Is there a different way to make the "package" and "architecture" attributes configurable?
I hit this issue as well. I believe the problem is how architecture is used in the macro, as opposed to being expanded in the rule. I've opened a pull request, but it's unclear how this might interact with compatibility constraints.
The short answer is:
do not use Bazel's built-in #bazel_tools/.../pkg_deb. It is deprecated and will be removed at release 5.0
switch to the module at https://github.com/bazelbuild/rules_pkg
wait for https://github.com/bazelbuild/rules_pkg/pull/282 to be merged
use select on architecture and let the default package naming create {package_name}-{version}-{architecture}.deb (& similar for .changes)
The longer answer is
do the above, but don't bother with the select
use package_variables to extract the CPU name from you C++ toolchain
See the examples of how to do this at
https://github.com/bazelbuild/rules_pkg/tree/main/examples/naming_package_files
Today I faced a problem. My project needs to use some libraries (*.jar) that use Java 1.8 features. I see more and more libraries use now Java 1.8 features (like webRTC, exoplayer, etc.). In this way, we must do desugaring.
Desugaring allows you to use these features on older devices by replacing new bytecodes and language APIs with older ones during the build process
With d8.bat (replacement of dx.bat), desugaring is turned on by default. So you can now use most of the latest language changes while targeting older devices.
When we compile a project, in the background Delphi does this:
dx.bat --dex --output="C:\Dev\output\libwebrtc-dexed.jar" "C:\Dev\lib\libwebrtc.jar"
And this fails with a library that contains Java 1.8 features.
So Delphi must do this instead:
d8.bat --lib C:\SDKs\android-sdk-windows\platforms\android-28\android.jar --output="C:\Dev\output\libwebrtc-dexed.jar" "C:\Dev\lib\libwebrtc.jar"
Any idea how I can tell Delphi to use d8.bat instead of dx.bat?
I found a solution modifying the "CodeGear.Common.Targets" file (Delphi's bin folder), creating an alternative command to be used only for dex generation using the d8.bat instead of the dx.bat:
1) Close the IDE
2) Edit the "CodeGear.Common.Targets", localize the DxCmd definition, and add this two new lines, creating a new command for d8.bat:
<JavaD8Path>#(JavaAaptPath->'%(RootDir)%(Directory)')d8.bat</JavaD8Path>
<D8Cmd>PATH $(JDKPath)\bin;$(PATH) %26 "$(JavaD8Path)" --output=</D8Cmd>
3) Now localize the target used to generate the dex files and replace the DxCmd by the new D8Cmd
<!-- Generate a "dexed" version of the customized jar files if they doesn´t exists -->
<Target Name="BuildPredexedJar" DependsOnTargets="GetProjectJars">
<Exec Condition="( '#(_JarsLocations)'!='' And !Exists('%(_JarsLocations.PredexedJar)') )"
Command='$(D8Cmd)"%(_JarsLocations.PredexedJar)" %22%(_JarsLocations.FullPath)%22'/>
</Target>
4) Now the dex generation will use the d8.bat compiler, where "desugaring" is turned on by default.
If I start the wrapping of my iOS Swift 4.x application with the MDX Toolkit, it will always fail with the the error Mach Header contains Invalid Flag bits in the application binary image.
I already checked the official Citrix community but there is only one unanswered question for this topic. See link.
CLI Version:
Command Line Interface for MDX Toolkit, version 10.7.20.39
iOS Version:
10 / 11
Bitcode:
no (for all)
Have you ensured that the build setting Strip Linked Product of your target is set to No?
In a Flutter app, I have a dart file located at FlutterTest\sandbox\lib\my_widget\my_widget.dart, containing a class called MyWidget.
Can I, from this class, get the location of the file where it is defined?
This is not possible. Flutter disable dart:mirror so you can't use reflection.
As mentioned in another answer/comments, that information is stripped out at runtime.
However, if you're motivated enough you could write a pub transformer that uses regex to pick up a special symbol you define and exchange it for the file path at runtime. Edit: transformers aren't supported in flutter.
You may be able to do this with the Build package & tooling introduced in Dart 2, but you'll have to make sure you're using a version of flutter that uses dart 2 (the beta branch/channel probably doesn't yet, the dev may or may not, but master does).