Obfuscation in Ext Js 4.2 with Sencha CMD 3 - extjs4.2

I just installed all the required tools for the new Sencha Cmd(Ruby, Compass, Ext Js 4.2 SDK) everything works fine, but I don't know how to obtain the unique obfuscated file from the .js sources in my Ext Js application.
Any help, please? Thanks in advance.
I tried the "sencha app build" command from all the folders in my application path, always get the "Please ensure this command was executed from a valid application directory. Unable to locate 'app.dir' config property from 'sencha.cfg'
After more reading about the subject I think before the "sencha app build" command to work I need to generate the bootstrap.js file manually because my application wasn't generated using the framework, but I'm stuck here also. Anyone ever did that? Please?

The best way to get things work if your have legacy project (when project structure is not generated by sencha cmd tool) is to generate empty project and the move all necessary files/folders in to your existing project and try to adjust all configurations. You will need to move:
.sencha folder
folder with extjs development classes
bootstrap.js, bootsrap.css, build.xml
modify you start page correspondingly (index.html, index.jsp, or whatever)
create application.js to start your application
bootstrap files are always generated automatically. To generate it normally you have to use sencha app refresh command.
Basically the most important changes have to be made in .sencha folder. Most of the config files in this folder have a lot of comments so this is not a problem to understand what to change. Also it's good idea to refer official doc page: Sencha CMD

Related

How to embed third party framework on ionic capacitor custom plugin?

I am developing an Ionic Capacitor plugin which imports 2 iOs .framework files and a .bundle that refers to one of this .framework files. The thing is that no matter how I link/embed and point/copy this files on the plugin project, xcode claims, on the app project, that it cant find the module in the swift file.
I already tried to add the files to the project, used the "Embedded binaries" option, linked libraries, allow non-modular includes (on build options menu), add the files to the headers (on build phases), and so on....
The line that xcode point the error is:
import OneFramework
And xcode claims:
No such module 'OneFramework'
I was expecting that when I add the plugin to my app project via npm, and later running a "$ rm -rf ios && ionic capacitor run ios" to run the app, xcode find all the modules of the plugin that I am trying to do.
I found the solution. To achieve this the first thing to know is that when you do npx #capacitor/cli plugin:generate what the CLI do for you is the generation of a cocoa pod. The root of this pod is the generated folder itself.
With that in mind, the next thing to do is to learn how to make pods, but i'll sumarize the principal aspects that led me to the success.
-First of all you open the *.xcworkspace. Followed by that, click on the "Add Files to Pod..." option and add your files. Please ensure that the "Copy files if needed" option is marked. Please refer to the picture below.
-Now its nice to create a folder for your .framework and another for the .bundle (if there are any) files. Do this by right clicking the Pods project and select the option "New group". Select a name like that is different from the pattern of xcode, it is nice to know that this folders are created by you.
-If you done this right, the frameworks you recently added to the project will appear on the pods project like this:
-Now, for your swift implementation find your files, drag your .frameworks that are on the pods project for the "Frameworks, Libraries and Embedded content" of the plugin project. The result will be something like this:
-Ok, files included and linked. Now we should let our cocoa pod know about this and declare this files. The file "YourAwesomePlugin.podspec" (located at the root of the plugin project) is the main entrance of the pod. In this file you will declare which files (.frameworks, .bundle, etc) belong to your pod and consequently will belong to your plugin when you npm install it. To declare this you'll need three directives:
s.vendored_frameworks = 'ios/Pods/YourFrameworkFolder/**'
s.resource = 'ios/Pods/YourResourceFolder/YourBundle.bundle'
s.xcconfig = {'ENABLE_BITCODE' => 'NO'} #This is mandatory on my case, but you need to evaluate if this options applies to your plugin.
-Now we hit play on the plugin project. To test on your app if the plugin is ok, you need to add the path of the root of the plugin project on the podfile of the pods project of the APP project. Like this:
-To install it you can go on Yourproject/ios/App and run pod install.
Please note that:
To declare the existence of your recently created plugin you you need to do some declarations as well, but this part is easy and already documented on capacitor/plugin docs.
The installation method via pod install that I suggested is for testing. It would be nice if you pack your plugin using npm and npm install it like all other plugins.
I dont have much knowledge on cocoapods like I wish, but this works and I think that is a clean solution. If not, please let me know.
If this answer is useful for you, please thumbs it up, it is a week of research and trying that I am sharing, along the time to write it all down.

how to run doctrine.php in command prompt

I'm trying to use Doctrine with Zend, I have copied the doctrine.php and doctrine file in the script folder in the Source Files folder.
However when I type in command prompt following command: "php doctrine.php" by entering in the scripts folder, Nothing happens, there is no error printed, the cursor just goes to next line. Can someone please tell me how can I use doctrine.php.
When using Guilherme's integration suite, you need to do a couple of things.
Download / clone the Doctrine Common, DBAL and ORM libraries and make sure they're available in your include path. For this, I usually just copy the lib/Doctrine code from each into my project's library folder. If using git, you can add them as subtree splits but that's a topic for another time ;-)
You also need the Symfony Console and Yaml namespaces. Again, it's easiest to place them in your project's library folder under library/Symfony/Component/Console and library/Symfony/Component/Yaml. These usually come as submodule dependencies in the Doctrine libraries but you can also get them from their github pages
Console
Yaml
Remove the bootstrap('Config') call from the doctrine.php script. Don't know what Guilherme was thinking there :-)
That's it, from there it should work as expected.

