Commit Graph
37 Commits
Author SHA1 Message Date
Stephan Aßmus f76e944e24 * Fixed problems when installing onto non-empty target volumes. The
'system' folder will be a clean copy of the source volume. Other
  folders will be merged (as before), but in case a folder is in the
  way of a link or file from the source volume, it will now be purged.
* Clarified the alert for non-empty target volumes, so it is very clear
  what happens. (Maybe there ought to the be option to only copy the system
  folder, though.)
* Fixed a problem with copying attributes in certain cases.
* Fixed the main GUI not resetting state properly after encountering an
  error during the copy process.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-06-14 11:07:52 +00:00
Ingo Weinhold 84e3197428 Build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-03 12:19:24 +00:00
Stephan Aßmus 92cd10f4db * Refactored the way targets are collected before copy process begins, this
way, the optional packages (if there would be any) can be collected as well
  before the actual process starts and the progress bar will reflect them
  correctly. Before this change, the progress bar would have reset itself for
  every optional package.
* In one of my previous commits, I added the error, if there was any, to the
  reset message. Now the Installer window looks for the error and tells the
  user about it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30602 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-03 09:58:09 +00:00
Stephan Aßmus f827b0168a Cleanup round 2:
Renamed CopyEngine2 back to CopyEngine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-03 09:35:42 +00:00
Stephan Aßmus b4afa66367 First round of cleanup:
* Renamed CopyEngine to WorkerThread, since it's used for other things than
  just copying.
* Removed the code borrowed from Tracker.
* Removed the InstallerCopyLoopControl, since the CopyEngine handles
  notifications and cancelling by itself now.
* Renamed a few message constants.
* Since we only support BFS partitions as install targets, I removed the
  FS type from the target menu item label. However, I am going to solve this
  differently. I guess all partitions should be seen in the target list, just
  disabled if they are not a valid target, and with a reason given too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-03 09:32:24 +00:00
Stephan Aßmus fd8ddbc230 * Fixed GCC 4 build and warnings.
* Used std::vector in BlockingQueue instead of Ingo's Vector until I can figure out the GCC4 problems.
  This is untested, but I will test this on another machine in a minute.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-26 09:54:53 +00:00
Stephan Aßmus 7b293a3e93 * Prevent to copy the "var" and "_packages_" folders from the source volume
root folder as before switching the CopyEngine.
* Add a button "Write Boot Sector" that makes the selected target volume
  bootable without performing an installation. Adjusted the status message
  after installation to be more descriptive.
* Small improvements in the CopyEngine, collecting the source size should be
  even a bit faster now since we can use the file size from the already
  performed stat().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-25 15:35:49 +00:00
Stephan Aßmus 803d0234c1 Sorry, this is a bit of a mess yet and needs more refactoring...
* I've implemented my own copy engine which runs a separate writer thread.
  Especially when installing from one hard drive to another, it should speed
  things up. When installing from CD, the entire harddisk write time should
  at least disappear in the CD read time. When installing from/to the same
  drive, the new routine is as fast as the Tracker code that was used before.
* When stopping/canceling the copy process, the copy engine will now actually
  block, instead of happily going on while the alert is showing. I've
  still implemented that to not leave incomplete files around, like before.
* There is now a progress bar, based on data bytes in files to copy. Reason
  being that it's quite fast to collect this info versus also scanning all
  attributes.
* The copy engine itself was used in another project before and was tested
  with SHA256 hashes of the original files and the copied files, so I think
  it can be trusted.
* There is now a lot of code that can be removed or should be cleaned up.
  What was the "CopyEngine" should become the "WorkerThread" or something.
* I still had a mental TODO about skipping the swap file (there is none on
  CDs, but when copying a harddisk installation there may be one), I just
  remembered this when typing this commit message... will fix that next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-25 11:29:18 +00:00
Stephan Aßmus 3bbb00b48d * Only except BFS partitions as target volumes. Installer does not initialize
partitions by itself. When it does, this check can be removed again... for
  now DriveSetup is to be used and so there is no code duplication.
* Check if the target volume is non-empty and present an appropriate warning.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-24 16:28:38 +00:00
Stephan Aßmus 35c3b2d2a1 * Do not try to prevent read-only partitions, we will/should initialize it
with BFS anyways.
* Use the partition path, not the parent path. This also makes displaying IDs
  really superfluous.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-24 14:19:18 +00:00
