Source

vinstall-gambas / src / FDone.class

Full commit
' Gambas class file

'    This file is part of vinstall-ng

'    vinstall-ng is free software: you can redistribute it and/or modify
'    it under the terms of the GNU General Public License as published by
'    the Free Software Foundation, either version 2 of the License, or
'    (at your option) any later version.

'    vinstall-ng  is distributed in the hope that it will be useful,
'    but WITHOUT ANY WARRANTY; without even the implied warranty of
'    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'    GNU General Public License for more details.

'    You should have received a copy of the GNU General Public License
'    along with vinstall-ng.  If not, see <http://www.gnu.org/licenses/>.

PUBLIC SUB Form_Open()
DIM sTxt, txin AS String

MdlMain.ADVANCE_STATUS_TREE("Step10", "Step11")
ClsGlobal.fRunningMainForm.listview1.refresh()
ClsGlobal.fRunningMainForm.btnext.text = ("Reboot")
ME.TextLabel1.Text = ("Saving default configuration and the system for initial boot. This process can take a while. Please wait.")
MdlMain.Set_App_Status(("Just a bit more... Please wait"), 60)

ME.tlbanner.Text = "<h2>" & tlbanner.Text & "</h2>"
    IF Exist(main.Install.TargetMount &/ "tmp" &/ "status")
      txin = File.Load(main.Install.TargetMount &/ "tmp" &/ "status")
      IF Trim(txin) <> "Done" THEN 
      ME.TextLabel1.Text = ("Saving default configuration and the system for initial boot. This process can take a while. Please wait.")
      ME.Refresh()
      ClsGlobal.fRunningMainForm.listview1.refresh()
      WAIT 0.25
    ClsGlobal.fRunningMainForm.btback.enabled = FALSE
    ClsGlobal.fRunningMainForm.btquit.enabled = FALSE
    ClsGlobal.fRunningMainForm.btnext.enabled = FALSE
        REPEAT 
        ME.TextLabel1.Text = ("Saving default configuration and the system for initial boot. This process can take a while. Please wait.")
          WAIT 2
          MdlMain.Set_App_Status(("Working"))
          txin = File.Load(main.Install.TargetMount &/ "tmp" &/ "status")
        UNTIL Trim(txin) = "Done"
      END IF
    ELSE 
      REPEAT 
        WAIT 
        MdlMain.ADVANCE_STATUS_TREE("Step10", "Step11")
      UNTIL Exist(main.Install.TargetMount &/ "tmp" &/ "status")
    END IF
    MdlMain.Set_App_Status(("Ready to restart the system"))
    SHELL "rm -f " & main.Install.TargetMount &/ "tmp" &/ "vlconfig2-*" WAIT ' Just in case, so we dont leave any leftovers.
    
    DEBUG "Background configuration complete ... Ready to reboot the system"

  WITH ME
    
    .TextLabel1.Text = Main.Install.Name & Space(1) & ("has been installed in your system.") & "<br><br>" &
    "<br>" & ("After your computer restarts, you may use VasmCC to perform any additional configuration.") & "<br>" & "<br>" &
    ("Click") & Space(1) & "\"" & ClsGlobal.fRunningMainForm.btnext.Text & "\"" & Space(1) & ("to restart your computer now.")    
    .TextLabel1.Visible = TRUE
  END WITH 
      ClsGlobal.fRunningMainForm.btback.enabled = FALSE
    ClsGlobal.fRunningMainForm.btquit.enabled = TRUE
    ClsGlobal.fRunningMainForm.btnext.enabled = TRUE
MdlMain.ADVANCE_STATUS_TREE("Step10", "Step11")

    ' quick fix to make sure root user gets an icon on the login manager
      IF Exist(main.Install.TargetMount &/ "root" &/ ".face.icon") = FALSE THEN 
        IF Exist(main.Install.TargetMount &/ "root" &/ ".face") = FALSE THEN 
          SHELL "cp /mnt/target/usr/share/apps/kdm/pics/users/root1.png /mnt/target/root/.face.icon" WAIT 
        END IF
      END IF
    

END
PUBLIC SUB GetNext()
  
  
  
END
PUBLIC SUB OnExit()
  
  
  
END
PUBLIC SUB StartUp()
  
  MdlMain.ADVANCE_STATUS_TREE("Step10", "Step11")
  
END