Open wagner-cardoso opened 1 year ago
Thanks for the report. It's a little unclear what is going on here; you say you're "following the tutorial", and the virtual environment seems to suggest you're using the suggested environment name - but your application is named "temperature". Can you provided details on what is going on here? Did you just make the choice to name your tutorial "temperature" instead of "Hello World"? Or is there something else going on?
The error message suggests that something went wrong when compiling the WiX installer, and one of the intermediate products from the build process cannot be found. Can you list the contents of build\temperature\windows\app
and tell us what you find?
Can we also ask that you provide the complete log file that Briefcase generated when it crashed? You've provided parts of a log, but it's not clear which parts you've redacted.
Yes, I followed the tutorial, I just changed the application name and nothing else. See the source:
"""
Conversor de temperatura
"""
import toga
from toga.style import Pack
from toga.style.pack import COLUMN, ROW
class Temperature(toga.App):
def startup(self):
"""
Construct and show the Toga application.
Usually, you would add your application to a main content box.
We then create a main window (with a name matching the app), and
show the main window.
"""
main_box = toga.Box()
self.main_window = toga.MainWindow(title=self.formal_name)
self.main_window.content = main_box
self.main_window.show()
def main():
return Temperature()
Ok - what about the other details I asked for?
The complete log is here:
We're now at 2 of 3 of the things I asked for - what about the third?
(Also - you can attach files to Github comments, which is probably a better way to handle really long logs)
OK,
1 - I just changed the application name and nothing else.
2 - list the contents of build\temperature\windows\app is in the attached image file
3 - The log file is attached too briefcase.2023_06_12-02_58_06.package.log
Thanks.
See the line in the log file:\tools\wix\light.exe
...tools\wix\candle.exe' -nologo -ext WixUtilExtension -ext WixUIExtension -arch x64 -dSourceDir=src temperature.wxs temperature-manifest.wxs
When it compiles, doesn't created the objects: temperature.wixobj and temperature-manifest.wixobj
When the ..tools\wix\light.exe starts the files .wixobj dont are exists!!
Thanks.
This is very confusing - I can't see any reason why this would be happening. candle
is running, and isn't generating an error - but it also isn't generating any output.
The best suggestion I have at this point is to try and reproduce what Briefcase is doing outside Briefcase, and see if you get any more errors or warnings that aren't being captured by Briefcase's logs for some reason.
I started the tutorial over from scratch with the name "helloword".
I downloaded and installed wix 3.11 from https://wixtoolset.org website, added the path in the environment variables. I executed the candle.exe manually and the files helloworld.wixobj and helloworld-manifest.wixobj were generated.
See the attached images.
If you delete those .wixobj
file and repackage with briefcase
, do you get the original error? If you don't, that suggests there's something different in your "start from scratch" version of the project - any differences (other than the name of the project itself) could be critical.
If you delete the wix folder from C:\Users\<your username>\AppData\Local\BeeWare\briefcase\tools
, delete the .wixobj
files and repackage with briefcase
, do you get the original error? If this fixes the problem, it sounds like the download of WiX was corrupted somehow; downloading it again has fixed the problem.
If neither of those fixes the problem, it would be good to know the exact version of WiX that Briefcase has downloaded. Could you run the version of candle in the AppData...Briefcase folder and let us know the version?
Exactly! After I removed the ...\tools\wix folder, the problem was resolved.
Note: it was resolved because I had installed the WiX Toolset from website, and in this case the briefcase no longer needed to download ...\tools\wix
Thank you for your help
Now, the "briefcase package" calls the path correct of Wix:
Thank you very much, now I will continue my studies with Beeware...
Great! In which case, I'll close this ticket.
I have the same problem, I deleted the wix folder and it didn't solve it.
[finances] Building MSI...
Compiling application manifest...
Compiling... done
Compiling application installer...
Compiling... done
Linking application installer...
light.exe : error LGHT0103 : The system cannot find the file 'finances.wixobj' with type 'Source'.
Linking...
Unable to link app finances.
@fabiormr, thanks for letting us know. However, we don't know the source of the problem; so, we need as much diagnostic information as possible to understand what may be going wrong.
As freakboy3742 requested of the OP, can you please provide:
1) the full Briefcase log file from running briefcase package
after you delete the build
directory in your project directory
2) The directory contents of build\finances\windows\app
after the step above
3) The directory contents of C:\Users\<your username>\AppData\Local\BeeWare\briefcase\Cache\tools\wix
may be useful as well
briefcase.2023_06_20-19_25_04.package.log
My operating system is Windows 11 and not Windows 10 as was reported by the log.
I'm not sure what exactly is going wrong. The first step by heat.exe
is creating the manifest; however, candle.exe
is not compiling the wxs
files in to the intermediate wixobj
files. So, light.exe
fails when it cannot find them. I would expect some sort of feedback from candle.exe
when it doesn't compile the wxs
files it was explicitly passed as arguments.
I can't recreate this in my win 11 environment. I noticed you're not using a Python virtual environment but not using one didn't create the problem for me.
@fabiormr:
If you're willing to assist in investigation, I'd be curious if installing WiX with their installer and setting the WIX
environment variable to that installation file path so Briefcase uses it resolves the issue for you as well.
Additionally, though, I'm curious if running the candle.exe
command with some of its additional parameters can help reveal the actual issue. There are several available parameters to potentially elevate warnings to errors or ones to make the output more verbose.
Windows Installer XML Toolset Compiler version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved.
usage: candle.exe [-?] [-nologo] [-out outputFile] sourceFile [sourceFile ...] [@responseFile]
-arch set architecture defaults for package, components, etc.
values: x86, x64, or ia64 (default: x86)
-d<name>[=<value>] define a parameter for the preprocessor
-ext <extension> extension assembly or "class, assembly"
-fips enables FIPS compliant algorithms
-I<dir> add to include search path
-nologo skip printing candle logo information
-o[ut] specify output file (default: write to current directory)
-p<file> preprocess to a file (or stdout if no file supplied)
-pedantic show pedantic messages
-platform (deprecated alias for -arch)
-sfdvital suppress marking files as Vital by default (deprecated)
-ss suppress schema validation of documents (performance boost) (deprecated)
-sw[N] suppress all warnings or a specific message ID
(example: -sw1009 -sw1103)
-swall suppress all warnings (deprecated)
-trace show source trace for errors, warnings, and verbose messages (deprecated)
-v verbose output
-wx[N] treat all warnings or a specific message ID as an error
(example: -wx1009 -wx1103)
-wxall treat all warnings as errors (deprecated)
-? | -help this help information
The specific commands that Briefcase runs are in the log file. To run them in CMD, replace the single quotes with double quotes around the exe
; to run in PowerShell, add an ampersand (i.e. &
) followed by a space at the beginning of the entire command. Finally, you'll need to be in the build\finances\windows\app
directory when running the commands.
@rmartin16 I created a PATH_HEAT environment variable and assigned the path inside \AppData\Local\BeeWare\briefcase\Cache\tools\wix\heat.exe and it worked.
Describe the bug
I am doing the tutorial e when I am going to make a package with command: "briefcase package", occurs this:
[temperature] Building MSI...
Compiling application manifest...
'C:\Users\fisic\AppData\Local\BeeWare\briefcase\Cache\tools\wix\heat.exe' dir src -nologo -gg -sfrag -sreg -srd -scom -dr temperature_ROOTDIR -cg temperature_COMPONENTS -var var.SourceDir -out temperature-manifest.wxs
Return code: 0 Compiling... done
Compiling application installer.. 'C:\Users\fisic\AppData\Local\BeeWare\briefcase\Cache\tools\wix\candle.exe' -nologo -ext WixUtilExtension -ext WixUIExtension -arch x64 -dSourceDir=src temperature.wxs temperature-manifest.wxs
Return code: 0 Compiling... done
Linking application installer... 'C:\Users\fisic\AppData\Local\BeeWare\briefcase\Cache\tools\wix\light.exe' -nologo -ext WixUtilExtension -ext WixUIExtension -loc unicode.wxl -o 'C:\git\python\treino\beeware-tutorial\temperature\dist\Temperature-0.0.1.msi' temperature.wixobj temperature-manifest.wixobj
C:\git\python\treino\beeware-tutorial\temperature\build\temperature\windows\app
light.exe : error LGHT0103 : The system cannot find the file 'temperature.wixobj' with type 'Source'. Return code: 103 Linking...
Unable to link app temperature.
The problem is the files temperature.wixobj and temperature-manifest-wixobj dont are created by candle.exe
Steps to reproduce
1 - Create a application with briefacas new 2 - Run briefacase create 3 - Run briefcase build 4 - Run briefcase package (the problem occurs here!)
Expected behavior
I want to generate a .MSI installer
Screenshots
No response
Environment
OS Release: Windows 10 OS Version: 10.0.22621 Architecture: AMD64 Platform: Windows-10-10.0.22621-SP0
Python exe: C:\git\python\treino\beeware-tutorial\venv\Scripts\python.exe Python version: 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] Virtual env: True Conda env: False
Briefcase: 0.3.14 Target platform: windows Target format: app
Toga: 0.3.1
Logs
Additional context
No response