Eclipse Project Printing - eclipse

I have to print out one of my projects and the built-in print function of Eclipse isn't doing a good job at all. Font, font size, page border etc..
Does anyone know a plug-in or tool to print out my whole project easily? Maybe with some formatting options on it?
After a little bit google, I've encountered enscript but its an Linux tool and unfortunately I'm on a Windows machine.
Regards

The most recent plugin about printing and printing preview is:
swt-paperclips
a simple, light weight, extensible Java printing plug-in for SWT.
PaperClips hides the complexity of laying out and rendering documents on the printer, helping you focus on what to print instead of how to print it.
In a nutshell, PaperClips provides an assortment of document "building blocks," which you can tweak and combine to form a custom document.
The assembled document is then sent to PaperClips for printing.
PaperClips includes support for printing text, images, borders, headers and footers, column layouts and grid layouts, to name a few. It can also be extended with your own printable classes.
Here in an example in this article:
alt text http://www.schmeeky.co.uk/assets/drgalleries/19/thumb_print_dialog.png

Eclipse does a terrible job printing on Windows. But there is an excellent version of Enscript that works for Windows and does great printouts. You have to set it up as an external tool which is a bit of a bear, but once it's setup it works well.This how I installed it on XP.
Download and install Enscript for Windows
http://gnuwin32.sourceforge.net/downlinks/enscript-src.php
Create an external tool for running Enscript in Eclipse
Goto Eclipse, Run -> Configure External Tools. Add a tool (icon looks lie a miniature document with +)
Name it "Run Enscript". Configure as follows:
Main Tab
Location : browse to the Enscript executable. Should be in:
C:\Program Files\GnuWin32\bin\enscript.exe
Working directory: leave empty
Arguments:
--header=${resource_name} -p "${workspace_loc}\${project_name}\print.ps" "${resource_loc}"
(These options will create a postscript file named print.ps at the top level of your project from the currently selected window.)
Build Tab
Clear "Build before launch" or it will try to rebuild your project each time you print..
Send the file to the printer
You need to find a way to send the file to the printer. Several utilities to do that, but since I had a postscript capable printer all I had to do is to share it under Windows, and copy the file to the share name. I automated this by adding another external tool, named "send ps file to printer"
Main Tab
Location: C:\WINDOWS\system32\cmd.exe
Working directory: leave empty
Arguments:
/c copy "${workspace_loc}\${project_name}\print.ps" \\your-machine-name-here\your-printer-share-name-here
(this will pick up the file we just created and send it to the printer)
Build Tab
Clear "Build before launch"
Voila, two clicks to run the tools one after the other and it prints clean. You can configure it further by adding Enscript options to the argument line. Here are a few useful ones:
- specify a slightly smaller font size (default is 10):
-f Courier8
- truncate lines instead of wrapping: -c
- precede line with its line number: -C

Related

With Unity version 2020 and onwards, how to build for Windows to a single file?

I'm struggling to find any method that works with current Unity.
This for a conventional Windows build (not a Windows Universal via VS).
So, there's the separate data, dll, etc files of a build: how to create a civilian-usable "single exe" for Windows, with current Unity??
As said afaik this was actually always the case.
See e.g. Windows standalone Player build binaries to see a list of resulting output of a build. It exists back until version 2017.2.
So the short answer is:
It is how it is. You will always get multiple files and the data folder as output.
What you can do however is using a pack tool which simply packs all your folder content into one single exe file.
One example is Appacker
=>
BUT unfortunately there is one known issue: Windows Defender recognizes it and every exe created with it as malware. The reason for that is actually mentioned by the author in the link
Spoiler: A self-extracting .exe file? Windows Defender hates that trick!
So either with this tool or any similar one there is no real way around that except you need to trust the tool and your users need to trust you ^^
(The icon is also only used for the process window, not for the exe file itself ^^)
The long and correct way would probably be to create an actual installer for your final app which is then allowed to extract all the files to a certain location.
So in the end the user anyway will again have an exe and according data and dll files e.g. in the Programs folder but get a registered shortcut to the Start Menu which is just how any other application on Windows usually works like.
Just to add to the answer.
In 2020 if it's a game you should just use Steam. Making auto-update way easier for your users.
https://partner.steamgames.com/doc/gettingstarted

Not able to check out files with long names in ClearCase Explorer

