Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new command line switch -X to allow TMSL script generation #288

Merged
merged 10 commits into from May 16, 2019
Merged

Add new command line switch -X to allow TMSL script generation #288

merged 10 commits into from May 16, 2019

Conversation

msdotnetclr
Copy link
Contributor

@msdotnetclr msdotnetclr commented May 14, 2019

Add new command line switch -X|-XMLA xlma_script_file to allow TMSL script generation
When -X is used, only TMSL script is generated. Deployment will not be executed

E.g. TabularEditor.exe .\Model.bim -D server database -L ($username) ($password) -O -X database_release.xmla

Miracle Zhou and others added 2 commits May 14, 2019 14:23
…cript generation

When -X is used, only TMSL script is generated. Deployment will not be executed
Add new command line switch -X|-XMLA xlma_script_file to allow TMSL s…
@msdotnetclr
Copy link
Contributor Author

msdotnetclr commented May 14, 2019

This is for #289 Feature: Generate TMSL script from command line

@msdotnetclr
Copy link
Contributor Author

Please note that in the most recent commits, the TabularEditor project output type is changed from Windows Application to Console Application. This should stop Command Prompt from returning immediately after starting the application, thus eliminating the need to use the "start /w" trick.

@otykier otykier changed the base branch from master to feature/xmlacli May 16, 2019 08:52
@otykier otykier merged commit eec8c2b into TabularEditor:feature/xmlacli May 16, 2019
@otykier
Copy link
Collaborator

otykier commented May 16, 2019

I actually tried changing the project type to Console Application at one point, but I decided against this, because we get a command window open in the background whenever you open the UI of Tabular Editor:

image

I think I'd prefer to change it back to Windows Application to avoid this, as the "start /w" trick is a small price to pay, to avoid the command window when all you need is the UI, while also having the CLI option within a single .exe.

Thoughts?

@dmarkle
Copy link

dmarkle commented May 16, 2019

I think it's getting to be about time to think of refactoring a bit to make two apps -- a command-line EXE and a WinForms EXE.

You could potentially use the WinForms.exe as just a library for the command-line app as an interim step to a larger, longer effort of decoupling the logic from the forms itself. One of my concerns about going down the road of having just the Windows app is that it might stop working (does it now) if it's run on someone's Windows Server Core build server.

@msdotnetclr
Copy link
Contributor Author

@dmarkle I was going to do what you suggested yesterday, but after analyzing the code, I found it requires fairly large amount of refactoring to make a clean cut, it won't "fit into" this particular PR. It would be a separate major PR.

@otykier
Copy link
Collaborator

otykier commented May 16, 2019

@dmarkle That's a good point. As of today, the code is split into two projects:

TOMWrapper.dll, which does most of the stuff directly related to the Tabular Object Model, including deployment, save to file, etc.

TabularEditor.exe, which holds all the UI, including the code for the Best Practice Analyzer and scripting system (and the current CLI).

To refactor the CLI into its own application, we would need to refactor the BPA and scripting system out into its own DLL, removing the dependency to UI code. As @msdotnetclr remarked, this is a rather large change - especially considering that the scripting system is tightly integrated into the UI because of the ability to save scripts as custom actions that can be invoked through the UI. I knew a day would come, where my lazy coding would start to bite me in the butt...

I would suggest waiting until 3.0 before anyone starts working on this, as I have some major changes in the UI code coming up - I'll keep this discussion in mind.

SergioMurru pushed a commit to SergioMurru/TabularEditor that referenced this pull request Feb 13, 2023
Add new command line switch -X to allow TMSL script generation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants