How do I start the commandline in OrchardCMS Core - orchardcms

I created a site on dotnest. I want to create a custom theme. The documentation tells me to start the command line interface.
Okay, I get the latest from GitHub and follow the instructions. dotnet run works! Great!
Since I need orchard.exe to create a theme, I change into the correct directory and try to run. Even after building, there is no bin\Orchard.exe in the dotnet core version. I check the source code and all of the Program.cs files start web servers.
How do I run the orchard command line so that I create a theme so that I can install it on dotnest?

As #Hazza mentioned in his comment, DotNest runs on Orchard 1, so you will need to download Orchard 1 from GitHub (https://github.com/OrchardCMS/Orchard/releases/tag/1.10.2) and use its Orchard.exe program to generate a theme project.
DotNest provides further instructions here to create a custom theme for DotNest: https://dotnest.com/knowledge-base/topics/theming/

Related

How to build .sqlproj requiring SSDT in a linux docker container?

I want to build a .sqlproj inside a linux container. The problem is that building the .sqlproj is dependent on SSDT and so far I can't find SSDT that can be installed as standalone on linux.
Error I see running 'dotnet msbuild' in my container:
error MSB4019: The imported project "/usr/share/dotnet/sdk/2.2.402/Microsoft/VisualStudio/v11.0/SSDT/Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Searching the .sqlproj file for the issue, I see we are trying to import a Schema.SqlTasks.targets file, which I'm assuming SSDT creates:
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
I see the same error testing out 'dotnet build'
There is a Windows standalone option:
https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?redirectedfrom=MSDN&view=sql-server-ver15
https://www.nuget.org/packages/Microsoft.Data.Tools.Msbuild/10.0.61804.210
Has anyone found a way to provide SSDT in a linux container?
Goal State: The build step to generate the dacpacs would occur inside the container.
Current State: For now I'm using Visual Studio on my machine as the build machine, then copying the dacpacs up to the container where sqlpackage.exe can then publish the schema.
Why Linux? This dockerized DB will support a stack of services running in linux containers, so a windows container is not ideal.
Ok, so with a bit of help from ErikEJ and other members of the community, at the GitHub link given to you by Brett Rowberry in the comments, I finally figured out how to do this.
The steps to follow are quite simple.
Add your SQL Server project
Add a .NET standard class library project and call it something like "database.build"
remove all the code from the class library project, and modify the csproj file so it reads something like the following
Change the properties on your solution so as to NOT build the sql server project for all configurations.
Once you done this, you'll find that you still get access to the SQL database project in visual studio, and get all the syntax highlighting and intellisense, but your CI will build the SQL code via the linked class library and produce a dacpac in it's output folder ready to be deployed.
Right clicking on the project will allow you to build it from within Visual Studio, and right clicking and selecting "Publish" will allow you to specify your database parameters and publish it to the DB server being used. If you have other objects already in your database that you need to reference, you can create an object only dacpac from the database, using SQL server management studio, which you can then add to your project and check in with it's sources so that you do not need to recreate every single object you may already have.
I've written a blog post explaining it all at length here:
https://shawtyds.wordpress.com/2020/08/26/using-a-full-framework-sql-server-project-in-a-net-core-project-build/
I had the same issue what I did as a workaround:
1- Generated sql script from database project "Generate Script"
2- Followed this code sample to run the script on the Linux container
https://github.com/microsoft/mssql-docker/issues/2#issuecomment-547699532
https://github.com/lkurzyniec/netcore-boilerplate/tree/master/db/mssql
https://github.com/lkurzyniec/netcore-boilerplate/blob/master/docker-compose.yml

NOICONS switch in Inno setup tool not working

I am have installed innosetup-5.5.9-unicode.exe on windows 8.
I wrote an application say demo
when I try to install
c:\demo-2.0-x86.exe /NOICONS <== It is getting installed with out any issue, but as per Inno tool documentation
/NOICONS
Instructs Setup to initially check the Don't create a Start Menu folder check box on the Select Start Menu Folder wizard page.
But its still creates shortcuts and is visible in Start Menu Folder.
Do we have any workaround for this ? or need to write some extra code ?

Orchard CMS: Where new theme structure and files get saved when installed from Gallery