Developing with Qooxdoo and multiple developers

I'm interested in Qooxdoo as a possible web development framework. I have downloaded the SDK and installed it in a central location on my PC as I expect to use it on multiple projects. I used the create-application.py script to make a new test application and added all the generated files to my version control system.
I would like to be able to collaborate on this with other developers on other PCs. They are likely to have the SDK installed in a different location. The auto-generated files in Qooxdoo seem to include the SDK path in both config.json and generator.py: if the SDK path moves, the generator.py script stops working. generator.py doesn't seem to be too much of a problem as it looks in config.json for an updated path, but I'm not sure how best to handle config.json.
The only options I've thought of so far are:
Exclude it from the VCS, but there doesn't seem to be a script to regenerate it automatically, so this could be dangerous.
Add it to the VCS but have each developer modify the path line and accept that it might need to be adjusted whenever changes are merged.
Change config.json to be a path and a single 'include' line that points to a second file that contains all the non-SDK-path related information.
Use a relative path to the SDK and keep a separate, closely located copy of the SDK for every project that uses it.
Approach 1 would be ideal if the generation script existed; approach 2 is really nasty; I couldn't get approach 3 to work and approach 4 is a bit messy as it means multiple copies of the SDK littered about the place.
The Android SDK seems to deal with this very well (using approach 1), with the SDK path in its own file with a script that automatically generates that file. As far as I can tell, Qooxdoo puts lots of other important information in config.json and the only way to automatically generate that file is to create a new project.
Is there a better/recommended way to deal with this?
As an alternative to using symlinks, you can override the QOOXDOO_PATH macro on the command line:
./generate.py source -m QOOXDOO_PATH:<local_path_to_qooxdoo>
(Depending on the shell you are using you might have to apply some proper quoting of the -m argument). This way, every programmer can use his locally installed qooxdoo SDK. You can even drop the QOOXDOO_PATH entry from config.json to enforce this.
We work with a symbolic link pointing to the sdk ... config.json contains just the path of the link.

Appcelerator Titanium Mobile: app.js not found

I created an app with Appcelerator's Titanium Mobile on my home machine. The path was /Users/[myusername]/Projects/ProjectName.
I checked my code into Mercurial.
The next day, at my office computer, I cloned the Mercurial repo, and then added the existing app. I tried to run it in the simulator and received the error:
could not find the file app.js.
I looked at the log and noticed that the path it was looking for was the path on my home computer, not the path on my office computer.
What can I do to make my app run on two different computers? I imagine that if I created a new app and then copied my code into it, it would probably work on the office machine. But if I checked my code in, and got latest at home it would probably be broken there.
Open tiapp.xml
Remove the line. f01a795a-46e7-4627-8558-465e5998c99d
Do a full rebuild
Bring guid tag back (just to make sure you still have it on tiapp.xml)
Do a full rebuild again.
Here's the source:
http://www.limechalk.com/blog/fix-runtime-error-when-running-appcelerator-app-on-android-emulator/
Can you re-create a new project? copy your files tiapp.xml as well as folder Resources to your new project and build again.
This issue mainly caused by JavaScript minification,either you have syntax error in one or more js files or which is hard to predict may you have some other files in you project that are not js files and cause this failure to build and then this common error .
my two cents open up you project files and look carefully for any file or files that are not supposed to be in it.

How do I create a new folder and deploy files to the 12 hive using VseWSS 1.3?

I have created a web part using VSeWSS 1.3. It creates a wsp file and my web part gets installed, everything works great.
I would like to also create a folder in the LAYOUTS directory of the 12 hive and place a couple files in there. How do I go about doing this? I know that I can manually place the files there, but I would prefer to have it all done in one fell swoop when I uses stsadm to install my solution.
Is there a best practices guide out there for using VSeWSS 1.3 to do this? They changed a bunch of stuff with this new version and I want to make sure I don't mess anything up.
You can create a new folder structure in your webpart project, like:
Templates/Layouts/CustomFolder and put your files in the CustomFolder directory and include them in your project.
When you go to the WSP View in Visual Studio, you can see in the manifest.xml that your files are being included in the deployment.
I have done this successfully on multiple projects now.
In case anyone is wondering, the VSeWSS 1.3 user guide is incredibly helpful. It is installed to the same directory as the tool itself, default in C:\Program Files\Microsoft SharePoint Developer Tools 9.0\VSeWSS13.CHM
You can see a working example with screenshots Here
A simple step-by-step tutorial for the above, along with deploy/retract scripts is here at Add New Files To 12-Hive Through A SharePoint Solution. Just follow the steps and in a few minutes you'll be able to add whatever you want to the 12-Hive!