Jump to content

How can I make these?


Kelsenellenelvian

Recommended Posts

Time for a new Tutorial. At first there are new versions of all the stuff that's needed. Secondly are there much improvements and is there an easier way to make a 7-Zip Installer now. Third: I think most people don't know this all.

Tutorial:
1. Download the right 7zSD. Extract and place the 7zsd.sfx in a new folder.
2. Go to here and download the 7za***.zip (where *** is the version number) from the latest 7-Zip command line version. Extract and place only the 7za.exe in the same folder as 7zSD.
3. Download UPX here. Extract and place only the upx.exe in the folder where 7zSD and 7za are placed.
4. Make a subdirectory with the name Bin and copy all installation files to.
5. If you want, you can change the icon of the installer by replacing the icon in 7zsd.sfx using ResHacker as described here.
6. You can also change the version info of the executable using ResHacker. Go to the folder Version Info in ResHacker by opening 7zsd.sfx and rename the values of "CompanyName" and "FileDescription".
7. Create a Config.txt in the same folder as 7zSD, 7za and UPX.

Open it and set:
RunProgram="program.exe -switch"

Replace program.exe with the name of your installer (including the extension). Replace -switch with the desired switch(es) to be used. Many switches of different programs can be found here.

For a full silent 7-Zip install you add:
GUIMode="2"

It's not needed any more to add StartX.exe, msistub.exe or other supplementary tools. Then "waiting" is enabled by default for 'RunProgram=', unless 'nowait:' parameter is used. Also reg-files aren't needed any more. They can be configured in the Config.txt.

For a Register Entry (If you use a lot of Register Entries it's smart to use the parameter SetEnvironment to save time):
RunProgram="hidcon:cmd Register Entry"

Keep this in mind: you MUST use DOUBLE backslashes (\\) wherever you normally use backslashes (\) (e.g. in paths or dialog texts). Similarly, if the Value contains double quotes ("), you MUST precede them with a backslash (\").

Now, your Config.txt looks like this:
;!@Install@!UTF-8!
GUIMode="2"
RunProgram="program.exe -switch"
RunProgram="hidcon:cmd Register Entry"
;!@InstallEnd@!

You can add, edit and remove lines if you want.

* All available configuration parameters and other helpful information can be found here (site is just translated from Russian to English).

8. Save Config.txt with UTF-8 encoding by selecting "UTF-8" from the dropdown menu in the "Save As..." dialog in Notepad.
9. Make a Create.cmd in the same folder as the Config.txt and past the following:
upx --ultra-brute 7zsd.sfx
cd Bin
..\7za a "..\Program.7z" -r * -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on
cd ..
copy /b 7zsd.sfx + Config.txt + Program.7z Program_Name.exe
del Program.7z

10. Rename Program_Name to your own program name and run your Create.cmd.
11. Congratulations: you have guaranteed the littlest 7-Zip Installer as possible.

Tool:
Utility that can extract 7z archive and config file (Config.txt) as well as SFX module (7zsd.sfx) from 7z SFX archive. It has the name 7z SFX Archive Splitter (from the 7z SFX creator) and you can download it here (always linked to latest version).

EnJoy. biggrin.gif
Link to comment
Share on other sites

  • 1 month later...

Please edit the syntax for the 'Create.cmd' batchfile, so that '*.*' is changed to '*'.

7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't follow the archaic rule by which *.* means any file. 7-Zip treats *.* as matching the name of any file that has an extension. To process all files, you must use a * wildcard.
Edited by Martin H
Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
  • 5 years later...

from this post i decided to make a command line batch with some useful features:

 

- installation and portable mode

- easy creation from command shell (batch directory in system PATH)

- adds entries to context menus (extract config from exe and add compiling batch to directory)

- sfx module selection (silent, dialogs or custom)

- bit selection

- multiple runprogram modes:

    > "file.ext /switches"

    > "config.txt" in target folder

    > "!template" from ini file

- automatic utf-8 encoding

- customizable settings in ini file

- predefined config.txt environment

- upx compression

- silent and verbose run

- md5 file creation

- it's all batch! :)

 

help file explains more specific features and usage

changes might still happen

 

download the installers created with the batch

 

edit:

 

added it to wincert downloads

Edited by Profess0r1011000
Link to comment
Share on other sites

the editor here is crazy. tried pasting that code like 10 times :\ but it's correct now. i'll just NEVER edit it again :P

 

EDIT:   i just edited it again... and again... and then another time

 

*edit monkey*

Edited by Profess0r1011000
Link to comment
Share on other sites

Hopefully, you are at least a little familiar with the BBCode that used to be the primary means of editing posts on many forum boards?
 
If so, then I have two suggestions:
 
1) It is sometimes easier to edit in BBCode mode.  You can activate it here by clicking the little block in the top left of the edit box, directly above the B, ie Bold.  That will toggle the edit box back and forth between BBCode mode and WYSIWYG mode.  In BBCode mode, everything is just text which can be more convenient at times.  It takes a bit of getting used to, but it can definitely be handy.
 
2) Once it is in BBCode mode, and the post is rendered completely in text form, some people find it more convenient to copy it to a different text editor and manipulate and massage the post there.  When you are ready to see what it will look like on the board, then you can copy it into the edit box and click "More Reply Options" where you can preview the post and go back and forth between the other text editor if necessary until it is what you want.

 

Good luck, and thanks for the work you have been sharing on the board!
 
Cheers and Regards

Link to comment
Share on other sites

Bphlpt.. :worthy:
 

Hopefully, you are at least a little familiar with the BBCode that used to be the primary means of editing posts on many forum boards?

 
indeed i am, i'm just not that good at spotting stuff like that. and most other forums i'm on does not have that option. i think....  :g:
 

some people find it more convenient to copy it to a different text editor and manipulate and massage the post there


i guess i'm one of those people. at least when i'm trying to post long posts. having to work in that tiny input window is a drag hehe. thanks for showing me the (now very obvious) bbc switch.  ^_^ you made my day!

Edited by Profess0r1011000
Link to comment
Share on other sites

You're quite welcome. I'm glad you can make use of my suggestions. Here's another helpful hint:
 

... having to work in that tiny input window is a drag hehe.


I'm not sure if you were being coy or not, but in both the quick and full edit box you can click and drag the bottom right corner to make the edit box bigger. :)

Cheers and Regards

Link to comment
Share on other sites

haha. sometimes i wonder how i find my own bed at night. these small things slips right pass me. i would have turned gray if it wheren't for your suggestions.

thanks again for another time saver :) now editing my posts won't be such a drag.

Edited by Profess0r1011000
Link to comment
Share on other sites

  • 6 months later...

Here is one simplified helpful software for the same (based on the 7z modified SFX module) with ALL the functions of the modified SFX module and is better than 7-zip SFX Maker:  http://sourceforge.net/projects/s-zipsfxbuilder/

I use this for building 7zip SFX type RePacks. :) Easy! ;)

Edited by niTe_RiDeR_Pro
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...