سلام
استاد عزيز، دستورات كامل انجام شد و فايل اجرايي (Starter) به همان صورت در محل خودش توليد شد ولي در اجرا پيام خطاي معتبر نبودن فايل در سيستم 32 بيتي را ميدهد!
كجاي كار ممكن است اشتباه باشد؟
سلام
استاد عزيز، دستورات كامل انجام شد و فايل اجرايي (Starter) به همان صورت در محل خودش توليد شد ولي در اجرا پيام خطاي معتبر نبودن فايل در سيستم 32 بيتي را ميدهد!
كجاي كار ممكن است اشتباه باشد؟
دوستدار هميشگي شما "eDvArDo"
دلِ هر ايراني كه براي ايران نميتپد، بهتراست نتپد! (پروفسور حسابي)
آيا پاسخ سوالي را بدانم بهتر است، يا اينكه ندانسته از دنيا بروم؟! (ابوريحان بيروني)
پس از سالها جهد و تلاش در كسب علم و معرفت، دانستم كه هيچ ندانستم! (علامه حسن زاده آملي)
لطفا" فایل نهائی را که لینکش را گذاشته ام ( هردو برنامه موردبحث) دانلود و تست کرده
و با فایل خودت مقایسه کن
http://www.mediafire.com/download/v9..._Portables.rar
[SIGPIC][/SIGPIC]
منوی برنامه ساخته شده براساس آموزش بالا
[SIGPIC][/SIGPIC]
سلام
تنها فرق در وجود پوشه Source در پوشه برنامه هست كه حاوي دو چيز ميباشد: 1- آيكون برنامه 2- فايل كد برنامه
كه همونطور كه در آموزش خودتان فرموديد براي ساخت لانچر (فايل اجرايي شروع كننده برنامه) نياز هست.
بنده دارم ولي در شما قرار نداديد، چرا؟
در برنامه winrar هم شما اين پوشه را قرار نداديد!
دوستدار هميشگي شما "eDvArDo"
دلِ هر ايراني كه براي ايران نميتپد، بهتراست نتپد! (پروفسور حسابي)
آيا پاسخ سوالي را بدانم بهتر است، يا اينكه ندانسته از دنيا بروم؟! (ابوريحان بيروني)
پس از سالها جهد و تلاش در كسب علم و معرفت، دانستم كه هيچ ندانستم! (علامه حسن زاده آملي)
سلام
استاد شايد سوالم كمي پيشپا افتاده باشد ولي ميخواهم بدانم چطوري فايل اجرايي activate را كه حاوي پوشهwinrar كه در داخلش فايل كد رجيستري برنامه قرار دارد را با آيكون دلخواه ساختيد؟ با NSIS ياAutoIT ؟ يا شايد Resource Hacker ويا ترفندهايي ديگر؟
لطفاً آموزشش را قرار دهيد، لطفاً
استاد، سپاس
ویرایش توسط eDvArDo : 06-09-2013 در ساعت 01:30 PM
دوستدار هميشگي شما "eDvArDo"
دلِ هر ايراني كه براي ايران نميتپد، بهتراست نتپد! (پروفسور حسابي)
آيا پاسخ سوالي را بدانم بهتر است، يا اينكه ندانسته از دنيا بروم؟! (ابوريحان بيروني)
پس از سالها جهد و تلاش در كسب علم و معرفت، دانستم كه هيچ ندانستم! (علامه حسن زاده آملي)
درود
1.در انتهای کار (که هنوز توضیح نداده ام ) نیازی به پوشه Sources و محتویاتش نیست.
2. محتویات پوشه Sources خودم را برای هردو برنامه توضیح داده شده برای استفاده جنابعالی
و دیگر عزیزان در لینک زیر آپلود کردم تا زیاد اعتراض نکنی
http://www.mediafire.com/download/3zggdxremhm2324/Sources.rar
3. در مورد سوالتان ، عزیزان دیگری هم موضوع برایشان جالب بوده و به نوع های مختلف توسط
پیام و غیره سوال داشتند
تاپیکی با نام کرک کردن کامل WinRAR 5.00 Beta 5 درست کنید تا پس از پایان این بحث آن
را هم توضیح دهم.
[SIGPIC][/SIGPIC]
استاد عزيز، لينكي كه قرار داديد فقط فايل نصبي winrar هست!!!
دوستدار هميشگي شما "eDvArDo"
دلِ هر ايراني كه براي ايران نميتپد، بهتراست نتپد! (پروفسور حسابي)
آيا پاسخ سوالي را بدانم بهتر است، يا اينكه ندانسته از دنيا بروم؟! (ابوريحان بيروني)
پس از سالها جهد و تلاش در كسب علم و معرفت، دانستم كه هيچ ندانستم! (علامه حسن زاده آملي)
حق با شماست شرمنده شدم . نمیدانم چرا لینک را اشتباه گذاشتم
بهر حال لینک فایل های سورس عبارت است از:
http://www.mediafire.com/download/3z...24/Sources.rar
[SIGPIC][/SIGPIC]
استاد اين روش (Portable software (PortableAppZ.blogspot.com مشابهت داره؟
بنظر ميرسه با همون سبك و سياق هستند، اينطور نيست؟
Applications that only use files in their folder are naturally portable, but most of them use registry, files and folderson host computer (local).
Prepare portable
Get program files
First of all you have to extract files from setup with a program such as Universal Extractor and if you can't you have to install. In this case monitor setup with Total Uninstall (doing so you will be able to clean your computer and know what need program).
The simpliest example is CCleaner, download portable and unzip in CCleanerPortable\App\CCleaner (you can create these 3 folders at one time with Total Commander).
Monitor running and/or setup
Launch Total Uninstall, click Install, Browse to CCleanerPortable\App\CCleaner\CCleaner.exe
Click on Next to Build A New Snapshot
Click on Next to Launch setup application Now
CCleaner launch in english. Look in Options-Advanced that Save all settings to INI file can't be uncheck (due to portable.dat file). Choose your language in Options-Settings and close CCleaner.
Click Next in Total Uninstall to Make the post install snapshot and find the changes. Click Close to view changes:[IMG]file:///F:/SANDOOGHCHE/Portable%20software%20(PortableAppZ.blogspot.com)/PortableAppZ.blogspot.com%20-%20Portable%20software%20for%20USB%20drives_files/CCleanerTU.png[/IMG]
There is no change! CCleaner is naturally portable.
Prepare launcher
In this case launcher is useless but it can do some settings and move them in Data.
If there is no portable.dat file in its folder, CCleaner use ini file only if found in its folder. Otherwise, use registryHKEY_CURRENT_USER\Software\Piriform.
A good thing is to force use ini creating portable.dat, another is to move ini file in Data to keep settings when update.
Launcher can also write in CCleaner.ini to fix some settings:
[Options]Language=1036BackupDir=L:\PortableApps\CCleanerPor table\Backups1036 is the decimal id of french and can be returned by GetUserDefaultLangID of kernel32, we will use it to fix automatically language.
Launch app
Launcher is a small exe in *Portable folder compiled with NSIS. Download and install NSIS.
Minimal launcher
Copy-paste the script below in Notepad++ and save as CCleanerPortable.nsi in CCleanerPortable folder.
Right-click and Compile NSIS Script, it will create a some tens of kB executable
WindowIcon OffSilentInstall SilentAutoCloseWindow TrueOutFile CCleanerPortable.exeSection ExecWait "$EXEDIR\App\CCleaner\CCleaner.exe"SectionEnd
- launcher don't display icon
- launcher don't display screen output
- launcher automatically close when completed
- launcher name will be CCleanerPortable.exe
Code executed must be in Section: Execute CCleaner.exe and wait to quit ($EXEDIR is the path of the launcher)
Structured launcher
Download and extract CCleanerPortableSources in your CCleanerPortable folder.
Open in Notepad++ CCleanerPortable_1.nsi.
To use always the same parts of scrpit we use constants and we use functions called in main section to have a clear structure of running.
Lines begining with semicolons are commented and not compiled.
Read comments and search in NSIS help to understand.
Complete launcher
Open in Notepad++ CCleanerPortable_2.nsi.
Added: version info, securities before starting, customization, splash and passing receipts parameters.
You will need FindProcDLL plug-in: download and install Optimized by size binaries.
Final launcher
Open in Notepad++ CCleanerPortable_3.nsi.
Same script than 2, but common parts with all launchers are moved to PortableApp.nsh called with !include.
Backup and restore registry keys
Registry plug-in
You will need this NSIS plug-in for registry to compile.
Download, extract and Install (in Desktop): it will copy Registry.dll in Plugins and Registry.nsh in Include.
Target: Audacity 1.2.6
Download audacity-win-1.2.6.zip and unzip in AudacityPortable\App\Audacity
Monitor running of audacity.exe with Total Uninstall (don't associate to .AUP)
Open and save an audio file. Do some settings in Edit: Preferences...
Files Format: MP3 Export Setup: Find Library to locate lame_enc.dll
Directories: Choose Temp. Directory Location
Close and view changes:
[IMG]file:///F:/SANDOOGHCHE/Portable%20software%20(PortableAppZ.blogspot.com)/PortableAppZ.blogspot.com%20-%20Portable%20software%20for%20USB%20drives_files/AudacityReg.png[/IMG]
Export Registry Changes in Win9x/NT4 Registration File Type:
REGEDIT4[HKEY_CURRENT_USER\Software\Audacity\Audacity]"WantAssociateFiles"=dword:00000000[HKEY_CURRENT_USER\Software\Audacity\Audacity\Direc tories]"TempDir"="C:\\DOCUME~1\\Admin\\LOCALS~1\\Temp\\Au dacityPortableTemp\\"[HKEY_CURRENT_USER\Software\Audacity\Audacity\MP3]"MP3LibPath"="L:\\PortableApps\\AudacityPortable\\ App\\LAME\\lame_enc.dll"Only the above registry entries have to be done by launcher (others are user settings that have to be kept in Data).
Download Reg2Nsis and install context menu. Right-click on reg file and Convert to nsis script you will get this .nsh file:
WriteRegDWORD HKEY_CURRENT_USER "Software\Audacity\Audacity" "WantAssociateFiles" 0x0WriteRegStr HKEY_CURRENT_USER "Software\Audacity\Audacity\Directories" "TempDir" \"C:\DOCUME~1\Admin\LOCALS~1\Temp\AudacityPortable Temp\"WriteRegStr HKEY_CURRENT_USER "Software\Audacity\Audacity\MP3" "MP3LibPath" \"L:\PortableApps\AudacityPortable\App\LAME\lame_e nc.dll"C:\DOCUME~1\Admin\LOCALS~1\Temp is the system temporary directory: $TEMP
L:\PortableApps\AudacityPortable is the directory containing the launcher: $EXEDIR
Download an extract AudacityPortable
Open AudacityPortable_1.nsi in Notepad++
In TU monitor we saw that only one registry key was used by Audacity HKEY_CURRENT_USER\Software\Audacity but can be used by a possible installed version.
BackupLocalKeys
HKEY_CURRENT_USER\Software\Audacity is renamed in HKEY_CURRENT_USER\Software\Audacity-BackupByAudacityPortable.
RestorePortableKeys
Settings saved in Data\Audacity.reg (when closing a previous run of portable) are merged to registry.
Init
This function force settings needed to be portable, update paths and overwrite those previously restored.
Close
Audacity is closed: delete temp folder.
BackupPortableKeys
Settings saved in Data\Audacity.reg.
RestoreLocalKeys
Opposite of backup.
Backup and restore folders
Target: Instant Color Picker
Download icp_setup.exe and extract files with Universal Extractor or Inno Setup Unpacker
Copy the content of {app} in
InstantColorPickerPortable\App\InstantColorPicker
and the content of {userappdata}\Young Smart Software in
InstantColorPickerPortable\Data\InstantColorPicker
"Install" icp.exe with Total Uninstall
Close and view changes:
[IMG]file:///F:/SANDOOGHCHE/Portable%20software%20(PortableAppZ.blogspot.com)/PortableAppZ.blogspot.com%20-%20Portable%20software%20for%20USB%20drives_files/ICP.png[/IMG]
ICP only use Young Smart Software folder in C:\Documents and Settings\Admin\Application Data ($APPDATA for NSIS)
Download and extract InstantColorPickerPortable.
Open InstantColorPickerPortable_Lite.nsi in Notepad++
BackupLocalDirs
In Application Data, Young Smart Software folder is renamed in Young Smart Software--BackupByInstantColorPickerPortable
RestorePortableDirs
Portable settings in Data\InstantColorPicker are copied in Application Data\Young Smart Software.
(We have to use CopyFiles instead of Rename because drives are differents).
BackupPortableDirs
ICP is closed, we do reverse of RestorePortableDirs.
RestoreLocalDirs
Reverse of BackupLocalDirs
Backup and restore files
Same way than for folders. Download this template where you will foud actions on registry, folders and files.
If you have several of them you have to copy lines and increase index of lines with tab:
!define REGKEY1 "HKEY_LOCAL_MACHINE\SOFTWARE\MyProg" !define REGKEY2 "HKEY_CURRENT_USER\Software\MyProg";... ${registry::DeleteKey} "${REGKEY1}-BackupBy${APP}Portable" $R0 ${registry::MoveKey} "${REGKEY1}" "${REGKEY1}-BackupBy${APP}Portable" $R0 ${registry::DeleteKey} "${REGKEY2}-BackupBy${APP}Portable" $R0 ${registry::MoveKey} "${REGKEY2}" "${REGKEY2}-BackupBy${APP}Portable" $R0;... Deletion of backup not needed in normal use, but if there was a crash not recovered, old backup prevent MoveKey.
Comment or delete constants, functions and calls not used.
Complements
Read NSIS User Manual Chapter 4: Scripting Reference to learn more about Functions, Instructions, Variables, Constants...
NSIS Constants
Many constants ($APPDATA, $SYSDIR...) are defined in NSIS and their values depends of Windows version and localization.
Run NSIS_Constants to write in an ini file the values of these constants on your computer. They are often the same with SetShellVarContext current or all.
ویرایش توسط eDvArDo : 06-09-2013 در ساعت 04:11 PM
دوستدار هميشگي شما "eDvArDo"
دلِ هر ايراني كه براي ايران نميتپد، بهتراست نتپد! (پروفسور حسابي)
آيا پاسخ سوالي را بدانم بهتر است، يا اينكه ندانسته از دنيا بروم؟! (ابوريحان بيروني)
پس از سالها جهد و تلاش در كسب علم و معرفت، دانستم كه هيچ ندانستم! (علامه حسن زاده آملي)
استادجان، فكر كنم جريان فايل اجرايي activate را متوجه شدم! احتمالاً با نرمافزار winrar و بصورت يك فايل SFX درآورديد، آره؟
دوستدار هميشگي شما "eDvArDo"
دلِ هر ايراني كه براي ايران نميتپد، بهتراست نتپد! (پروفسور حسابي)
آيا پاسخ سوالي را بدانم بهتر است، يا اينكه ندانسته از دنيا بروم؟! (ابوريحان بيروني)
پس از سالها جهد و تلاش در كسب علم و معرفت، دانستم كه هيچ ندانستم! (علامه حسن زاده آملي)
علاقه مندی ها (بوک مارک ها)