Installing Allegro 5 - installation

Can someone please walk me through installing Allegro 5 or guide me in a direction to go to who can show me how to install it?
I did a little googling, researching on how to configure my security settings, so I believe I was allowed to copy over the lib, bin, and include folders over into vc: lib, bin, and include folders. But, now I am struggling with copying over the bin folder into my sysWOW64 in 7:29 of the video.
I cannot seem to solve the access denied message for the life of me. I am using a Windows 10 64 bit operating system along with visual studio 2015. And to solve my Allegro 5 installation problems, I have referenced the video https://www.youtube.com/watch?v=IZ2krJ8Ls2A to install allegro5.
I really want to start game programming. But the biggest challenge is: by- passing my computers security to grant me access to install the Allegro 5 bin items into my sysWOW64 folder.

OK so all the guides on the net seem to be outdated or seem to forget that the Official Site has recent and modern binaries ready for download. So here is how to setup Allegro:
Assumptions
First thing first, I will be using the Unstable branch, 5.1, since it is the one that has the new binaries. And Second, I will be using Visual Studio 2013 but it should be exactly the same for Visual Studio 2015 (Step 1 below has the only difference in the process you might encounter).
Step 1
We will download Allegro 5 direct from the Gna! repository. Here you select the file depending on what you have and what you want to do.
This directory has 4 files, in my case, I will download allegro-msvc2013-x86-5.1.12.zip and you will download allegro-msvc2015-x86-5.1.12.zip. Select the x64 version only if you know what you are doing.
Step 2
When it finishes downloading, extract the contents somewhere that is easy to reach and that you will not move, such as the root of your hardrive or inside Documents. I'll go with the root, usually drive C:. After the extraction, you should have a folder in C:\allegro\ with the following content:
allegro\
|-bin\
|-include\
|-lib\
It is important you remember where you extracted the files as setting the environment correctly depends on its ability to locate this path.
Step 3
Here we tell Visual Studio how to use Allegro. Open Visual Studio and create a new C++project/open the project you want Allegro to be used in. With the project open, right click its name on the solution explorer and open Properties then:
At the top, where it says something like Configuration: Active(Debug), select All Configurations.
On the left menu select C/C++ -> General. On this configuration page, select Additional Include Directories and edit it to containC:\allegro\include\ in its text field.
On the left menu select Linker -> General. On this configuration page, select Additional Library Directories and edit it to contain C:\allegro\lib\ in its text field.
Click on Apply at the bottom, but don´t close the window yet.
Back at the top, select the Debug configuration.
On the left menu select Linker -> Input. On this configuration page, select Additional Dependencies and edit it to contain allegro_monolith-debug.lib in its text field.
(Optional)On the left menu select Linker -> System. On this configuration page, select SubSystem and change it to Console from the drop-down box. This will give you a working terminal window in Debug mode to which you can write ...err... debug stuff ;)
Click on Apply at the bottom, but don´t close the window yet.
Back at the top, select the Release configuration.
On the left menu select Linker -> Input. On this configuration page, select Additional Dependencies and edit it to contain allegro_monolith.lib in its text field.
(Optional)On the left menu select Linker -> System. On this configuration page, select SubSystem and change it to Windows from the drop-down box. This will prevent the Terminal window to appear on Release versions of your program.
Click on Apply then OK, this will close the Property Pages of the project and should prepare it for Allegro.
Step 4
This is the part where we test everything worked...(or not, see next step after error)
Create a *.cpp file or use the one where your main function is located and change it to this small test program: (I give away all my rights to it and place it under public domain)
#include "allegro5\allegro5.h"
#include <iostream>
int main(int argc, char** argv)
{
al_init();
ALLEGRO_DISPLAY *display = nullptr;
al_set_app_name("Hello World from Allegro 5.1!");
display = al_create_display(640, 480);
if (display == nullptr)
{
std::cerr << "Well, something is not working..." << std::endl;
al_rest(5.0);
return EXIT_FAILURE;
}
al_clear_to_color(al_map_rgb(255, 255, 255));
al_flip_display();
al_rest(5.0);
return 0;
}
If after compiling and running you get a blank window that closes in 5 seconds then Allegro is ready! If not, post your error message and I'll take a look at what happened.
Step 5
Where we solve the missing DLL error upon execution...
So the program should have compiled correctly and Visual Studio will now attemp to run it. Upon starting, the following might appear:
The solution is to copy on the Debug folder on the root of your project the allegro_monolith-debug-5.1.dll file, so that it is located beside your program's .exe file. Similarly, on the Release folder you have to copy allegro_monolith-5.1.dll beside that folder's executable. Both of this files should be on the allegro\bin\ directory of the downloaded archive. Keep in mind that you would probably need another dll from the ones I said, but it should also be included on the file you downloaded from Gna!.