Stephan Aßmus 3861c65e89 * Make the source selection not accidentally reject the boot partition because
it isn't BFS... (like perhaps ISO9660 with write-overlay ;-)
* Reject a lot more situations as valid targets. (No more devices when they
  already have child partitions, no more extended partitions themselves, also
  use a minimum size.)
* Remove the partition ID from the menu item name. I don't know why the user
  would be interested in this.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-22 20:21:39 +00:00
Ingo Weinhold 1e855c376c * Patch by Fredrik Ekdahl: gcc 4 build fixes (missing headers).
* Added missing header for mountvolume.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-12 09:57:26 +00:00
Jérôme Duval 934e233b60 * don't copy /var (bug #3584)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-25 20:42:35 +00:00
Jérôme Duval 5d6a2a65da * improved error and cancellation handling
* only enable Begin button when a menu item has been chosen


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-18 21:48:02 +00:00
Jérôme Duval 87905063c3 better handles error and cancellation when copying
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25772 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-02 22:34:48 +00:00
Jérôme Duval 739dbdfae4 * Patch from Christian Fasshauer: provides a cancel button
* fixed a few things: one couldn't restart the install process when cancelled, use B_QUIT_REQUESTED instead of QuitRequested().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25466 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-12 11:38:10 +00:00
Stephan Aßmus ed7081f728 * 'PNG ' -> B_PNG_FORMAT
* reformat long lines so that they don't exceed 80 chars


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-28 19:13:46 +00:00
Stephan Aßmus c4650bba52 * CopyEngine::Start() didn't return something at the end of the function
* CopyEngine::CopyFolder() forgot to GetName(name) before using "name" in
  strcmp()
* "delete" already checks for NULL


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-09-06 23:02:41 +00:00
Jérôme Duval 7d2cc6a102 Now handles files at the root of the source volume. Fixes bug #1227
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-21 18:41:59 +00:00
Jérôme Duval 7677e50fff trace was enabled
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 13:40:07 +00:00
Jérôme Duval 9f3d8cb64f code style update
now mount the target partition before copying


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-05-12 13:37:02 +00:00
Jérôme Duval a5fa64b505 some changes : alert if free space isn't enough, set status when mouse is over packages (doesn't work for some reason ...)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 17:45:20 +00:00
Jérôme Duval 7f40667cbc Installer scripts are not executable, we launch them with sh
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16151 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 14:05:40 +00:00
Jérôme Duval bc1301d336 * added checks for installing on source volume, or boot volume
* added alert for file error: lots of errors happening when updating a volume:
* it seems BEntry::IsDirectory() returns false whereas it should return true for some directories
this is to be checked with a test app
* boot volume is now marked automatically as the source volume (a rule is yet to be found for the target volume)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 16:16:26 +00:00
Jérôme Duval dcea76f0ab also checks for media read only as it seems CD-ROM are reported read only this way
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16056 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 10:54:25 +00:00
Jérôme Duval cbdfe27947 reworked a bit to install packages
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-23 17:36:24 +00:00
Jérôme Duval 0bd6170f79 CopyEngine is a BLooper: let it delete itself ...
copy everything in source directory instead of just 'beos'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-22 23:32:55 +00:00
Jérôme Duval 4606537811 actually uses the copyengine looper to handle the copy process
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-20 13:33:42 +00:00
Jérôme Duval 5226491c72 basic copy
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-19 18:15:01 +00:00
Jérôme Duval 5543f13539 our elf resolver has a problem with previous way of linking with FSUtils
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-08 16:25:28 +00:00
Jérôme Duval ebc8a403e5 Installer makes use of FSCopyFolder in libtracker.so
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 07:57:21 +00:00
Jérôme Duval baf595a037 we now use off_t for the sizes (sorry Ingo for bugging :) )
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-27 13:22:54 +00:00
Jérôme Duval 1eedf23081 now populates menus
improved size to string formating for GB and TB


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 19:45:38 +00:00
Jérôme Duval 6a4b16f094 now uses real partitions for menus
annoyingly app_server crashes now at every launch


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 15:42:22 +00:00
Jérôme Duval 1a8f53bbf7 added a SourceVisitor and a TargetVisitor to go through BDiskDevice and BPartition objects
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-19 13:11:11 +00:00
Jérôme Duval b461fb1d4b added a haiku logo from stippi, thanks!
enlarged the window
improves widget placement


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14419 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-18 23:10:27 +00:00
Jérôme Duval 633dee064e fix packages view, added a copy engine class
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-09-30 14:58:05 +00:00