Publish Web App files to different locations - visual-studio-2012

I'm start to develop modules for DotNetNuke. I followed different tutorials(most by Chris Hammond) but there is something i don't like, and I'm searching a different way to do so.
He recommends to put a DotNetNuke installation, with IIS and SQL Server, on the developer PC and put your Project into the DesktopModules folder. I don't like it because i want to separate my project from DotNetNuke.
Is there a way to split the build/publish to different location like dll into folder x and all other stuff into folder y?

You could, but I don't really see the point. I see where you're coming from because it seemed awkward to me at first as well, but it really is the most efficient way to develop on the DNN platform. I have mine set up so all of my modules are in the same solution and branched in source from the root DNN folder. We don't keep the DNN core in source so the developer is responsible for that, although that may change at some point to keep versioning consistent.
By keeping your project located where it's installed, you can develop your modules the same way you'd develop any other web app you're building. If you make a change in markup you just have to save the file and refresh your page. If you change something in code just build and refresh.
If you really must keep them separate, you can absolutely do so (really the only benefit of this that I can see is that if you uninstall a module and accidentally click the checkbox to delete files - it happens - you don't have to worry about it). Create your project where you want it, change the Output Path to your DNN bin folder, and create post-build events to copy all of your .js, .ascx, and .css files (plus any others you may need - images, HTML files, XML files, etc.) to appropriate folder(s) in the DesktopModules folder. Just remember that you have to build the project every time you make ANY changes to test them, and you have to write/change your post-build events every time you add a new type of resource, change/add a directory, etc.
Either that or you can build an install package and uninstall/reinstall the module every time you change some padding in your stylesheet ... but I'd stick with keeping the project in the DesktopModules folder.

Sure you can do that.
Set up your solution and module projects anywhere, build the projects and copy the appropriate parts (such as the *.ascx , *.ascx.resx, *.dnn files) back to your website folder -
website/ DesktopModules/Your_module_name
Copy the module dll to the website's bin and you good to go.

Related

How should I go about using a temporarily changed copy of a DLL locally when it's been checked in to TFS?

We have a Libraries folder where we keep third-party DLLs and our own utility DLLs for all applications to reference. I want to do development against one of our utility DLLs and an application that consumes it at the same time. But if I check out the library DLL to change it for temporary local use, TFS insists on checking it out exclusively, which trips other people up. I understand the reasoning behind it doing that (hard/impossible to merge a DLL, so two people shouldn't be working on one at the same time), but I just want to mess with my local copy while I'm working on the library it represents.
I suppose I could delete my application's reference to the DLL and recreate the reference pointing to some other place, but of course this just begs for me to forget and check it in like that, which would obviously be bad. Not to mention that this is a pain in the neck.
How should I proceed in such a situation?
You are using a server workspace that does not allow editing outwith TFS. In TFS 2012 local workspaces were introduced which do not have a read only flag for files and you are free to edit at will.
You can change your existing workspace in a few clicks: http://msdn.microsoft.com/en-us/library/bb892960.aspx
You could just go into the file system and mark the file as writeable. Once you are happy the binary is good you could check it out, copy the new version of the file over and check it back in again. TFS marks binary files like this as locked for good reason, as you can't merge them in the way you can with textual content.
The best approach would be to use a NuGet repository to manage your binary dependencies, instead of relying on binaries checked into source control.

Is it possible for InstallShield 2012 to include a custom language file that isn't in <ISProductDIR>

It's very straightforward to add languages to an installshield project. My goal is to
make a modified English (0x0409.ini) with some of the strings modified, such as
However I have a team of people that would have to copy these files to a directory much like C:\Program Files (x86)\InstallShield\2012Spring\Support andC:\Program Files (x86)\InstallShield\2012Spring\redist\. This is even worse with the 10+ machines in the build farm that could potentially need this file. It's a non-starter. It's hacky to have modify the install of a tool to get it to use an unsupported language.
Is it possible to check the language file to SCM and have it reside in a subfolder of <ISProjectDir>?
I don't believe so. I think you'd have to set up a post-build step that would copy in a modified ini file.
You could set up one in installshield's UI but I don't know if that persists in a stand alone build.

How to add a lot of resource files to a monotouch project?

I have a lot of png images into a directory. I've added it to the project as Content/Copy if newer. I can load them from the app without problems.
But, the project needs a lot of time to compile. If i make a little change in the code, the project recompiles all again. It takes a lot of time.
I've tried to add another project, add the files to the new project, but then i can not access to the files from the app.
Is there any solution?
Of course, when i debug the app into the iPad, the uploading+install takes a lot of time. These files will not change ever, so...Is there any method to copy all the content ONE time?
Thanks
I just have discovered a tricks. It seems that monotouch does not remove directories when you upload and install from the MonoDevelop environtment, so:
Add your folders and all the files and mark them as Content
Build your project for iPhone/iPad and Run it from MonoDevelop
Remove your data foldres from your porject
Clean the solution
Make any changes you need in your code, your data reamins in the device!!!
That changes all!!! Before that, when i need to make a minor change in my code, i needed to wait about 15' for building and uploading. Now it's just 1 minute!!!
Place your images in a separate class library
Mark all your files as embedded resources
Add a logical name to each resource (in your project file)
<EmbeddedResource Include="Images\Folder\Filename.ext">
<LogicalName>LogicalNameForImage</LogicalName>
</EmbeddedResource>
4. Load the resource as
UIImage.FromResource(yourAssembly, "LogicalNameForImage");
Embedded resources are loaded on demand, not when the assembly loads.
In A future version of MonoDevelop (my patch didn't make it in time for the upcoming 4.0 release), this won't be an issue any longer.
What currently happens in MonoDevelop 3.x is that when building a project, it will only copy the images that have changed into the app bundle, however, after building, MonoDevelop invokes a script that is installed along with Xcode called iphone-optimize which scans the entire app directory and uses pngcrush to crush all of the images (it also converts all plist files into binary plists). This is the step that causes such slow build times if you have a lot of images.
Just after the 4.0 branch closed for QAing, I wrote a patch that avoids the need for invoking the iphone-optimize script. Instead, what MonoDevelop will do is it will directly invoke pngcrush on only the images that have changed, passing the proper app directory location as the output argument to pngcrush so that we avoid an additional file-copy.
From my own testing, this makes a massive improvement to build times for projects with a lot of image files.
In the meantime, what you could do, is make a backup of the iphone-optimize script (should be located somewhere under /Applications/Xcode.app) and then modify it to not crush image files. Then, once you've done that, go and pre-crush all of your png files in your project.
(Note: when the MonoDevelop with my patch finally ships, it'll also have an option to disable calling pngcrush for developers who have already pre-crushed their images).

Trouble syncing file-based templates to database using MSM and config bootstrap

Had started my typical EE build (using a bootstrapped config) for a client when they announced they wanted another additional site using the MSM module (le sigh).
So added the MSM module, I commented out the $config['site_url'] and $config['cp_url'] and set those in index.php instead using $assign_to_config.
That's when I discovered this bug where MSM config file settings are not recognized, which is a pain but I can work around it. However, I noticed that when I created the secondary site, it wouldn't recognise my custom location for add-ons and so I had to add that to index.php as well to $assign_to_config['third_party_path'] = "../assets/third_party/";.
Then I discovered that when I create or modify a template file, it won't automatically sync and so I need to manually do that each time which is a real PITA.
Why would my templates not be syncing to the database? Is this related to the MSM config bug?
While I haven't tried bootstrapping the third party path yet, I've definitely been able to bootstrap the template path for MSM sites... What bootstrap method are you using?
Are your sites on subdomains or subfolders? I've only had experience with subfolders so perhaps that makes a difference (although it shouldn't).
Could you maybe walk through in a bit more detail what's happening? Your first site (site_id = 1) templates sync automatically from filesystem edits, but your second site does not? Yet if you go to CP > Design > Synchronize Templates, that works?
The $assign_to_config portion of MSM setup is definitely a weakspot when it comes to bootstrapping... I wonder if we need to work up an additional bootstrap for MSM+CP environment, where it looks at the cp cookie ($_COOKIE['exp_cp_last_site_id']), and sets values based on that.
It may be helpful if you let us know which bootstrap you are using. For example, if you look at this bootstrap the site_url and cp_url are set using the HTTP_HOST server variable, so this shouldn't clash with your MSM install (and multiple domains) at all.
Perhaps you could try using that boostrap file instead, and see if it fixes your issue with template syncing?
Finally, if you're going to use the EE template manager, you don't really need to store templates as files. Conversely, if you want to save templates as files, it's probably much easier editing them using Sublime Text or another editor, rather than the clunky built-in editor (which is really only useful for small/simple changes).

Need to change template styles in Liferay

I want to change look and feel of liferay using css. i am very new to liferay. Can any give me any idea to do the changes. Thanks in advance
The step-by-step seems complicated, but it's not that bad .....
1a) download and unpack the plugins sdk for the version of liferay you want to use. All the downloads are on the sf page http://lportal.sourceforge.net/
1b) make sure you have the latest version of ant and the JDK version that matches your liferay version (1.5.x or 1.6.x)
2) there are a few main folders in the kit. Change into the "themes" folder and run the create script there in this format (on linux or mac you'll need to make the .sh files executable)
c:\liferay\plugins\themes >create my-name "My Theme Description"
linux/mac $>./create.sh my-name "My Theme Description"
This will create a skeleton theme in a folder called my-name-theme and a folder within it called _diff.
Make whatever modifications you want WITHIN THE _diff FOLDER. (except changes to the properties file within WEB-INF)
Once you've made changes run "ant compile" from within the my-name-theme folder and the sdk will run through it's paces and spit out a .war file to the "dist" folder in the sdk root. You can upload this to the site using the plugin installer
OR ... if you configure the sdk to know where your development server is you can run "ant deploy" from the theme's folder and let the autodeploy magic in liferay do the work.
Once the theme is installed just assign it using the "look and feel" tab in the "manage pages" tool.
TIP : Make most of your changes to the custom.css file .... keeps things easy to upgrade.
TIP : Development is really slow for CSS if you do this for every change .... so if you're running a dev server add a style tag just before the end of the head tag that points into your _diffs/css folder. href="file:///...../_diffs/custom.css". This way whatever edits you make will be compiled into the next version of the war and will override the currently installed version without reuploading. make sure to remove the link before you put it on a live server.
The liferay.com documentation is great and there's a "themer's guide" i can't find the link to right now that got me started.
We've done a number of LifeRay customizations for various companies but your question is too vague for us to answer. If you are just looking to change a few colours and fonts then editing the CSS is fine, but if you are looking to completely change the layout then you need to delve in to the template files and start working with the XHTML.
Provide more details and we might be able to prod you in the right direction :D
IMO theme development for liferay can be quite slow to start with. I have found two different approach quite useful. It works for me, might work for you as well.
If you edit files inside _diff folder AFAIK you have to deploy every
time two see the changes , which can be quite frustrating for
front-end developers. An approch can be edit the css file directly
in tomcat/themename folder. Copy the changed every couple of hours
or so in the _diff folder and deploy. In my case the CSS stays in
C:\liferay-portal-6.1.0\tomcat-7.0.23\webapps\\css\
Also if you are aware liferay supports Sass now. So it you are writing Sass "deploy" may be you most likely option. But I have also figured out a way to speed up that process. Install ruby (if you are in windows, in Mac its preinstalled) > Install Compass > and create a blank compass project. Start "compass watch" . Open bothe scss file and the compiled css file in your IDE. "compass watch" will poll for changes in your scss file and put the compiled output in the css file. Every while you may copy the css output in the css file in theme folder or directly in firebug or web-inspector in chrome/safari.
I have found these are faster dev practice than deploying everytime or completely developing on firebug/web-inspector.
Also if anyone know of better method, specially things like only CSS/JS deploy (or simple copy for that matter if one is not writing Scss), please let us know.
You can make your custom style with the liferay plugins sdk, which can be found here: http://www.liferay.com/downloads/liferay-portal/additional-files
There is a themes folder included, in which you can create a new theme. Liferay generates here a basic theme as a boilerplate, which then you can customize and deploy to your liferay installation.
You can
mvn archetype:generate
then select “liferay-theme-archetype (Provides an archetype to create Liferay themes.)” et voilà you are ready tu customize your theme.
Best practice recommends that you make all your custom themes using only the custom.css file, and that you not override any of the templates unless absolutely necessary. This will make future upgrades far easier, as you won't have to manually modify your templates to add support for new Liferay features.
Deploy the newly created theme using
mvn clean package liferay:deploy

Resources