Related

Recreate or recovering a VB6 project

I left VB6 and programming all together years ago, so pardon since I'm still dusting off what I remember.
I have an old program made for a friend in VB6 that he still runs in Windows Vista. He tried to update a label in the program and in trying to do the update, he has overwritten the project file where I used to see all forms and modules together.
Is there a way I can recover or recreate the project file as it was? All project files and modules are there, but when I open the VB6 project it shows only one form, that I can't compile or execute because it shows a "source not found"
I tried to go back to an old version of the project file with file recovery software but I couldn't find it.
Other way?
Practical steps to recover:
First and foremost: Back up what you have. Do this now.
Second, and only after the first, check (again) to see if you have a previous backup. Yes, this may seem pedantic, but, really, it's worth looking. Was that the only copy? Once you do all of this, consider creating a git repo for your code.
Third, in your empty project, simply right-click in the project explorer (Ctrl + R), and click "Add >" and then "Add Files...". Then, in the file input box, scroll down to the first file, hold down shift, and keep pressing the down arrow and all the files you want. Click "Open". Repeat if need be.
Finally, you need to re-add any dependencies. One way is simply to try to run the program with full compile (Ctrl + F5 or File | Run With Full Compile in the menus). If everything starts up, consider yourself fortunate. If not, you'll have to see each one that fails and add them back. This could be tedius, but just go through them one by one. In the Project menu, both "Components" and "References" can be gone through. Do this until the program successfully starts with full compile.
At this point, consider a making a backup. ;)

Installshield problem setting file permissions

in InstallShield 2011, I cannot modify file permissions under Application Data -> Files and Folders. Whenever I right click on items, it shows grayed out menu buttons. I can't even delete existing entries.
In a bat script later in the installer, I can't copy over certain files because I don't have the right permissions so the installer fails when trying to reference files in BackupFiles. For some reason all the other files get copied over just fine; I can't modify those file's permissions either. I read online that you have to click the "Properties" button in that context menu to change permissions.
My version is InstallShield 2011 Premiere Edition Version 17.
I don't understand why this is grayed out. The source files do not have any restrictions on them so it must be the installer doing something related to permissions.
That boxy orange overlay on the folders and files indicates that these are coming from a Dynamic File Link. Because these files aren't actually added to your project, not all configuration options are available. You might have to edit the permissions on the source files (before build), or change your project to statically include all or some of these files. Given the size of that tree, changing it all to static could be a bit tedious. Changing parts of it (by editing the link exclusions) might be a good middle ground.
Or you could better determine what's going wrong and see if you can address it in the batch file. Assuming this is InstallScript (rather than InstallScript MSI), the entire setup along with any processes it launches should be elevated. So I'm having a hard time guessing what could go wrong. Perhaps a read-only flag? Perhaps use a tool like process monitor to get more information on that, and see if you can add a call to attrib -r, or cacls, or whatever.

Where does Visual Studio store toolbar and menu customizations?

Is there a file somewhere that I can use to do massive changes to the context menu in an easier fashion?
The GUI:
gives me no way to move a command from one menu to another, nor does it let me see what the command actually is (in order to add that same exact command to another menu), thus I don't have much to work with.
And thus I am seeking a file (or a gigantic registry key? ugh.) that I can edit somewhere else where I have more powerful tools. (my VS version is Enterprise 2017 if that matters)
You can find the defaults at C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Profiles, with a general settings and some language-specific overrides. There's an additional override in IDE\VC\Profiles as well.
In my case, I wanted to move 'Start new instance" on a Project into the top-level context menu. So I:
Made a copy of CurrentSettings.vssettings
Added a new command where I wanted it (via the Tools > Customize... GUI)
Found the command I wanted to clone and moved it up one
Closed VS (it saves on exit)
Compared the two files to find the diffs (use your favorite tool.) You'll find them under Category[#name="Environment_CommandBars"]\CommandBars\UserCustomizations as add remove and modify entries
Took the Cmd attribute from the moved entry and pasted it over the added one (it was Cmd="{1496A755-94DE-11D0-8C3F-00C04FC2AAE2}:00000164" for me, to save interested parties a few steps)
Undid the move to retain only the added entry
I wasn't able to find a command entry for this anywhere in the defaults, so had to figure it out the hard way.

