Electron-Builder: Failed building windows installer with squirrel on MacOS - node.js

I have searched after a solution to build a windows installer on MacOS with squirrel, but without any luck.
I have successfully installed mono via my terminal.
Version 6.4.0.198.
Versions:
electron: ^4.2.5
electron-builder: ^20.41.0
electron-builder-squirrel-windows: ^20.44.0
I run the command npm run build:win, after a bit of packaging this error comes up
Error: Exit code: 255. Command failed: mono /Users/admin/Library/Caches/electron-builder/Squirrel.Windows/Squirrel.Windows-1.9.0/Update-Mono.exe --releasify /Users/admin/Desktop/myTestBuild/dist/squirrel-windows/mytestbuild-1.0.0-full.nupkg --releaseDir /Users/admin/Desktop/myTestBuild/dist/squirrel-windows
2019-10-05 18:55:36> Unhandled exception: System.ComponentModel.DataAnnotations.ValidationException: Description is required.
at NuGet.Manifest.Validate (NuGet.Manifest manifest) [0x000b1] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.Manifest.ReadFrom (System.IO.Stream stream, NuGet.IPropertyProvider propertyProvider, System.Boolean validateSchema) [0x0007b] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.Manifest.ReadFrom (System.IO.Stream stream, System.Boolean validateSchema) [0x00006] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.LocalPackage.ReadManifest (System.IO.Stream manifestStream) [0x00000] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.ZipPackage.EnsureManifest () [0x00050] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.ZipPackage..ctor (System.String filePath, System.Boolean enableCaching) [0x00049] in <64ead1da9ab54e29ae45ecd50faea709>:0
at NuGet.ZipPackage..ctor (System.String filePath) [0x00000] in <64ead1da9ab54e29ae45ecd50faea709>:0
at Squirrel.Update.Program.ReleasifyElectron (System.String package, System.String targetDir, System.String baseUrl) [0x0000d] in <64ead1da9ab54e29ae45ecd50faea709>:0
Hope someone can help me, have a great day.

Finally found a solution!
your "description" in package.json cannot be empty. That is why it says
Description is required. at NuGet.Manifest.Validate........
This should definitely be added to docs of electron-builder and/or electron-builder-squirrel-windows.

Related

Xamarin GTK on Linux: "DllNotFoundException: libglib-2.0-0.dll "

I am trying to run a Xamarin test application on a fresh install of Ubuntu 20.04.2
On a windows 10 machine, I am cloning this repo:
https://github.com/jsuarezruiz/xamarin-forms-gtk-movies-sample
Compile it in Visual Studio 2019, it runs perfectly on android and windows GTK
Then I copy the contents of bin/Debug folder to my Linux machine and try running it with mono, it throws an exception:
Unhandled Exception:
System.DllNotFoundException: libglib-2.0-0.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) GLib.Marshaller.g_utf16_to_utf8(char*,intptr,intptr,intptr,intptr&)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00034] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at GLib.Global.set_ProgramName (System.String value) [0x00001] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at Gtk.Application.SetPrgname () [0x0000d] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Gtk.Application.Init () [0x00001] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Movies.GTK.Program.Main (System.String[] args) [0x00043] in <87211febe55c459f869a2b0842e037c3>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libglib-2.0-0.dll assembly:<unknown assembly> type:<unknown type> member:(null)
at (wrapper managed-to-native) GLib.Marshaller.g_utf16_to_utf8(char*,intptr,intptr,intptr,intptr&)
at GLib.Marshaller.StringToPtrGStrdup (System.String str) [0x00034] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at GLib.Global.set_ProgramName (System.String value) [0x00001] in <d973ca9f8b494b789fba7fe0ad040b14>:0
at Gtk.Application.SetPrgname () [0x0000d] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Gtk.Application.Init () [0x00001] in <35293b6aa2744433b0e2f41f34e699d5>:0
at Movies.GTK.Program.Main (System.String[] args) [0x00043] in <87211febe55c459f869a2b0842e037c3>:0
Obviously missing a "libglib-2.0-0.dll", which I am not sure how to install on Linux and where mono searches for it.
So far I tried installing mono-devel, mono-complete, gtk-sharp2, libglib2.0-dev
After searching through mono logs I noticed that it's trying to access windows-specific dlls, so I tried setting library reference parameter "Copy Local" to false on these libraries:
atk-sharp
gdk-sharp
glade-sharp
glib-sharp
gtk-dotnet
gtk-sharp
pango-sharp
And it worked on ubuntu 18.04.3 LTS

