Closed Nice3point closed 2 years ago
Now you can track changes for each commit
In recent commits, I have integrated the build system from my template https://github.com/Nice3point/RevitTemplates. Now the installer will build directly to github. After installation, I launched Revit, everything seems to work. For debugging added copying to AppData\Roaming\Autodesk\Revit\Addins\2022. To local build, net core 5 is required. If you still have version 3, please update
You can check how git action works here https://github.com/Nice3point/RevitLookup/actions/runs/1392275582 Artifacts will have an installer
That's all for now. Enjoy testing
You say, 'To local build, net core 5 is required. If you still have version 3, please update'...
Don't you think this might be a problem for many? I have not installed .NET Core 5 myself...
I am researching how to update to net core 5 and am not clear yet on what exactly needs to be done to achieve that...
Oh, maybe I have it already?
C:\Users\jta>dotnet --version
5.0.202
I cloned and built with zero errors and warnings.
I see that the Revit API assemblies are now copied to the local folders:
/Users/jta/a/src/rvt/RevitLookup % find . | grep dll
./RevitLookup/obj/Debug/RevitLookup.dll
./RevitLookup/bin/AddIn 2022 Debug/RevitLookup/RevitLookup.dll
./RevitLookup/bin/Debug/AdWindows.dll
./RevitLookup/bin/Debug/RevitLookup.dll
./RevitLookup/bin/Debug/RevitAddInUtility.dll
./RevitLookup/bin/Debug/RevitAPIUI.dll
./RevitLookup/bin/Debug/RevitAPI.dll
./RevitLookup/bin/Debug/UIFramework.dll
Since they are not directly referenced, I cannot set local copy
to false.
Is this normal and expected?
I see that the installer is named Revit Lookup.aip
with an embedded space. For consistency, can we remove that space? Can I remove it myself, or will that break any dependencies?
Looking great! It installed by itself on compilation and is now up and running fine, afaict.
integrated into release 2022.0.1.1: https://github.com/jeremytammik/RevitLookup/releases/tag/2022.0.1.1
Gitlab CI is currently broken because the shared-windows-runners don't have .net5 pre-installed. Since everything is build in Github actions now, I think we should remove Gitlab completely.
Are the build artifacts attached to releases? https://lookupbuilds.com could be a simple 301 to https://github.com/jeremytammik/RevitLookup/releases
Oh, maybe I have it already?
C:\Users\jta>dotnet --version 5.0.202
yes you already have the required version. in any case, you can download it here https://dotnet.microsoft.com/download or directly through Visual Studio
I see that the Revit API assemblies are now copied to the local folders: Since they are not directly referenced, I cannot set
local copy
to false.Is this normal and expected?
I have included the Nuget package and it is ok, this solves the build problem on the server
I see that the installer is named
Revit Lookup.aip
with an embedded space. For consistency, can we remove that space? Can I remove it myself, or will that break any dependencies?
I don't know what this file is. It was in your repository, so I didn't delete it
Gitlab CI is currently broken because the shared-windows-runners don't have .net5 pre-installed.
https://github.com/jeremytammik/RevitLookup/blob/master/.gitlab-ci.yml#L44 The path to the .sln file may be incorrect. Try changing it to "RevitLookup.sln"
and remove this line https://github.com/jeremytammik/RevitLookup/blob/master/.gitlab-ci.yml#L60. I think the .pdb file is not required at all
to build installer on local machine install this via terminal dotnet tool install Nuke.GlobalTool --global
Then you can run nuke command. Watch the video https://github.com/Nice3point/RevitTemplates/wiki/Installer-creation
Don't forget to change the installer version before releases https://github.com/jeremytammik/RevitLookup/blob/master/installer/Installer.cs#L19 As well as the GUID https://github.com/jeremytammik/RevitLookup/blob/master/installer/Installer.cs#L37 after the release of the new version of Revit. Since the project only has support for a single version. It is necessary to change the GUID so that the version is not updated, but a new one is installed
I'm not fixing things while arguing for its removal.
Is it possible to have the pipeline output attached as release asset?
I'm not fixing things while arguing for its removal.
Is it possible to have the pipeline output attached as release asset?
https://github.com/marketplace/actions/automatic-releases I think yes, it can be done
You say, Don't forget to change the installer version before releases...
I see a constant version number defined as
private const string Version = "22.0.1";
So far, I only maintained the version number in AssemblyInfo.cs, currently set to 2022.0.1.1
.
It would help if these two numbers were the same, wouldn't it?
Regarding the GUID after the release of the new version of Revit... does the GUID in the RevitLookup installer have to match the Revit product GUID?
Throws an exception, the version number must be less than 256. This number is displayed in windows Settings> Apps> Apps & features http://dl3.joxi.net/drive/2021/10/28/0037/1994/2467786/86/1206056905.png
Regarding the GUID after the release of the new version of Revit... does the GUID in the RevitLookup installer have to match the Revit product GUID?
No, the installer guid is only needed for Windows for updating, installing programs. It will only be in the installer.cs file
you can leave your 2022 version name for releases, just remove the first number 20 in the installer so that Windows does not give an error
No, the installer guid is only needed for Windows. It will only be in the installer.cs file
Aha. So the installer GUID can be arbitrary?
the version number must be less than 256
Wow. Can it have four items, major.minor.maintenance.build? I thought that was the official Windows standard.
Wow. Can it have four items, major.minor.maintenance.build? I thought that was the official Windows standard.
Yes, you can set the revision number http://dl3.joxi.net/drive/2021/10/28/0037/1994/2467786/86/8acc97bf0d.png private const string Version = "22.0.1.0"; like this. But I noticed the minor version never updates for you and is always 0, can you reduce the version number?
No, the installer guid is only needed for Windows. It will only be in the installer.cs file
Aha. So the installer GUID can be arbitrary?
Yes, absolutely any GUID, but it should only be updated after upgrading to a new version of Revit. So that for one version the installer is updated and not duplicated in the Windows control panel
Revit versions are also double digit. Limiting to 256 number is a Windows rule http://dl3.joxi.net/drive/2021/10/28/0037/1994/2467786/86/f094c13c3b.png
If you do add the revision number, add this line to the installer.cs file MajorUpgrade.Default.AllowSameVersionUpgrades = true;
http://joxi.ru/l2ZdDoVHRX360r.png otherwise the installers will be duplicated in the control panel http://dl3.joxi.net/drive/2021/10/28/0037/1994/2467786/86/c19039638f.png
https://github.com/jeremytammik/RevitLookup/blob/master/RevitLookup/AssemblyInfo.cs#L188 By the way, updating the DLL version number is not at all necessary, I deleted this file from my projects altogether. We now have an installer, all information about the application can be added to it. https://github.com/jeremytammik/RevitLookup/blob/master/installer/Installer.cs#L40 in this section you can fill in the information to be displayed in the control panel
Oh, I see another space in
https://github.com/jeremytammik/RevitLookup/blob/master/installer/Installer.cs#L16
:-)
I found AssemblyInfo.cs a handy place to maintain the history.
Oh, I see another space in
You see this name during installation and in the control panel)
I would remove that space and stick with RevitLookup as one word globally.
OK, no problem
So, maybe I should move the history to the installer. However, the AssemblyInfo data is also embedded in the DLL itself. So, surely it is a good thing to have the precise version number there as well?
I think we can output the changelog directly to the installer, wixSharp supports the creation of additional dialog boxes. Or better yet, create a separate .md file on github for this. And AssemblyInfo can be removed so as not to duplicate information
Yes, that sounds like the best solution to me.
Would the version number still also be embedded in the DLL itself?
Would the version number still also be embedded in the DLL itself?
The dll version number can be specified in the project .csproj file
So then you suggest removing AssemblyInfo, moving the history to the installer, and adding the DLL file version to the csproj
? Sounds good to me!
So then you suggest removing AssemblyInfo, moving the history to the installer, and adding the DLL file version to the
csproj
? Sounds good to me!
yes, I already created a new pull request =)
thank you!
Corrected the style of the code in accordance with the latest guidelines