Adam's Lair Forum

game development and casual madness
It is currently 2020/03/29, 14:40

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 2014/09/19, 10:31 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Hey Adam,

I'm finally getting back on my feet to developing something with Duality and I thought, for starters, to get the latest version and to prepare it.

So I got it, compiled it, but then I noticed those "Package Binaries" batches and I thought that they are used to obtain a working set of the pure Duality dlls ready to use (something like a redistributable set of files - but I might be wrong in their use)

Anyway, when I try to launch the batches, I get this error
Code:
ERROR: System.ApplicationException: The project doesn't compile properly. Cannot
 proceed in this state.
   in NightlyBuilder.Program.PerformNightlyBuild(ConfigFile config) in C:\Stuff\
svn\Projects\Duality\Other\Tools\NightlyBuilder\Program.cs:riga 100
   in NightlyBuilder.Program.Main(String[] args) in C:\Stuff\svn\Projects\Dualit
y\Other\Tools\NightlyBuilder\Program.cs:riga 70


I guess that it's because I don't have a C:\Stuff directory on my machine :mrgreen:

is it something useful for you, or should I just stay away from the batches? What do they do in fact?

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2014/09/19, 11:14 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
Hi SirePi and welcome back :)

The absolute paths you're seeing are just a relic of .pdb files compiled on a different (my) machine. You can safely ignore this, as it shouldn't be a problem. However! Duality not compiling on your machine definitely is a problem.

Have you opened the Duality solution file and tried building the complete solution, including ALL projects? Does it work in Debug? Does it work in Release? Also, does it work in the NoDocs version of that batch file?

This is an important information for me, simply because I'm working hard on getting Duality to build completely from a fresh checkout.

Other than that, you should stay away from those batch files xD But I'll tell you what they do anyway. They're mostly just a little convenience for me when preparing new binary releases of Duality.

Package Binary.bat runs the nightly build process, which...
  1. Builds the complete Duality solution in Release mode.
  2. Runs all Unit Tests and reacts according to the results.
  3. Builds the documentation .chm file, which requires Sandcastle to be installed on your system. (Except in the NoDocs version)
  4. Builds all Duality packages according to their nuspec files.
  5. Creates a new binary .zip package for new users to download.

After that, all I have to do is to upload the .zip file and I'm done with the release. Which is an incredible time saver, considering I had to do all of this manually before.

Now, since Package Management is around and Duality essentially downloads the newest version of itself from the Package System when starting for the first time, I don't even have to upload that .zip file anywhere. Instead, I will need to publish the new versions of all built NuGet packages, which is done by Publish NuGet Packages.bat. Don't worry - you won't be able to accidentally publish official stuff, because all of the packages have a fixed id that is already tied to my NuGet account and all other publish operations should be rejected.

Can I give you any pointers on how to start with packages?

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2014/09/19, 11:28 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Adam wrote:
Hi SirePi and welcome back :)

The absolute paths you're seeing are just a relic of .pdb files compiled on a different (my) machine. You can safely ignore this, as it shouldn't be a problem. However! Duality not compiling on your machine definitely is a problem.

Have you opened the Duality solution file and tried building the complete solution, including ALL projects?

Sorry, maybe I wasn't clear :D

Duality compiles perfectly fine from scratch, inside Visual Studio. I was just wondering what the batches were for :mrgreen:
Adam wrote:
Does it work in Debug?

Yes
Adam wrote:
Does it work in Release?

Yes
Adam wrote:
Also, does it work in the NoDocs version of that batch file?

No, with the error I posted before

Adam wrote:
This is an important information for me, simply because I'm working hard on getting Duality to build completely from a fresh checkout.
...
Can I give you any pointers on how to start with packages?

Sure! I was planning to review my git repository as well in order to include both the plugin and a sample project in the same solution, to keep them updated and aligned.
I was planning to give a look at the Lightning plugin to see if there are some required steps / configuration / settings in the plugin in order to move it to the new package system.

Is there anything I should know / pay attention to?

Thanks :D

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2014/09/19, 11:55 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2073
Location: Germany
Role: Professional
SirePi wrote:
Duality compiles perfectly fine from scratch, inside Visual Studio. I was just wondering what the batches were for :mrgreen:
Adam wrote:
Also, does it work in the NoDocs version of that batch file?

No, with the error I posted before


Strange.. that shouldn't actually do anything else than what you're doing manually when compiling your solution. Well. As long as Duality itself compiles without errors in all configurations across all projects, it's fine. The Nightlybuild stuff is for my personal use anyway.

SirePi wrote:
Is there anything I should know / pay attention to?


Once you have published a NuGet package, you can never remove it. All you can do is unlist it manually when logging into the NuGet website, but then that specific version number will be "locked" and you will need to increase your version number in order to be able to publish again. So, besides everything else, don't publish packages for testing. Build them for testing, but do not publish them.

To get you started, I would suggest to read this and then this for the Duality specifics.

When you're ready to build your first NuGet package, do so as described and you will get a .nupkg file - which is what you would normally publish. But as I said, test thoroughly when you're new to this. First, unpack that .nupkg file manually, because it's mainly a disguised .zip file, and review its contents. Is everything you need in there and in the correct place? If you want to be really sure, you can compare it to one of the published Duality packages by downloading one manually from the website and unpacking it as well.

When you're done with that, you can test your package within Duality locally like this:
  1. Download a fresh Duality installation, run it for the first time so all the packages are installed. Close it again.
  2. In the main directory of that Duality installation, create a new folder called LocalRepo.
  3. Open Source\Packages and copy all .nupkg files located in its subfolders directly to your new LocalRepo folder. You have built a local NuGet repository that contains all packages required for this exact Duality installation, but nothing else. It's like the online repository, but locally on your machine.
  4. Open PackageConfig.xml and specify LocalRepo as RepositoryUrl.
  5. Put your newly built custom Package .nupkg file inside LocalRepo as well. If you have an icon specified, make sure the icon url is already reachable.
  6. Run the Dualitor, open the Package Manager, select "Online Repository" (which now is actually your local repo), click on your Package and install it. See if everything works as expected - including the basic functionality of your plugin.

It sounds like a bit of a lengthy process, but once you get into it, you can skip some of those steps. This is just for starters to be extra sure. After all tests have passed, you can actually publish your package and it will be available to everyone.

One more thing: Always publish Core Packages, Editor Packages and Sample Packages distinct from each other. Do not combine them to a single Package. If you have an example project you would like to deliver to new users, create a specific Sample Package containing only the data and having your Core Package as a dependency. Also, make sure to tag each Package as Core, Editor or Sample - and of course, every Duality package needs to be tagged "Duality" and "Plugin" as well.

Edit: If you want a neat icon, but are - like me - absolutely untalented in graphics, this is a great source for 32x32 icons. Please don't use an icon that is already taken though.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group