In my application I'm using Core Data stuff to enable persistent data saving. Since I've seen that mogenerator provides a good approach to create and maintain NSManagedObject subclasses (also with additional functionalities), I'm looking for some tips for integrating monogenerator within Xcode 4?
P.S. The question has been submitted based on share your knowledge, Q&A-style.
For Xcode 4.5+, the easiest way is to setup a "Pre-action" in your scheme:
Edit the scheme you want to build
Open the "Build" item and select "Pre-actions"
Click on the "+" and add a "New Run Script Action"
In the "Provide build settings from" popup, use the target
Paste this in the text area:
# Update the mogenerator files
cd ${SOURCE_ROOT}/${PROJECT_NAME}
/usr/bin/mogenerator --template-var arc=true -m ${PROJECT_NAME}.xcdatamodeld -M CoreData/Machine -H CoreData/Human`
Hit "OK" and build
A directory named "CoreData" will be created in your source file area along with the subdirectories "Human" and "Machine". You should now add the "CoreData" folder to your project.
Using mogenerator within Xcode 4 is quite simple.
First of all, download it at mogenerator.
Once done, switch to your Xcode project and, within the Project navigator, select your project (e.g. ProjectName).
Select ProjectName under TARGETS section.
Hold Add Build Phase. A menu appears. Select Add Run Script. A new run script will appear.
Within the text area (under shell field), add some text like the following.
cd ProjectName mogenerator --template-var arc=true --model DataModel.xcdatamodeld/DataModel.xcdatamodel
Et voilĂ . When you build the project you should be able to see generated classes.
For other info and options you should refer to mogenerator wiki.
Hope it helps.
P.S. Feel free to comment or modify the answer if something is wrong.
Related
I could not find a way yet of setting the runs name after the first start_run for that run (we can pass a name there).
I Know we can use tags but that is not the same thing. I would like to add a run relevant name, but very often we know the name only after run evaluation or while we're running the run interactively in notebook for example.
It is possible to edit run names from the MLflow UI. First, click into the run whose name you'd like to edit.
Then, edit the run name by clicking the dropdown next the run name (i.e. the downward-pointing caret in this image):
There's currently no stable public API for setting run names - however, you can programmatically set/edit run names by setting the tag with key mlflow.runName, which is what the UI (currently) does under the hood.
If you are using the latest version of mlflow as of now (1.26.0), the rename functionality UI has changed a bit to look like the below image where you can change the run name by using the 3 dots in the extreme right side.
use the system tag directly:
mlflow.set_tag("mlflow.runName", "run_name")
https://github.com/mlflow/mlflow/issues/2804#issuecomment-640056129
I am working on a NetSuite instance that had custom(contractor/SuiteScript) work installed via a bundle, but it is not a third party product but made for this system. Now there are 2 listings in the dropdown for each file. In other words, if I am adding a file as a library, it shows up twice and I don't know which reference is the correct one to choose. I used search to find the duplicate file name is in the bundle install. Can I safely remove or delete the bundle? thanks any help is appreciated.
You cannot typically remove individual files from a bundle. If you do not need the functionality of the bundle anymore than you can remove it at your discretion by going to Customization>SuiteBundler>Search & Install Bundles>List, then under the action icon click 'Uninstall'.
I wouldn't try to delete a script library from a bundle folder. Even if you are uploading an identical library there may be references in the bundle scripts to the original library that will be broken when if you delete it.
If you are wondering which one you are selecting from the drop down one thing you could do is figure out the internal id of your library file then run a search on your script file that pulls in the library file id's and make sure that they match.
I am currently trying to expand our installation program with an option for the user to specify the name of the program group where shortcuts are created under the start menu. (I am aware that this is a somewhat outdated concept)
I am using InstallShield 2015.
I created a localizable property named [PROGRAMGROUP_NAME]. This has automatically created an {ID_STRING46} which I've set to the desired default value. So far so good.
I managed to create a custom dialog with an edit control, which is linked to the above property.
Now comes the tricky part: Under Shortcuts, under "Programs Menu" I first want to add a folder with the program group name, under which to place several shortcuts.
If I enter [PROGRAMGROUP_NAME] that is literally what the name becomes. If I use {ID_STRING46}, it uses the default value, and not what I've entered in the dialog.
Incidentally, when I tried to rename ID_STRING46 to something more meaningful, other things started going wrong so I've left that as is.
What is going wrong here? How do I get the value of the property to be used for the folder name?
EDIT
I am trying to use a custom action now, but I have trouble defining it. My Dialog that sets the property is after CostFinalize, so I assume I have to use SetDirectory - but I have trouble defining it. I get an error stating "could not access network location "
EDIT
I've managed to progress a step. I have manually added a directory with key DIRECTORY_PROGRAM_GROUP (important that it's all caps to make it public) to the directory table. Then, I use a custom action to set that directory to the desired value [ProgramMenuFolder][PROGRAM_GROUP_NAME] after I've run my dialog, and I've modified the shortcut to be created in that folder.
Seems to work great, however, now the program group is no longer removed when uninstalling...
Shortcuts are installed to folders, and the name of the folders below ProgramMenuFolder become the program group as you describe it. So you will need to either build up the Directory table (either directly---note that the DefaultDir column is localizable, and there may already be a string you can update---or through the Files and Folders view) to do what you want, or use custom actions (set property, if before costing; set directory, if after costing) to adjust the location to which your shortcut is installed.
As for the problems renaming ID_STRING46, odds are you didn't update a reference after you changed the name of the string. The simplest way to track down where these are may be to examine differences in the built installer (perhaps using InstallShield's MSI Diff) and then update the relevant references using the direct editor if you can't find them in the normal views.
We have a Wix bundle project and now need to produce an OEM-branded version of our product. I'd like to use the same bundle project to produce both the base product and branded bundles rather than creating a second bundle project.
I'm familiar the Wix localization functionality (WXL files), and it looks like I could use it for this, but I'm stuck on the OutputName of the bundle EXE which is defined in the WIXPROJ; it needs to have a different name for the branded version. That is, the same bundle project should produce both BrandedBundle.exe and BaseProductBundle.exe.
Is there a way to use the localization functionality to set the OutputName programmatically?
I don't know how to do it with the localization functionality, but there is a nother way to do this.
You can pass in a build parameter to the msbuild...
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMName"
If your Output name (in the wixproj) is defined as the following:
Application-$(DesiredName)
Then your output will actually be: Application-OEMName.msi
You can then have your build configured to run for a bunch of different OEM's if you need...
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMOne"
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMTwo"
msbuild WiXInstaller.wixproj /t:Rebuild /p:DesiredName="OEMThree"
It will run the build three times, and each will have its own output name:
Application-OEMOne.msi
Application-OEMTwo.msi
Application-OEMThree.msi
Best of luck.
Upon further review, I see that the "Cultures to build" field in the bundle's project properties page is disabled, so it appears that localization is not supported for bundles.
I did find some suggestions here: Creating localized WIX 3.6 bootstrappers., but it does not appear that it is possible to do what I wanted to do (change the OutputName) the way I wanted to do it (using localization).
I am trying to add mapviewballoons library in my project, by right click project > properties > Android > isLibrary but whenever i click on Add button, in Project Selection box i am not getting any option to add library, i have downloaded mapviewballoons library in my downloads folder
Hmm...I did it in few simple steps, If you have Git configured it will be easy just clone Git repository, right click->import project. If mapviewballoons project is not checked as library (checkbox in properties->android is Library) then check it and simply in project in which you want to use balloons properties->android->add library and it will appear in list
I dont have GIT, dont know what it is, nor have time to learn what that is.
Is there no easier way to import this stuff into a library project?
Why is Java always so ... hard!?
I dont want to spend days learning GIT, just to get those balloons!
My project is overtime already.