How do I generate `.generated.h` files in unreal manually on linux?

When I try to open the project, it says "The following modules are missing or built with a different editor version: <project name> Would you like to rebuild them now? If I click yes it says "<project name> could not be compiled. Try rebuilding from source manually." and quits. This is a new project, has not yet been opened due to this error. (I have tried several times with different templates)
So after researching I tried building manually with GenerateProjectFiles.sh -cmakefile -game -project <project file>, then cmake, then make. At first this didn't work because it was using g++ instead of clang, so I changed it to clang, changed the standard to c++14, and now it almost compiles, but it complains that the .generated.h files do not exist. How do I generate them considering I can't open the editor, don't have Visual Studio, and am working on Linux? I also can't change the install files because I don't have permission (work computer).
GenerateProjectFiles.sh output:
Setting up Unreal Engine 4 project files...
chmod: changing permissions of bin/mcs: Operation not permitted
chmod: changing permissions of bin/xbuild: Operation not permitted
Fixing inconsistent case in filenames.
Setting up Mono
<unreal dir>/Engine/Binaries/ThirdParty/Mono/Linux/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Access to the path "<unreal dir>/Engine/Source/Programs/DotNETCommon/DotNETUtilities/obj/Development/DotNETUtilities.csproj.FilesWrittenAbsolute.txt" is denied. at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool)
at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x0002e] in <1e06a39ffa2a4ecc9361f5e710a0e7cb>:0
<unreal dir>/Engine/Binaries/ThirdParty/Mono/Linux/lib/mono/xbuild/14.0/bin/Microsoft.Common.targets: error : Access to the path "<unreal dir>/Engine/Source/Programs/UnrealBuildTool/obj/Development/UnrealBuildTool.csproj.FilesWrittenAbsolute.txt" is denied. at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool)
at System.IO.StreamWriter.CreateFile (System.String path, System.Boolean append, System.Boolean checkHost) [0x0001c] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize, System.Boolean checkHost) [0x00055] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter..ctor (System.String path, System.Boolean append, System.Text.Encoding encoding, System.Int32 bufferSize) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0
at System.IO.StreamWriter..ctor (System.String path, System.Boolean append) [0x00008] in <98fac219bd4e453693d76fda7bd96ab0>:0
at (wrapper remoting-invoke-with-check) System.IO.StreamWriter..ctor(string,bool)
at Microsoft.Build.Tasks.WriteLinesToFile.Execute () [0x0002e] in <1e06a39ffa2a4ecc9361f5e710a0e7cb>:0
Discovering modules, targets and source code for project...
Generating data for project indexing... 100%
make error:
In file included from <project dir>/Source/MyProject2/MyProject2GameMode.cpp:3:
<project dir>/Source/MyProject2/MyProject2GameMode.h:7:10: fatal error:
'MyProject2GameMode.generated.h' file not found
#include "MyProject2GameMode.generated.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118 warnings and 1 error generated.
make[2]: *** [CMakeFiles/FakeTarget.dir/Source/MyProject2/MyProject2GameMode.cpp.o] Error 1
make[1]: *** [CMakeFiles/FakeTarget.dir/all] Error 2
make: *** [all] Error 2

Updated for ios7 in monodevelop but it is giving error

