Comments (14)
Alright, so I tested manual steps you you posted and I would like to report success, but with some minor adjustments to Bundle building. The msi I generate is later used to build a bundle. First off, bundle cmd file doesn't have arch
parameter. No big deal, I added it to cmd file, but then I noticed a minor bug: -o
parameter in Build_MyProject.cmd
is set to Build_MyProject.cmd.exe
, which seems to be an error, because I specify OutFileName
as MyProject
. Other than that everything works fine from what I tested so far.
Thanks a ton for your help, for looking into this so quickly and coming up with a temporary solution!
from wixsharp.
@artlaskow, great, thank you. I wish wix.exe
was printing it on -help
. I will try to implement it all on the weekend
@talbotsk, you cannot use WixOptions += " -arch x86 "
as it is adding an extra arg but you need the replacement.
The replacement mechanism for build cmd at this very moment is only available via building batch file or with the pre-release package attached (5 posts above).
Anyway, I am planning to do the release on weekend and I am going to add processing of the platform property as it was in WixSharp for wix3.
read Platform property of the project set by business logic,
yes it does it already I only need to add arm
as we just discioverd that it still works but in a different way
from wixsharp.
@oleg-shilo no it was the right thread:
Also ManagedUI\SilentBA.cs and wixsharp\Source\src\WixSharp.Samples\Wix# Samples\Managed Setup\Self-executable_Msi\app.config
@talbotsk mentioned this two weeks ago.
I posted here because I was searching for SilentBA when I was trying to build it.
from wixsharp.
This is a difficult one.
WiX4 does not longer accept setting the target architecture of the msi package. Instead it requires setting the bitness
attribute of the component and passing the 'magic' -arch
switch to the wix.exe during the compilation. Why "magic"?
Because wix.exe build -?
is silent about the possible values
Thus I can only guess that it might be arm64
. And indeed wix.exe tries to compile the msi. I just wanted you to be aware how much guessing I have to do as the documentation is not very helpful for this topic.
Anyway, we can solve this problem with a little manual intervention in the build process
- Set 64 bitness and the installer version required by the wix.exe:
project.Platform = Platform.x64; project.InstallerVersion = 500;
- Second step is manual.
Instead of building msi build the batch file for building msi:After building the project the batch file will be created and if you execute it the msi will be built. Though before executing the batch file you will need to replace theproject.BuildMsiCmd("msi.build.cmd");
-arch x64
with-arch arm64
. That's why we need to do a manual build with the batch file.
This should build the msi.
Let me know if it builds correctly and I will integrate this process into the next release.
But just to assist you with our test I have built you pre-release packages (attached) that you can use if you do not want to fiddle with the batch file.
With v2.1.9 you can manipulate the build command on-fly with the new WixBuildCommandGenerated
event:
project.Platform = Platform.x64;
project.InstallerVersion = 500;
project.WixBuildCommandGenerated +=
cmd => cmd.Replace("-arch x64", "-arch arm64");
from wixsharp.
Excellent. Then it is the way to go. I will now implement arm support by automating all these manual steps.
added it to cmd file,
You can add it as
bootstrapper.WixOptions += " -arch arm64";
Can you please confirm that the code above generates the correct bundle cmd.
And I will check the Build_MyProject.cmd.exe
problem
from wixsharp.
Can you please confirm that the code above generates the correct bundle cmd.
Yes, it does. Extra spaces before and after -arch
are redundant, but other than that cmd generates as it should.
I will now implement arm support by automating all these manual steps.
Thank you again!
from wixsharp.
Hi, I am facing the same problem, but with x86 architecture. Here you can find the allowed values for -arch switch:
https://wixtoolset.org/docs/tools/wixexe/#build
Your first proposed solution works only for x64, not for other architectures, because other architectures add Platform attribute to Package element. I think the x86 architecture should be the default option according to wix specification.
The second solution worked for me too.
I tryied to install your WixSharp_wix4 2.1.9-pre, but it failed:
Restoring packages for C:\s\sln\proj\InstallerSetup\InstallerSetup.csproj...
CACHE https://api.nuget.org/v3/vulnerabilities/index.json
CACHE https://api.nuget.org/v3-vulnerabilities/2024.06.19.23.26.49/vulnerability.base.json
CACHE https://api.nuget.org/v3-vulnerabilities/2024.06.19.23.26.49/2024.06.20.11.26.49/vulnerability.update.json
NU1102: Unable to find package WixSharp_wix4.bin with version (>= 2.1.9)
- Found 1 version(s) in WixSharpLocal [ Nearest version: 2.1.9-pre ]
Anyway I think that setting project.Platform = Platform.x64;
to other platform than x64 will add unwanted attribute Platform to Package element.
I tryied to add WixOptions += " -arch x86 ". It didn't work for me. It was overwritten by previously inserted "-arch x64" left in the command line from BuildMsi(), e.g.:
"C:\Users\user\.dotnet\tools\wix.exe" build -sw1026 -sw1076 -sw1079 -sw1149 -arch x86 -ext "C:\Users\user\.wix\extensions\WixToolset.Util.wixext\4.0.5\wixext4\WixToolset.Util.wixext.dll" -ext "C:\Users\user\.wix\extensions\WixToolset.UI.wixext\4.0.5\wixext4\WixToolset.UI.wixext.dll" "C:\s\sln\proj\InstallerSetup\msi.wxs" -arch x64 -o "C:\s\sln\proj\InstallerSetup\msi.msi"
I am using class ManagedProject.
Can you resolve this issue also for x86 architecture or even better for any type of architectures? Thank you very much!
Edit: Could you internally read Platform property of the project set by business logic, set -arch for wix.exe accordingly and reset it to null for further processing, let the Platform attribute of Project element is not set?
from wixsharp.
@oleg-shilo does wixsharp\Source\src\WixSharp.Samples\Wix# Samples\External_UI\ConsoleSetup\Properties\Resources.resx missing in your repository wix-v4-master? I can't build:
static string SetupDependencies() { byte[] msiData = ConsoleSetup.Properties.Resource.MyProduct_msi;
There is an error:
Severity Code Description Project File Line Suppression State Details Error (active) CS0234 The type or namespace name 'Resource' does not exist in the namespace 'ConsoleSetup.Properties' (are you missing an assembly reference?) ConsoleSetup C:\s\wixSharp\wixsharp\Source\src\WixSharp.Samples\Wix# Samples\External_UI\ConsoleSetup\ConsoleSetup.cs 56
Also ManagedUI\SilentBA.cs and wixsharp\Source\src\WixSharp.Samples\Wix# Samples\Managed Setup\Self-executable_Msi\app.config is missing in repository.
from wixsharp.
Sorry. Done
from wixsharp.
Done.
The fix is released in v2.2.0
from wixsharp.
SilentBA is still not present here on v2.2.0 (or latest wix4 release).
I have cobbled together a replacement @oleg-shilo I noticed you seem to have two of them? One in wixsharp.UI and one in wixsharp core that the netcore build references. I think maybe you have a symlink on disk or something and your git is not committing the file.
from wixsharp.
Thank you @smaudet. Indeed is is a mistake from my side.
When I did the split Core vs Fx I had to split an move SilenBA and just forgot to add it to the repo.
Thank you it's fixed now.
Did you mean to post in a different thread?
from wixsharp.
Did you mean to post in a different thread?
What? Did you maybe mean this? #1582
Not sure what else you could mean...
from wixsharp.
This thread is about "Error when specifying Package Platform as ARM64". But your post was not related to that so I am checking if you wanted to post it in a different thread and we need to transfer it there.
from wixsharp.
Related Issues (20)
- Overview of which SetupEventHandler is fired on which type of project HOT 2
- Wix Woolkit 3.14.1 not working "SFXCA: Failed to create temp directory. Error code 5" HOT 1
- MSI build is failing with failed to add file - Even path is available HOT 7
- How to see in WixSharp project which Wix toolkit version is being used AFTER it has been created? HOT 3
- Restart Office apps after installation HOT 23
- Build issue
- Reg. Value Compare with NSIS BootStrapper HOT 3
- dynamic value for IISWebsite
- Some strings in Dialogs from .wxl are not replaced in Custom WPF UI HOT 6
- Snoop support HOT 3
- Incorrect FirewallException.IcmpTypesAndCodes property type HOT 3
- Using other (not Caliburn.Micro) MVVM framework HOT 1
- Sign Wixsharp dlls HOT 3
- [Question] Is there better way to create BA Installer for user choice ?
- Project GUID in Wix# script gets assigned as upgrade code and project ID is differently generated HOT 3
- Enable signing all user supplied files by default (continuation of #1543)
- Error on adding FirewallException HOT 1
- Hidden child features in FeaturesDialog.UserSelectedItems
- Extracting a zip file during installation HOT 1
- Use LocalSystem for Windows Service. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wixsharp.