I could not use git push for my ionic app due to the node modules folder being too long.
I used .gitignore to ignore the node_modules, platforms and the plugins folder as a solution.
My comp broke and now I have a loaner comp that I'd like to continue developing on.
When I git pull from this new computer, I know how to add back the platforms and plugins with command line tools, but I'm at a loss on how to add the node modules folder.
I saved app in a zip before my comp broke, but I can't even unzip this in my new comp because the node modules folder is too long when unzipping...
How do I get back the node modules folder into this cloned directory? (Side question, can I just copy the platforms and plugins folder from my zip into this cloned folder, or do I need to use command line tools with ionic platforms add ... and ionic plugin add ...?)
You'll need to open the command line and navigate to the project folder. Then you can run the following command to redownload the node packages. The node_modules folder is only necessary if you use the gulp tasks (such as sass).
npm install
The other two commands, ionic platforms add [platform] and ionic plugin add [plugin] setup the project for a particular platform and plugin. You can copy these two folders back in. When you create a platform, such as ios, you generate a set of files that you may modify for deployment. You'll want to retain the changes to the project configuration, so I would keep them in your git repository.
Related
According to the Unity tutorial, the only folders that should be in version control are Assets and ProjectSettings. The rest of the assets and files that make a project are supposed to be generated by Unity. As a test I tried to open a project directory that only contained these folders. It loaded the project, it just would not run because some dependencies were missing.
https://unity3d.com/learn/tutorials/topics/production/mastering-unity-project-folder-structure-version-control-systems
It seems that critical assets imported from the Asset Store are not contained in either of these folders, nor are they automatically generated when a project is opened, they must be installed/imported manually the first time. My goal with my version control is to be able to do a fresh pull from git and be able to run the project off the bat.
The missing assets seem to be located in /Library/PackageCache/. Copying the folder to the test environment doesn't work, as this folder is cleared the first time Unity is run. What files do I need to keep to make this work?
According to the Unity manual, you only need to include 3 folders into your version control system:
"When checking the project into a version control system, you should add the Assets, Packages and the ProjectSettings directories to the system."
The easiest way of setting up version control for Unity it to use Unity's own version control called Plastic SCM. It has two modes: Programmer mode and artist mode. I recommend Artist mode (Called Plastic Gluon) for ease of use especially if you are the only person working on the project. In both modes, Plastic SCM will automatically includes what is necessary and exclude the unnecessary files.
Recently we'd updated our Worklight platform with the latest Fixpack (6.1.01) and everything works fine after the update.
However although we had check in all our files into our SVN repository, when we check out a fresh copy of project, the eclipse Worklight plugin will still perform an upgrade to the project.
Is there a Worklight platform version control in the project folder that we missed out and didn't commit to the repository? or is there extra setting that we need to apply before checking into the SVN repo?
Any clues will help, thank you.
EDIT
Below is the print screen taken from the SVN Repository browser in eclipse. We use Windows environment for development. The .settings folder is inside the repo.
EDIT 2
After inspecting the org.eclipse.core.resources.prefs file in the .settings folder, i notice that there's this line of properties that are not updated in the repo:
wl_version=6.1.0.00.20131219-1900
Is it this line that is causing the problem?
Edit the question with the files/folders you did commit to SVN.
Additionally, make sure to setup your PC/Mac to display hidden files and folders and see that you did not miss those.
Specifically, there is a .settings folder (. denotes a hidden folder in Mac) that also contains a org.eclipse.core.resources.prefs file.
I'd be interested to see the result of an import of a project that does contain this folder and this specific file.
I'm new to both unity and github, how would I go about getting a unity project my group has been working on from github to Unity? I apologize if this is a simplistic question my google searches didn't turn up much.
Just do a
git clone <PROJECT_URL>
A folder with the project contents will be created in the current path. Then you just open it with Unity.
You'll have an Assets folder somewhere inside your project folder, the parent of this Asset folder should be the Unity project folder, so just browse to it on Unity and open it.
#Roberto's answer presupposes that you are familiar with GitHub / the command line.
If you aren't and aren't planning to continue to use GitHub for collaboration, you could also just download a zip archive of the repository (= the project's main "directory"). You'll find a "Download ZIP" button on the righthand side of the repository's main page.
See also:
How do I download code from this github site
How do I clone a github project to run locally?
This can be a little intimidating for new gamedev's who have not been using source control.
Install some sort of tool that supports git.
There are two flavors : command line tools and GUI tools. Some examples would be gitbash, github for windows, or mac os X developer tools includes a git commandline as well. In my experience many documentation examples seem to refer to command line as it is more universal across computing platforms so you may want to use that even if it seems 'harder' at first. The rest of my instructions assume you use a command line tool.
Get the URL for the code to clone.
Navigate in a web browser to the code repository (on Github, Bitbucket, or wherever it is). Usually in the upper right hand corner is a download or clone button. Often it has a drop down arrow that will allow you to get a URL or a zip download. If you want to actively participate in submitting code grab the URL and proceed to the next step. If you just want to download it once and check it out for fun grab the zip.
Clone the repo in your command line tool
Open your command line tool.
Navigate to a folder that you wish to store source code in such as C:\source or D:\repos using the cd commands (you may wish to google this if your not familiar with it as it varies a tiny bit between platforms and the command line you may be using)
Now you want to execute the clone command. Some git repos will have included the clone command in the url you copied, others will not. The end command will look similar to this
git clone https://github.com/someguy/SomeGameProject.git FolderIWantItToGoIn
Hit enter, and it will clone the project. This may take a few minutes if the game project has large files it may take a bit longer.
Potential large assets work arounds
In some cases projects have some very large assets they do not commit to source code. If so you should receive special instructions where to download those.
Hopefully those file instructions are detailed, but if they only mention where to get the files then after step 3 download the files and insert them into the folder under Assets/ will usually be the correct thing to do.
Open UnityHub and open the project in the appropriate version of Unity 3d.
Note that many projects choose a particular version of Unity. Hopefully your team told you what version to use. If not check in the folder you made under ProjectSettings/ProjectVersion.txt . In this file it will say what version of unity was used like this:
m_EditorVersion: 2020.3.8f1
So in Unity Hub click "Add" and select the folder you cloned the project into.
This will return you to the Projects view.
In the projects view select the version noted above in the "Unity version" column with a small grey triangle drop down.
Then click on the project name to open it.
In Unity, go to the Assets menu and select "Open C# Project" and make sure that your code editor loads without error.
Finally, in Unity 3d, open whatever scene file is indicated as the one you should work in and hit Play at the top and you should be able to play the game without error (assuming they checked it in with no errors of course).
In case if you are looking for JAR files of all the dependencies you have in android project. Assuming you have added needed dependencies in you build gradle file(including your github projects), Compile/Make once and Look at Project->External libraries in android studio. You will find list of all downloaded jar files, Copy those and paste it in Unity assets/android/libs path.
Open up your github repository like https://github.com/*Yourname*/*YourGame*
Then click Code=>Download Zip
Then unzip folder
After that Open up UnityHub and and select open project
or
Open Unity then click File=> Open Project
Then chose your project folder that it.
So I have a Phonegap 3.0 app (project folder), and it's project (project/platforms/android) on Eclipse.
The problem is that when I change project/www/index.html , and tell Eclipse to Run the project, the changes don't appear on my device.
I noticed that Eclipse was saying Application already deployed. No need to reinstall. so I tried adding a space in a .java file so that Eclipse would notice some change in the project and rebuild it. It worked, Installing RingTo.apk... Success! showed on the log, but still the changes to index.html didn't show at the device...
Changes made to the files inside project/www/ are not automatically copied to your project (in your case to project/platforms/android/assets/www/). You have to run the following command to iteratively copy the changes to platform specific projects and build them. Open the command prompt and navigate to the root of the project (In this case project/). Or you can even right click on the project/ folder while pressing the shift key. Then run the following command:
cordova build
You can optionally limit the scope of each build to specific platforms:
cordova build android
Alternatively, you can run the following commands:
cordova prepare android
cordova compile android
In this case, once you run prepare, you can use Eclipse with ADT installed as an alternative to modify and compile the "platform-specific code" that Cordova generates within platforms/android.
Source - Cordova Docs
So, when you have made a slight modification in a .java file (which is an android platform specific file) and tried to rebuild it within Eclipse, you were actually trying to rebuild the same project without any actual modifications.
Another alternative would be to copy the files within the project/www/ to project/platforms/android/assets/www/ by hand and then build it within Eclipse, which would, of course, be an unnecessary pain.
I'm new to Eclipse, there is a project at work that is set up and running, I want to set it up just like that on my home PC so I can look at it in my spare time, so I zipped up the project directory, and unzipped it on my home PC, but it didn't work like Netbeans, seems missing lots of parts/plug-ings ? How do I know what plug-ins are needed for the project at work, so I can install them at home, the project is large and someone else developed it, is there a way in Eclipse to zip up all the plugins related to the project with the project and unzip and install them automatically ?
The easiest way to reproduce the installed plugins should be File->Export->Install->Installed Items to File. The resulting file can be imported on your machine using File->Import->Install->Software items from file and will lead to installing all plugins which are available on the first machine.
Notes:
This requires that the plugins from the first machine can be found via public update sites, as that exported file will only contain a list of meta data from where to install the plugins, not the actual jar files.
The export includes all plugins of the first machine. You can deselect some of them, but there is no automated way to find only the ones needed for your project.
Requires Eclipse 3.7 or newer.