Now,I have updated my Xamarin.ios to 7.0.x It is giving error that, I am already having xcode 5
Error: A valid Xcode installation could not be found. If your copy of Xcode is
installed to a non-standard prefix, please specify the location in MonoDevelop's
Preferences under 'SDK Locations'. (Scrapboom.iPhone)
I have updated Xcode to 5.0 for ios7 and running application in monodevelop but application is not running it is giving,
warning on simulator:
warning MT1201: Could not load the simulator: dlopen(Platforms/iPhoneSimulator.platform/Developer/Library/PrivateFrameworks/iPhoneSimulatorRemoteClient.framework/Versions/A/iPhoneSimulatorRemoteClient, 1): image not found
warning on device:
warning MT1003: Could not kill the application 'com.scrapboom.iphone'. You may have to kill the application manually.
error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.IO.DirectoryNotFoundException: Directory 'Platforms/iPhoneOS.platform/DeviceSupport' not found.
at System.IO.Directory.ValidateDirectoryListing (System.String path, System.String searchPattern, System.Boolean& stop) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x00000] in <filename unknown>:0
at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Device.get_DeveloperImagePath () [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Device.MountDeveloperImage () [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Installer.FindApplication (MonoTouch.Installation.Device d, System.String appId) [0x00000] in <filename unknown>:0
at MonoTouch.Installation.Installer+<LaunchApplication>c__AnonStorey1A.<>m__22 (MonoTouch.Installation.Device d) [0x00000] in <filename unknown>:0
You can set the new XCode location in Xamarin.Studio in the Preferences:
Xamarin Studio > Preferences... > Projects > SDK Locations > Apple
If you don't have the green check marks, set the location targetting your new XCode 5 installation (usually /Applications/XCode.App)
I had a similar issue after updating to Xcode6. What helped me was installing all updates for Xamarin Studio over the beta channel. Go to Xamarin Studio > Check for Updates ... an then choose beta instead of stable

xamarin component failed to resolve assembly

I am trying to build a xamarin component.
I have a created a SomeLibrary.dll from a Binding project.
Using this SomeLibrary.dll and the Component Template(https://components.xamarin.com/guidelines
), I have generated a SomeLibrary-1.0.xam component.
I executed this command to install the SomeLibrary component onto Xamarin Studio(so I can test the component before submitting it to the store):
mono xamarin-component.exe install /Users/somedeveloper/Desktop/XamarinComponent/component-template-master/SomeLibrary-1.0.xam
(recommended by http://forums.xamarin.com/discussion/5640/test-component-packaging)
Now, I am trying to test my SomeLibrary component. I created a brand new project, added the component to my project, wrote a couple of lines that uses SomeLibrary api, and got the following error as I build and run.
I am lost and confused here, any idea, suggestions would be great.^^.
The main thing that I see from the error is:
error MT2002: Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
It seems to be complaining about some sort of PublicKeyToken. What is this? Do I have to generate a PublicKeyToken for my SomeLibrary component? If so, how do I generate a PublicKeyToken.
thanks and appreciate any help, suggestion, or comments !^_^!,
Full Error Log
Building: SomeLibraryComponent (Debug|iPhone)
Detecting signing identity...
Provisioning Profile: XXXXXXXXXXXXXXXXXXXXXXXXXXXX
Signing Identity: "iPhone Developer: XXXXXXXXXX (ALKJLKJSLDKJFLJ)"
App ID: "SDLFJLKSDJF.SomeLibrarycomponent"
Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/3.2.3/bin/mcs /noconfig "/r:/Developer/MonoTouch/usr/lib/mono/2.1/mscorlib.dll" -nostdlib "/out:/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.exe" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" "/r:/Users/somedeveloper/projects/SomeLibraryComponent/Components/SomeLibrary-1.0/lib/ios/SomeLibrary.iOS.dll" "/r:/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 "/define:DEBUG;__MOBILE__;__IOS__" /t:exe "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/Main.cs" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/AppDelegate.cs" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/SomeLibraryComponentViewController.cs" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/SomeLibraryComponentViewController.designer.cs"
Compilation succeeded - 1 warning(s)
/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/SomeLibraryComponentViewController.cs(48,24): warning CS0672: Member `SomeLibraryComponent.SomeLibraryComponentViewController.ShouldAutorotateToInterfaceOrientation(MonoTouch.UIKit.UIInterfaceOrientation)' overrides obsolete member `MonoTouch.UIKit.UIViewController.ShouldAutorotateToInterfaceOrientation(MonoTouch.UIKit.UIInterfaceOrientation)'. Add the Obsolete attribute to `SomeLibraryComponent.SomeLibraryComponentViewController.ShouldAutorotateToInterfaceOrientation(MonoTouch.UIKit.UIInterfaceOrientation)'
/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll (Location of the symbol related to previous warning)
Build complete -- 0 errors, 1 warning
Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" --cache "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/obj/iPhone/Debug/mtouch-cache" --nomanifest --nosign -dev "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.app" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -r "/Users/somedeveloper/projects/SomeLibraryComponent/Components/SomeLibrary-1.0/lib/ios/SomeLibrary.iOS.dll" -debug -sdk "6.1" -targetver "6.0" --abi=armv7 "-v" "-v" "-v" "--compiler:clang++" "/Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.exe"
Xamarin.iOS 7.0.1.4 (4cfca2f) Business Edition using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk
Linking assembly /Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/bin/iPhone/Debug/SomeLibraryComponent.exe into /Users/somedeveloper/projects/SomeLibraryComponent/SomeLibraryComponent/obj/iPhone/Debug/mtouch-cache/PreBuild
error MT2002: Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, Mono.Linker.LinkContext& context, System.Collections.Generic.List`1& assemblies) [0x00000] in <filename unknown>:0
at MTouch.LinkAssemblies (System.String main, System.Collections.Generic.List`1& assemblies, System.String output_dir, Mono.Linker.LinkContext& link_context) [0x00000] in <filename unknown>:0
at MonoTouch.Application.ManagedLink () [0x00000] in <filename unknown>:0
at MonoTouch.Application.ProcessAssemblies () [0x00000] in <filename unknown>:0
at MonoTouch.Application.BuildApp () [0x00000] in <filename unknown>:0
at MonoTouch.Application.Build () [0x00000] in <filename unknown>:0
at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0
at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0
It has nothing do to with public key (tokens).
From the first part of your log it seems that your .dll is named "SomeLibrary.iOS.dll". However the error message is looking for "SomeLibrary", not "SomeLibrary.iOS".
There must be a mismatch between the file name and the internal assembly name.
I got stuck here by copying a project and renaming the project file from Foundation.Mobile to Mobile. I kept on getting a "Component failed to resolve assembly". The answer was to change the actual assembly name in Project Properties.
Uninstall package "SomeLibrary" and install it again via Nuget Package Manager.
I was getting this same error (Failed to resolve assembly: 'SomeLibrary, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'), and that was the solution in my case.

Xamarin installation failed in MAC OS X

I am facing problem to instal Xamarin in my Mac machine. It's giving problem in monotouch framework installation.
I have down loaded from http://xamarin.com and
down loaded file name is : XamarinInstaller.dmg
My Mac book specifications : lion 10.8.2
Please help me out..
I am getting below error.
Mono Framework installation failed with more than one exception (Attempt #Mono Framework)
Some installation errors are present.
Exception type: System.AggregateException
Message: Some installation errors are present.
Exception type: Xamarin.Web.Installer.InstallException
Message: Failed to attach DMG image '/Users/abcd.is/Library/Caches/XamarinInstaller/Universal/downloads/MonoFramework-MDK-2.10.12.macos10.xamarin.x86.dmg'. Error code 1.
at Xamarin.Web.Installer.MacInstallationArchiveHandler.MountDmg (System.String path) [0x00000] in :0
at Xamarin.Web.Installer.MacInstallationArchiveHandler.InstallDmg (System.String path, Boolean needsPrivileges) [0x00000] in :0
at Xamarin.Web.Installer.Installer.InstallationArchiveHandler.Install (System.String path, Boolean needsPrivileges) [0x00000] in :0
Exception type: Xamarin.Web.Installer.InstallException
Message: Failed to attach DMG image '/Users/abcd.is/Library/Caches/XamarinInstaller/Universal/downloads/MonoFramework-MDK-2.10.12.macos10.xamarin.x86.dmg'. Error code 1.
Actually, restarting the installer worked for me.

Resources