|
This thread is locked; no one can reply to it. |
1
2
|
Allegro on NuGet! |
SiegeLord
Member #7,827
October 2006
|
Thanks to the amazing work by Peter Hull, Allegro is now packaged by NuGet, a MSVC-supported package manager! If you have MSVC 2015, you can try it out by following the tutorial. We'll be adding support for more MSVC versions (probably 2012) and probably new build types (a statically linked dynamic runtime version at the very least) at some later point. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Mark Oates
Member #1,146
March 2001
|
-- |
SiegeLord
Member #7,827
October 2006
|
2. Haha! Didn't think I'd need to add a tutorial for that Yes, you'll need to install the C++ tools (I'm sure I recall an option for that during installation). Indeed, MSVC is a terrible space hog. 3. Getting it there is easy (they don't even sign packages like Ubuntu PPAs do...), but creating one will take a bit of work. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Gideon Weems
Member #3,925
October 2003
|
Bruce Pascoe
Member #15,931
April 2015
|
Is this a full static build of Allegro, or DLL? I'm currently including self-built static Allegro monoliths in the minisphere Git repo and it would be nice to be able to quit doing that.
|
bamccaig
Member #7,536
July 2006
|
That's really fantastic. Very well done, Peter! FYI, I've found NuGet to be more trouble than its worth in professional work. We use it to manage several packages from .NET libraries and frameworks to JavaScript libraries. It's generally quite a mess. And we haven't figured out the right incantation to mix it with version control... This is literally a Windows-style package manager... It lacks many of the things that make package repositories Just Work(tm). It's generally a poor way to pull in JavaScript library updates. For Allegro's purposes I think it will solve the problem quite nicely! -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
SiegeLord
Member #7,827
October 2006
|
Bruce Pascoe said: Is this a full static build of Allegro, or DLL? I'm currently including self-built static Allegro monoliths in the minisphere Git repo and it would be nice to be able to quit doing that. It comes with a non-monolith release, non-monolith debug and a monolith static release (since there's no practical difference between monolith and non-monolith static builds) builds. The release builds statically link the runtime, but as per a request in a different thread there'll probably be a dynamically linked runtime static release build version at some point. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Peter Hull
Member #1,136
March 2001
|
I think SL is being modest, as usual. He knocked all the rough edges off my package definition and made it usable. Couple of points:
Thanks all,
|
Bruce Pascoe
Member #15,931
April 2015
|
Eh, afterthought or not it still beats including the .lib files in your Git repo directly.
|
l j
Member #10,584
January 2009
|
I tried it, works well. Should be really helpful to get people into allegro development easier on windows.
|
Malcolm Harrow
Member #15,833
December 2014
|
Tried it .. perfect !! The easiest way to get started on Windows |
Mark Oates
Member #1,146
March 2001
|
How do the Allegro packages/versions get updated? -- |
SiegeLord
Member #7,827
October 2006
|
I build them and then upload them on nuget.org. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Arvidsson
Member #4,603
May 2004
|
I have tried out creating a few projects using NuGet. I get an access violation (Exception thrown at 0x00000000 in test.exe: 0xC0000005: Access violation executing location 0x00000000.), when I put this code in main(): al_init(); al_init_image_addon(); al_set_physfs_file_interface(); al_load_bitmap("data/tiles.png"); When I comment out al_set_physfs_file_interface(), I get no access violation. Is this a bug or some setting I must do in my project because I'm using NuGet?
|
Peter Hull
Member #1,136
March 2001
|
Nuget only copies the files and makes sure the project settings reference them, so you shouldn't have to do anything different. I would first check you aren't accidentally mixing in any other versions of Allegro that you have installed, and if that's not the problem, is it possible for you to zip up a minimal example project and post it here, or file an issue on https://github.com/SiegeLord/allegro_winpkg/issues ? Thanks
|
SiegeLord
Member #7,827
October 2006
|
You never called PHYSFS_init. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Arvidsson
Member #4,603
May 2004
|
Oh. Me stupid.
|
Brooklyn
Member #12,433
December 2010
|
The "allegro-debug.pdb" symbol file is missing and/or not deployed with the NuGet package so when a program crashes it's impossible to trace them back to figure out what was passed to Allegro's functions to figure out what was wrong.
|
SiegeLord
Member #7,827
October 2006
|
Hmm... we never actually distributed pdb files before. The debug versions are sort of more for triggering the asserts inside allegro, rather than necessarily backtracing into it. Currently our build system doesn't install them correctly (and it doesn't appear that it builds them correctly for the monolith library), but if we fix that, we could probably distribute them. They are a bit large though, hah. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Bruce Pascoe
Member #15,931
April 2015
|
Be careful about distributing PDBs - they include absolute path information (to help MSVC locate the original source files). And yes, they do tend to be huge.
|
Brooklyn
Member #12,433
December 2010
|
The reason I ask is because I'm currently having an issue of a crash-on-close where something has gone out of scope and/or cleaned up via RAII smart pointers and allegro tries to handle it after returning from main. All I get is "Could not find allegro-debug.pdb" from Visual Studio 2015 when stepping through. Digging through (at most) 30,000 lines of code to find where my program is passing an expired value is going to take forever.
|
Peter Hull
Member #1,136
March 2001
|
So, to do this we just have to correctly name the package (Allegro.symbols.nupkg) and the NuGet/VS system will automatically make the link?
|
bamccaig
Member #7,536
July 2006
|
Most of my experience in Windows/Visual Studio land is with .NET code so maybe it's different, but typically when you build a foo.dll using a Debug profile there is a foo.pdb created alongside it. I'm curious if this "allegro-debug.pdb" is a literal error message or is an approximation, and if it's exact then what symbols within the package match "allegro-debug"? -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Brooklyn
Member #12,433
December 2010
|
For completeness, here's the exact error after the program attempts to return from main: "Exception thrown at 0x577E3E67 (allegro-debug-5.1.dll) in Engine.exe: 0xC0000005: Access violation reading location 0x00000000." When I select "Break" from the available buttons I get: "No Symbols Loaded (tab name) allegro--debug.pdb contains the debug information required to find the source for the module allegro-debug-5.1.dll Module Information It's obvious that a heap-allocated variable has gone out of scope and cleaned itself up (I'm using C++11 smart pointers) and then Allegro tried to do some cleanup with it but without a Call Stack or symbols available I have no idea which variable went out of scope nor which function tried to access it. EDIT After deleting the output folders and rebuilding to make sure I have the correct DLLs loaded (I still had a few of the 5.0.10 DLLs in them, now they are all 5.1) I still get the same error.
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Have you correctly implemented copy constructors for your 'smart' objects? You can easily add in a printf statement here and there to see what kind of object it is, or add in a divide by zero if you detect a double free to get a breakpoint. If you're copying objects naively (shallow copy), that could easily be the source of a double free when the original is destroyed and then the copy goes out of scope it will free it again. That's my guess without looking at any code. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
1
2
|