Moderators lynkfs 613 Posted November 27, 2017 Moderators Report Share Posted November 27, 2017 How do I compile .pas to .js ? Quote smsc tryout.pas -output-name=tryout.js compiles but doesn't produce a tryout.js file Note : I can do it in the ide by starting a new project, replace main unit with pas statements, delete all other units, unclick 'use main body' in code generation and unclick everything else in linker options However the command line compiler would be a better option Quote Link to post Share on other sites
IElite 280 Posted November 27, 2017 Report Share Posted November 27, 2017 works for me using the syntax smsc.exe untMain.pas -output-name=G:\test.js jorn and Jim Mack 1 1 Quote Link to post Share on other sites
Moderators lynkfs 613 Posted November 27, 2017 Author Moderators Report Share Posted November 27, 2017 thanks typo on my side Quote Link to post Share on other sites
IgorSavkic 113 Posted July 9, 2020 Report Share Posted July 9, 2020 What is the syntax for smsc to compile sproj file? It's a visual project file that compiles fine from within IDE. Quote Link to post Share on other sites
Moderators lynkfs 613 Posted July 10, 2020 Author Moderators Report Share Posted July 10, 2020 The syntax is Usage: smsc [@optionFile] [options] project_name[.sproj|.pas] [options] -output-name=<fileName> Output file name -resource-path=<paths> Resource directories -unit-path=<paths> Unit directories -verbosity=none|normal|verbose Verbosity level -hints=disabled|normal|strict|pedantic Hints level -stage=compile|codegen|output Last compile stage -defines=<defines> Custom conditional defines -search-path=<paths> Search path -closures=yes|no Enable/disable closures -code-packing=yes|no Enable/disable code packing -check-assertions=yes|no Enable/disable assertion checks -check-condition=yes|no Enable/disable condition checking -check-instance=yes|no Enable/disable instance checking -check-loop=yes|no Enable/disable loop checking -check-range=yes|no Enable/disable range checking -compress-css=yes|no Enable/disable CSS compression -devirtualization=yes|no Enable/disable de-virtualization -emit-locations=yes|no Enable/disable source location -emit-cache-manifest=yes|no Enable/disable app-cache manifest -emit-chrome-manifest=yes|no Enable/disable chrome app manifest -emit-source-map=yes|no Enable/disable source map -inline=yes|no Enable/disable code inlining -obfuscation=yes|no Enable/disable obfuscation -optimization=yes|no Enable/disable compiler optimization -rtti=yes|no Enable/disable RTTI -smart-linking=yes|no Enable/disable smart linking -logo=yes|no Show/hide logo I must admit I have not used it much but out of the box this works for me smsc "C:\Users\....\MyProjects\window\window.sproj" -output-name="C:\Users\....\MyProjects\window\window.js" or even without the -output-name parameter it compiles and links into whatever is specified in the project file (like '\www\main.js') Quote Link to post Share on other sites
IgorSavkic 113 Posted July 14, 2020 Report Share Posted July 14, 2020 Thanks, I've tried but it always fails. It works for simple projects (some of demos I've tried) but more complex ones are no go. Does IDE itself uses smsc to compile? If so perhaps I could intercept somehow what it sends. Quote Link to post Share on other sites
Moderators lynkfs 613 Posted July 14, 2020 Author Moderators Report Share Posted July 14, 2020 I've just compiled some large regular projects and some based on my own rtl : no problems so maybe your projects have some special dependencies, or ... just to be sure, how I tested this : - navigated to the smsc directory - opened cmd window - smsc "G:\SMS3.9.1\Projects\animate5\animate5.sproj" tested with fully developed projects (Not sure, but don't think the ide itself uses smsc) Quote Link to post Share on other sites
Administrators jarto 727 Posted July 15, 2020 Administrators Report Share Posted July 15, 2020 The IDE does not use smsc.exe to compile. However, it uses the same source code for the compiler. AFAIK, you should be able to compile all the complex projects also with the command line compiler. If you have trouble with that, make sure that you are using the right compiler. If you have several versions of SMS installed, it may be that you run an older version of smsc.exe du to it being in your path. If that doesn't help, you can zip the project and e-mail it to me (jt at smartmobilestudio.com) and I'll have a look where the problem is. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.