I am not able to find checkout option for a file when I right click on it in ClearCase explorer while the option is available for rest of the files.
The only difference is that the file I want to check in has a very long name ( I am using Windows ).
While I am able to check in via cleartool commands, it isn't possible from front end ( CC explorer) Is there any way to check out such files from CC explorer?
There are two possible causes for a checkout unavailable:
the path of the file itself is too long (combined with the long filename, more than 256 characters): a subst command can help shorten the path.
or the file is already checked out.
A cleartool status can help distinguish between those two cases.
And a cleartool lsvtree -graph aFile (replace aFile with your long filename) can help see the file history and see if it is checked out (reserved or not) in another view.
The window 255 characters restriction for file name can't be bypass or any sidestep if it.
You have the following options:
1. Try to shorten the name. Including all the folders that are the prefix for the view. Like vonC suggested.
2. Try create the view on Linux, and mount the folder to some shared area that can be seen in windows.
3. Use dynamic view, but Im not sure it will work.
Keep in mind, that other apps can also fail even after you solve it for clearcase as it is a Windows problem. Like msbuild or visual studio.

How to add a DLL Plugin without NSH file into my NSIS script?

I'm using NSIS 2.46. Plugin I'm trying to use is HwInfo plug-in (Official Link). The ZIP file comes with some source codes and a DLL file. I put the HwInfo.dll inside \NSIS\Plugins directory. When adding a plugin, I'm supposed to !include the .nsh file as well, which HwInfo does not supply.
I'm trying to analyze the client's harware before installing-
Function .onInit
HwInfo::GetCpuSpeed
StrCpy $R0 $0
MessageBox MB_OK "You have a $0GHz CPU"
HwInfo::GetSystemMemory
StrCpy $0
MessageBox MB_OK "You have $0MB of RAM"
FunctionEnd
But the line HwInfo::GetCpuSpeed is 'invalid command'.
How do I use a plugin without a NSH file? And are there any alternatives?
Solved:
I added !addplugindir "${NSISDIR}\Plugins" at the very top of this script. This helped detect HwInfo.dll inside \NSIS\Plugins directory at compile-time.
Not all plugins have a .nsh file but the wiki page usually tells you how to use a specific plugin.
If you run makensis /V4 yourscript.nsi it will list all plugins and the functions they export, if your plugin is not on the list it is probably not in the correct directory. Make sure you put it in the correct directory or use !addplugindir...
I know this question has an accepted answer, but for info for people using NSIS v3.x:
The plugin folder now has two sub-folders, one for ANSI and one for UNICODE, so you'd need to copy your plugins into ${NSISDIR}\Plugins\x86-ansi\ and ${NSISDIR}\Plugins\x86-unicode\ for the ANSI and UNICODE versions of the plugin dlls respectively.
I'm guessing if you use the 64-bit NSIS port, you'd have \x64-ansi\ and \x64-unicode subfolders too, but I've not checked that specifically.

Modify Eclipse RCP startup args in protected directory

I am enabling internationalization for my RCP application. The preferences tab allows the user to select between languages. I understand that Eclipse (3.7) has to load the language at start-up and can not dynamically change languages.
I know of three approaches to accomplish this:
1) Modify the OS level shortcut to pass in -nl XX
2) Change the app.ini file to have -nl XX (on separate lines)
3) Change the config.ini to have osgi.nl = XX
The issue with these approaches is that they all require write permission to the application directory. When running under Vista / Windows 7 and Linux implementations that do not provide write access to programs, a normal user does not have permissions to modify these files.
Is there another approach to pass in arguments that change the VM language? Is there a workaround for the file protection provided by the OS?
In Windows the application directory is write-protected for a good reason. Fortunately one can set Eclipse Runtime Options to configure where the RCP application should store
configuration data
workspace data
This can be accomplished in two ways:
setting command line arguments (-configuration , -data)
defining system properties (osgi.configuration.area to , osgi.instance.area to ) for example in config.ini
For further information see Runtime Options in official Eclipse Help.
In Windows such data should be stored in the user directory.
By the way you should be able to locate these settings in the Installation Details pane of the standard About dialog.
However setting these properties is a bit tricky. In my case the application installer evaluates the location of the user directory at installation time and modifies the config.ini file accordingly.

Deploy a Desktop Shortcut to a Device running Windows CE 4.2 (VS2005)