How can I enable Xcode refactor options for an external build project?

I want to use XCode as an IDE for developing some AVR code. I did the following
1) create new project
2) select external build system
3) indicated i want it to be make, and told it NOT to "Pass build settings in environment"
4) copied my .c/.h/Makefile into the same directory i created the project in
5) added the .c/.h files to the project/target
6) verified that i can build (make) from both command line and Xcode
But I cannot use any of the refactor menu options, or jump to/reveal options. There appears to be no symbol information. Is there no way to use Xcode as more than just a simple C editor that uses an external build system????
If not, it's a bust for embedded development. Please tell me I'm wrong :(
I found a workaround/solution. Create a second target called "Dummy" or something like that, that is based on the Command Line Tool template of type C. Select all the .c files and in the "Targets" pane on the left side bar, check the new Dummy project (or if the options change, as they seem to often, do whatever gestures necessary to make Dummy depend on your C files).
It will create a Dummy directory and a couple of other Dummy files which you can remove if you want. You never bother building 'Dummy', in fact, if it's an embedded project with separate toolchain, likelihood is nearly 100% that it won't compile as a Command Line Tool for OSX anyway. :)
Apparently XCode needs this indirect hint to know that your .c files are indeed real C files and can be parsed/introspected as such.
As you add new .c files which your external build system likely see automatically, make sure you include them as a dependent for the Dummy target.
I was able to get this to work using XCode 6.1. In my case I'm using C++ but it should also work with C as some of my C++ files make C function calls. Here's what I did:
Create a dummy target using: File->New->Target
For the template choose: OS X->Application->Command Line Tool
Click Next
Fill out the Product Name, etc.
Select C++ for the Language field.
Click Finish.
Back in the Project Navigator pane:
Right click on the new 'dummy' target
Select: Add files to 'your project name'
Browse to select your directories/files to add.
Once the files were added to the Dummy target, I could then open a file under my normal target, right click on a method and Refactor, Jump To Definition, etc.

Image library for vs2010 express

I'm looking for image library working under vs2010. I tried imagemagick (and its api magick++) but that requires building it from scratch which is undesireable.
It doesn't have to be as advanced as imagemagick. I need it to open most popular image files and convert them to raw array of RGB888 or RGB565 data.
My solution was to switch to C# and use it's internal Image class. Works like a charm.
Step 1: Download Magick++
http://www.imagemagick.org/Magick++/
Under the heading, “Obtaining Magick++”, follow the “ftp” link then choose a download mirror for wherever you live. You should now see an ftp listing if you didn’t go to sourceforge or somewhere like that. Scroll down and click on the “binaries” directory and I downloaded “ImageMagick-6.8.6-9-Q16-x86-dll.exe” (6.8.6-9 was the current version at the time).
Step 2: Install Magick++
Run the .exe and next, next, next until you get to the screen below and make sure to select “install development headers for C and C++.” Also make sure to note the install path because we need that later.
Finish the installation and launch Visual Studio 2010.
Step 3: Adding Magick++ to a project
Open your project properties and at the top, set the Configuration to “All configurations” or Release(Active).
Magick++ doesn’t like to run in Visual Studio’s Debug mode so you have to build as a Release or ImageMagick won’t be happy.
In the project properties list on the left side, expand
Configuration Properties->General
Add the ImageMagick Include folder as an Additional Dependency. This is where you need to know where you installed ImageMagick too.
Next select “Code Generation” under the C/C++ section on the left sidebar of the project properties and ensure that “Runtime Library” is “Multi-Threaded (/MT)”
Expand the “Linker” section under C/C++ and add the lib directory for ImageMagick as an Additional Dependency (like in the image above, just “lib” instead of “include.”
Almost there.. now click on “Input” under the Linker section on the left sidebar. Add one more Additional Dependency and add these:
CORE_RL_magick_.lib CORE_RL_Magick++_.lib CORE_RL_wand_.lib
Step 4: Adding the header and namespace
namespace identifiers and you should be good to go!

Resources