We are using cocos2d-x in a school project and in our group there are mac users and windows users. We setup cocos2d-x as it is multiplatform. Currently, we have directories as;
Classes
cocos2d
proj.ios_mac
proj.win10
proj.win32
Resources
..
Mac users created the initial files and everything saved under the Classes folder as it is supposed to be. I mean this is the way to have a shared codebase between different projects with cocos2d-x.
The problem here is the created files and subfolders don't appear in the visual studio project. When we tried to add them manually, we got many errors because the visual studio doesn't create folders, it creates filters instead. (and also adding these files manually every time isn't really good)
We are kind of newbies on this area, can you please explain how to set up the project properly, so we can work on it with both Xcode and VisualStudio.
What should we do to sync everything automatically without having any problem?
Have you generated the project through the Python script? Script
I have worked only with Windows platform and I understand that the Windows project is the folder "proj.win32" and the Mac is "proj.ios_mac", and generates a project with two default classes and their respective headers (HelloWorld and AppDelegate) , Located in the folder "Classes" and in "Resources" you can create subfolders with all kinds of resources of the game. I do not understand when you say "create subfolders and files and they do not appear in Visual Studio".
Does each person work on their Mac computer and their Windows computer respectively?
Is it possible that you are referring to this?
Related
I have a finished project with a bunch of different winform files. They are linked between eachother through a menu file. How do I go from having this project as a visual studio application file to an actual application, with customized icon and that can be opened by a user from another PC (which doesn't have Visual studio). I don't want to just zip them.
I didn't try anything and this might be a newbie question but what I expect is basically to have an actual app instead of a bunch of files.
When you compile the winforms project you get a bin folder and a Debug/Release folders inside.
A simple way to deliver the app is just copy the Debug folder that have the .exe and dll files to the dest PC.
The best way is to follow this guide:
https://learn.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-using-clickonce-folder?view=vs-2022
Or make an autoinstaller
This may be a duplicate of Nested projects in multiproject visual studio templates...
I have a Visual Studio solution a solution folder in it to hold all of my projects. Within that folder are a Windows Phone project, a Windows 8.1 project, and a shared project. This is what VS studio will create when making a Windows 8 Universal App.
I want to expand on this idea and put the windows non-phone code into two child projects, a W8.1 and a W10 project. Then have a shared project to hold all of the code except for the stuff not in common. The whole thing would looke like this:
solution
-windows
--windows.phone
--windows.notphone
---windows.notphone.10
---windows.notphone.8.1
---windows.notphone.shared
--windows.shared
I can't figure out how to do this since shared project and that windows folder under the solution are solution concepts, not project concepts.
I don't want to target just Windows 10 but I can't figure out another way to target both Windows 8.1 and 10 within the same project.
Question 1 is; how do I create this project structure in my solution.
Question 2 is; how can I instead just have a single windows non-phone project and have it create apps targeted for both 8.1 and 10. I don't mind running the 8.1 app on Windows 10 except that Windows sticks in that extra hamburger button that has nothing in it in my app.
I always find a solution to my problem just after posting the question. In this case, I realized that the shared project is only shared with those other projects that include it as a reference. I can create all of my projects at the same level of the tree, which seems the only way to do this, and then only use the windows-specific shared code in the windows-specific projects. The phone code would not use that windows-specific shared project.
I'd rather have a visible hierarchy though.
I am using SFML 2.0 and Visual Studio 2010 professional to create a game. When I test my game from within Visual Studio, it works perfectly fine, loads up all the resources. It has no problem finding all of the resources. However, when I build my setup.exe file and install my game, the deployed version cannot find the resources.
I feel like this has to do with where it is looking for the resources within Visual Studio compared to when it is installed on the system. Within Visual Studio, the program accesses a "res" folder that is in the default directory with the project file. Shown here.
When I install the game, I package the "res" folder to be installed next to the .exe like-so.
However, when I run the deployed game, it cannot find any of the resources, and thus, crashes. I feel like this is a real simple fix, just a matter of me placing the "res" folder in a different location, but I have been messing with it for a while and cannot get this to work. Where do I place the "res" folder in the installer?
Given you have not provided any code, I'll assume you're loading your resources with relative paths. This means that your application will be looking for the files relative to the working directory. Now the working directory can be changed and Visual Studio does so and sets it to where the project file is located in (by default). When you now run your application by double clicking on it, the working directory is where you application itself is located. As such your setup should work.
However if you have a conjunction or you start the application from within your setup, you need to make sure the working directory is set correctly.
Additionally you could also change the working directory within your application, but this will require some platform specific code (or the use of for example Boost's Filesystem).
I'm working on a project with Qt using the Visual Studio Addin in VS2010 Professional. Two branches of the project use two different Qt versions (4.8.4 and 5.0.2) so I have both versions of the addin installed (1.1.11 and 1.2.1). I'm also actively developing using at least two computers, both Windows 7, for which I have a networked, roaming user profile. I don't know the specifics of how this user account or network is setup.
Qt is installed in different locations on each system. If I set the correct paths in the Addin on one system (System A), it changes them for the other system (System B) and then complains to me that Qt doesn't exist at that directory when I later log into System B. Is there a way to save the paths to Qt versions on the system, without it affecting the paths on the other system? Or will I have to just deal with changing them each time I change computers?
EDIT:
I from looking through the source for the visual studio add-in, I found that these settings are saved as user registry values. I don't know much about Windows roaming profiles but I'm now assuming that user registry values are copied between computers just as their files are. I don't know if there's any way to move these registry values somewhere else without having to edit and recompile the add-in. I suppose the only other thing I could do is write a startup script to edit these settings upon login.
EDIT: Make sure visual studio on each computer can find the right add-in and the right environment variables on the computer you are using.
http://qt-project.org/wiki/QtVSAddin
In this documentation it talks about where it gets installed to:
"%USERPROFILE%\Documents\Visual Studio 2008\Addins"
So you could manually change the location of the addin, to some local system path.
How to -> Visual Studio Add In Manager
Or you could change the qt path that the Add-in refers to every time you log in, or right before opening visual studio.
Setting a system environment variable from a Windows batch file?
I would use version control to just get the files that you need for the project, and exclude/ignore all the environment specific elements of the project.
One way you could achieve this is:
To install Bazaar. Create a standalone tree of the code on a shared drive or on a location on the harddrive that both users have access to.
Do an initial add of all your source and header files and your qt .pro file.
Checkout or branch the code to user specific folders. In those user specific folders, let Visual Studio create all the user specific, Qt Add-on specific, (etc) files.
Also create a .bzrignore file with files and folders like these listed:
Debug
Release
x64
*.ncb
*.suo
*.user
*.vssscc
*.scc
*.vspscc
*.lnk
*.bak
*.aps
*.pro.user
object_script.*
Makefile
Makefile.Release
Makefile.Debug
Then when you want to try your build for each setup, finish your edits, commit/push your changes on the user that did the edits, and update/pull on the user that wants the changes.
Although the version control may be a little tricky to get started with, it will make project collaboration both scalable, trackable, and very manageable!
And you aren't limited to Bazaar. Check this wiki out if you need ideas.
http://en.wikipedia.org/wiki/Comparison_of_revision_control_software
Another way that you could try to go about doing this, is to have all the source code in some path (either absolute or relatively up from your projects locations), or on the computer, and have the project folders reference those paths in the project folders, but have two separate project folders. This would not be nearly as elegant, but would work.
C:/path/to/vs_proj1
C:/path/to/vs_proj2
C:/path/other/proj/source
And in the properties for vs_proj1, and vs_proj2, in the part about locating source files, have ../other/proj/source to find it relatively, or put the absolute path C:/path/other/proj/source.
Also two other things to be aware of when sharing projects over a drive like this, is that when you are referencing libraries, you may want to store that information in a user specific macro file in Visual Studio and reference the macro in your project settings.
Visual Studio - Where to define custom path macros?
And while I'm here, you may need to #define some things in your program to allow for behavior for one version of Qt that isn't in the other.
So for example, in the source of your program, you might have:
#if QT_VERSION < 0x050000
// some Qt 4.x specific stuff, not in Qt 5
#else
// some Qt 5 specific stuff, not in Qt 4.x
#endif
Hope that helps.
If I have a project called 'testing' in project A.
How can I share that folder 'testing' for project B in visual studio 2010?
The reason I would like to achieve about this is because when I change something in the folder testing of project A, I dont want to change the same things in project B.
Thanks in advance.
Maybe too late for the person who asked the question, but this is for people with similar problems. You can share folder contents with an extention 'Project Linker':
This builds upon the concept of linked files where you refer to the same file from two projects. This extention handles the management of that for an entire project. If you add a file to the project, it will be added too to the other project as a linked file. Same for deletes...
Attention: you need to have both projects in the same solution for this to work of coarse...
Extention VS2015
I used it in VS2010 and it's also availible for later versions.
You can't share folders in Visual Studio - they are logical constructs that are part of a solution or project.
The closest you can get is to add folders to the projects you need to share on and add all the files that you want to share as links. You will still need to manually synchronize all adds/deletes of files, but updates will come across all projects.
To make things easier, you may want to write a Visual Studio macro that synchronizes these folders for you (you can bind these to keyboard shortcuts and/or menu items).
If you put your solution (*.sln) files in the same directory they can share files in sub directories.