I have a couple of general questions please. Just stepping into Orchard CMS. So apology if they look stupid!
Today I installed a theme called Metro from Theme Gallery. It is visible on theme selection page as well. But where the files and folder structure are got saved in Orchard CMS? I looked into Theme folder but it is not there. I want to see how the structure is placed so that I can create one myself
One more thing. Theme .png file shows a nice layout but when I activate it the layout comes up completely different. Why is this?
And finally, I installed my site using Orchard's web interface and it is running fine. But when I tried to run orchard > codegen theme CreditLine, it said Command codegen doesn't exist.
I then run Setup utility from command prompt (orchard >) and it displayed
A previous Orchard installation was detected in this database with this table prefix.
Which clearly says the setup I did through web interface was successful. But still I am not able to run codegen command or even help codegen. The latter command shows Command codegen doesn't exist!
Orchard version: v.1.10.1.0
1) It should be installed under Themes/TheThemeName, or locally, under src/Orchard.Web/Themes/TheThemeName
2) It could be that you installed an old theme. Not sure because you don't give many details over what goes wrong.
3) You first have to enable the codegen module. Do this by starting up your Orchard, go to modules => Codegen => Enable. Or run in the orchard.exe: feature enable Orchard.CodeGeneration
After a lot of Googling and struggle I found a nice community here where I got my answer!
Orchard Repository on Github defaults to dev branch which I overlooked completely when cloned it for the first time! So I removed everything from my local and cloned the source again but from master branch this time.
No more compilation error or Command Line issue popped up. Orchard.CodeGeneration feature got enabled from CLI this time without a problem. Everything else seems to be working fine as well.
Steps:
1. Removed source from my local which I cloned from dev branch initialy
2. Cloned Orchard from master branch
3. Opened solution in VS2015
4. Compiled, run and setup my first site
5. And finally ran feature enable Orchard.CodeGeneration from orchard command prompt.

Automated builds in monotouch

I am currently trying to implement a one-click build solution (without having to start the monodevelop IDE) for my monotouch projects, where i could specify provisioning profiles and code signing certificates. I searched popular build tools like nant, ant and maven, but none seems to support monotouch. Has anyone tried something similar ?
I've gotten it work with Jenkins (aka Hudson).
You basically setup a Jenkins server, and setup your Mac as a "slave" build server. (I used a JNLP slave).
From there you can run any command line you want in the build, so you merely have to run mdtool with some arguments, like so:
/Applications/MonoDevelop.app/Contents/MacOS/mdtool -v build "--configuration:Release|iPhone" "Path/To/YourSolution.sln"
One thing to worry about is that to sign an iOS app, the slave process must run under your user. So you can't really create a Mac daemon for it, you'll have to run the slave process in startup for your user and minimize it, which is kind of annoying.
You tried teamcity? Might be worth you having a look at this thread Buildserver for MonoTouch upon OS X?
Thx for your answers. However i don't need to use such heavy artillery in this case. Since i'm developping a single and small app, I ended up by creating 3 different Build configurations in my solution, because i found out that it is possible to configure different codesign identities and provisioning profiles for each one (Development, Ad-Hoc, AppleStore), in the monodevelop project options menu.
Then in the AppleStore/Ad-Hoc configuration, i added post build commands, so i could create the .ipa file automatically (basically create a "Payload" folder and copy the .app file into it, and then zip it into a .ipa file, along with the icon and itunesartwork files).
Finally i created a bash script that invokes mdtool with any of the configurations, so i can build and generate .ipa executables by just executing the script.

Liferay Portlet Issue

Im new with liferay have a problem with portlet deployment using the plugins sdk,
Platform:
liferay-portal-tomcat-5.5-5.1.2,
liferay-plugins-sdk-5.2.2,
windows vista.
Problem:
I have successfully created a sample portlet with ant and deployed it into the hot-deploy folder. It is automatically picked up by the server but the console messages say that the portlet has been copied successfully and never registers it.. and i cant find it in the add application drop-down menu.. pls your help will be very appreciated.
I don't know if anything important changed in these versions, but you say you're using Liferay 5.1.2 with the plugin environment 5.2.2 - try with matching versions - at least on the second digit.
also, make sure that all required files are available - among them are WEB-INF/web.xml, WEB-INF/portlet.xml.
Create a new sample portlet with "create.bat" in the plugin SDK's portlet folder and deploy this - it should succeed. Then make sure that all config files from the new one are present in your current one.
How did you create your current portlet? What did you do/change?

Resources