I have an application written using VS2005 in C# targeting the Compact Framework 2.0 SP2. As part of the solution, I have CAB deploy project which deploys to the device without a problem. What I can't do is create a shortcut to my application on the devices desktop.
I have spent several hours reading various bits of documentation (why is the search at the MSDN site so bad?), followed the instructions but no joy.
What I've done is:
Add the "Windows Folder" node to the File System
Created a folder underneath that named "Desktop"
Created a shortcut to the Applications Primary Output and placed that in the "Desktop" folder
What am I missing?
A bit late but maybe this will help somebody like me who searched for this issue, I solved the problem like this:
I added a custom folder on the root node (File System on Local Machine) and called it %CE3%.
That is the shortcut for \Windows\Desktop.
I added my shortcut (right click create new shortcut) and gave it a name.
That's it, then I build!
When analysing the Shortcuts section in the inf generated, it looked good.
[Shortcuts]
"ShortCutName",0,"MyApp.exe","%CE3%"
And when I deployed and it worked perfectly!
I'm using VS2008 and deploy on windows CE 5.0
Here is a list of shortcuts: windows CE shortcuts
A Windows CE shortcut (CE of any version or flavor, including WinMo) uses a ASCII-text based file. They are in the form:
{XX}#{PATH}
Where:
XX = the number of the characters in the path, to include the number a # sign
PATH = fully qualified path to the file to run
For example:
20#\Windows\calc.exe
The other option is to use the CEShortcuts section of the INF file used to generate your CAB.
In the [DefaultInstall] section of the INF, set the CEShortcuts to a section name of your choice (something like "Shortcuts"), then add that section with your shortcut descriptor. MSDN details it here.
MSDN also has an article on creating a deployment project to generate the cab (available here), but in all honesty, the project capabilities are limited and IMO the tool just generally sucks. To this day we still use direct calls to CABWIZ (which also sucks, but it's our only choice) with hand-written INF files.
I had this same problem and found a simple solution, if anyone still needs this.
Instead of adding a windows special folder, just add a custom folder named Windows, then a folder within it named Desktop, and put the shortcut there.
This worked for me.
The Simplest way is to go into the Application folder in Cab Project(setup), right click on your EXE Program(Application exe that you want to make shortcut for) and chose "Create Shortcut to" and move that file to any folder you want such as "Start Menu Folder"
Mitch: create the LNK file as before, but give it a name like "shortcut.lnkx" (note the "x" on the end). You can then add it to the "Desktop" folder in your CAB project. Once the file is added, change the TargetName property to "shortcut.lnk" and compile. I think this will work.
Assuming that you use Windows Mobile (5.0 or 6.x) you could use that syntax to create a file as a shourtcut(*,lnk):
SHORTCUT = XX#"\Program Path..."?\Icon File Path...,-Icon Number
Where:
XX = Count of characters to be included in arguments after the Program Path to process.
Program Path = Target exe file location.
Icon File Path = If exe file does not contain an icon image or you want to use another, this is the location of the file containing the icon image.
Icon number = Index of icon image within the file, it starts with 0.
Ex: 86#"\Storage Card\Logical Sky CEdit\cedit.exe"?\Storage Card\Logical Sky CEdit\cedit.exe,-101
I had test it, and works fine.
1.Copy the file.
2.Go to desktop (or wherever you want to create the shortcut).
3.Right click on an empty space, click Paste Shortcut.
That's it.
Actually, this is pretty simple ! (Using VS 2008 and Smart Device CAB project)
1- In the solution explorer on VS, Go to your CAB project and right-click on it.
2- Go to View -> File System
3- Here, on the left column, right-click and "Add Special Folder"
4- Select Start Menu Folder for the shortcut folder
5- Go to the Application Folder just above
6- On the right column, right click on the Primary output and select "Create shortcut to bla bla bla"
7- Then you just have to move it to the start menu folder on the left and rename the File :)
OPTIONAL: You can even add fonts to the device using "Fonts folder" in the "Add Special Folder" menu !
Cheers
I assume that you're working with a "Smart Device CAB Project"? I don't think this project creates shortcuts in the correct manner for Windows CE 4.2. I think you can download an SDK from Microsoft that after installation will show you something like "Windows CE CAB Project" as a project option.
I think you can do this manually, though. A Windows CE shortcut is a file with a *.lnk extension, so if you want a shortcut labeled "My Application", create a text file on your PC named "My Application.lnk". The file's contents should be:
46#\Program Files\My
Application\MyApplication.exe (the # should be the full path length)
or whatever full path your application has on the Windows CE device.
In your CAB project, continue with adding the "Windows" folder and then the "Desktop" folder as you were. In the Desktop folder, right-click and add the LNK file that you created. You may have to soft-reset the device in order to have the shortcut show up after installation.