Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup. Build system #101

Merged
merged 30 commits into from
Oct 28, 2021
Merged

Cleanup. Build system #101

merged 30 commits into from
Oct 28, 2021

Conversation

Nice3point
Copy link
Collaborator

Corrected the style of the code in accordance with the latest guidelines

@Nice3point
Copy link
Collaborator Author

Now you can track changes for each commit

@Nice3point
Copy link
Collaborator Author

Nice3point commented Oct 27, 2021

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

@Nice3point
Copy link
Collaborator Author

Nice3point commented Oct 27, 2021

You can check how git action works here https://github.com/Nice3point/RevitLookup/actions/runs/1392275582 Artifacts will have an installer

@Nice3point
Copy link
Collaborator Author

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"

@Nice3point
Copy link
Collaborator Author

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

@Nice3point
Copy link
Collaborator Author

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

@Nice3point
Copy link
Collaborator Author

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

@peterhirn
Copy link
Contributor

I'm not fixing things while arguing for its removal.

Is it possible to have the pipeline output attached as release asset?

@Nice3point
Copy link
Collaborator Author

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

@jeremytammik
Copy link
Owner

jeremytammik commented Oct 28, 2021

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?

@jeremytammik
Copy link
Owner

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?

@Nice3point
Copy link
Collaborator Author

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

@Nice3point
Copy link
Collaborator Author

Nice3point commented Oct 28, 2021

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

@Nice3point
Copy link
Collaborator Author

Nice3point commented Oct 28, 2021

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

@jeremytammik
Copy link
Owner

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.

@Nice3point
Copy link
Collaborator Author

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?

@Nice3point
Copy link
Collaborator Author

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

@Nice3point
Copy link
Collaborator Author

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

@Nice3point
Copy link
Collaborator Author

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

@Nice3point
Copy link
Collaborator Author

Nice3point commented Oct 28, 2021

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

@jeremytammik
Copy link
Owner

jeremytammik commented Oct 28, 2021

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.

@Nice3point
Copy link
Collaborator Author

Oh, I see another space in

You see this name during installation and in the control panel)

@jeremytammik
Copy link
Owner

I would remove that space and stick with RevitLookup as one word globally.

@Nice3point
Copy link
Collaborator Author

OK, no problem

@jeremytammik
Copy link
Owner

jeremytammik commented Oct 28, 2021

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?

@Nice3point
Copy link
Collaborator Author

Nice3point commented Oct 28, 2021

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

@jeremytammik
Copy link
Owner

Yes, that sounds like the best solution to me.

@jeremytammik
Copy link
Owner

Would the version number still also be embedded in the DLL itself?

@Nice3point
Copy link
Collaborator Author

Would the version number still also be embedded in the DLL itself?

изображение
The dll version number can be specified in the project .csproj file

@jeremytammik
Copy link
Owner

jeremytammik commented Oct 28, 2021

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!

@Nice3point
Copy link
Collaborator Author

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 =)

@jeremytammik
Copy link
Owner

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants