Hello,
I have a large project created on a pc running Linux Mint 20. Gambas 3.17 is running on that PC. I copied the whole project directory to a CD using Brassero. I copied this directory to a VirtualBox VM. I'm running Linux Mint 20.3 and Gambas 3.17.2 on the VM. When I check the copied directory there are over 400 files listed. When I open the directory only 3 are visible. When I try to load the project from the open project window; I click on the project. The project is not highlighted and will not load. Nothing is seen in the project files window. I know that Gambas works because I have made executables of other projects.
How can I transfer this project over to the VM. It should be possible. All answers are appreciated.
Thanks!
Marty
Move project to new pc
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Move project to new pc
Welcome to the forum.
It sounds like you have not copied the 'hidden' files. I suggest you make a Source Archive:-
Copy this file to your VM folder, then in Gambas File > Open project...
Right-click on the archive and select Uncompress file
Gambas will then jump straight to the new folder.
![Image](https://www.cogier.com/gambas/Copy2.png)
It sounds like you have not copied the 'hidden' files. I suggest you make a Source Archive:-
![Image](https://www.cogier.com/gambas/Copy1.png)
Copy this file to your VM folder, then in Gambas File > Open project...
Right-click on the archive and select Uncompress file
Gambas will then jump straight to the new folder.
![Image](https://www.cogier.com/gambas/Copy2.png)
Re: Move project to new pc
Cogier,
Thank you for the response. Your suggestion appears to be correct. Made a source archive and loaded it. First I did not see any thing other then the Gambas background. Did a compile All and now I can see the files.
however I now see files named like this:
modMain.module(1)
modMain.Module(2)
ModMain.module(3)
modMain.module~(1)
modMain.Module~(2)
modMain.Module~(3)
modMain is a valid module name but, I think there was only one in the original project. What are they and should I do do anything with them?
Thanks,
Marty
Thank you for the response. Your suggestion appears to be correct. Made a source archive and loaded it. First I did not see any thing other then the Gambas background. Did a compile All and now I can see the files.
however I now see files named like this:
modMain.module(1)
modMain.Module(2)
ModMain.module(3)
modMain.module~(1)
modMain.Module~(2)
modMain.Module~(3)
modMain is a valid module name but, I think there was only one in the original project. What are they and should I do do anything with them?
Thanks,
Marty
- cogier
- Site Admin
- Posts: 1127
- Joined: Wednesday 21st September 2016 2:22pm
- Location: Guernsey, Channel Islands
Re: Move project to new pc
The files : -
modMain.module~(1)
modMain.Module~(2)
modMain.Module~(3)
The easy way is from Gambas use Project > Cleanup as I think these are just backup files, if they are this method will remove them.
Without seeing the whole program, I am unable to advise on the others.
modMain.module~(1)
modMain.Module~(2)
modMain.Module~(3)
The easy way is from Gambas use Project > Cleanup as I think these are just backup files, if they are this method will remove them.
Without seeing the whole program, I am unable to advise on the others.
Re: Move project to new pc
Cogier,
Tried to clean backup but the extra files were not removed. Each appears to be text file containing a class definition associated with a form. I added a short example below. For some reason I can not attach a text file so I had to cut and paste. This will give you an idea of what is contained in the files. All of the files under a form appear to be the same.
Gambas class file
Private Const Advanced_Height As Integer = 539
Private Const Basic_Height As Integer = 220
Private Const Form_Width As Integer = 651
Private Const Advanced_Cmd As String = "Add Director"
Private Const Basic_Cmd As String = "Current Directors"
Private flgAdvanced As Boolean = False
Public Sub Form_Open()
DataView1.View.Columns.Width = -1
Directors.Connection = modMain.$Con
Directors.Table = "tbldirectors"
Directors.Sort = "Director"
Directors.MoveFirst
Me.Caption = "Officers"
Me.Height = Basic_Height
Me.DataCombo1.Table = "tbllocation"
Me.DataCombo1.Display = "Location"
Me.DataCombo1.Field = "Locator"
Me.DataCombo2.Table = "tblofficers"
Me.DataCombo2.Display = "Position"
Me.DataCombo2.Field = "Office"
Me.Height = Basic_Height
lblAdvanced.Text = Advanced_Cmd
lblAdvanced.Foreground = modMain.Red
lblAdvanced.Visible = False
btnAdd.Visible = False
btnDelete.Visible = False
btnSave.Visible = False
btnCancel.Visible = False
modMain.Lock_Controls(frmDirectors)
End
Public Sub btnClose_Click()
Dim intResult As Integer
intResult = Message.Question("Closing", "OK", "Cancel")
If intResult = 1 Then
If modMain.flgAdd Or modMain.flgDirty Then
btnSave_Click()
Endif
Endif
Me.Close
End
Public Sub btnCancel_Click()
Dim intResult As Integer
intResult = Message.Question("Cancel", "OK", "No")
If intResult = 1 Then
If modMain.flgEdit Then
'modData.Read_Buffer(frmDirectors)
Directors.Cancel
Endif
modMain.flgEdit = False
modMain.flgAdd = False
modMain.flgDirty = False
btnAdd.Visible = False
btnDelete.Visible = False
btnSave.Visible = False
btnCancel.Visible = False
Hope this helps.
Marty
Tried to clean backup but the extra files were not removed. Each appears to be text file containing a class definition associated with a form. I added a short example below. For some reason I can not attach a text file so I had to cut and paste. This will give you an idea of what is contained in the files. All of the files under a form appear to be the same.
Gambas class file
Private Const Advanced_Height As Integer = 539
Private Const Basic_Height As Integer = 220
Private Const Form_Width As Integer = 651
Private Const Advanced_Cmd As String = "Add Director"
Private Const Basic_Cmd As String = "Current Directors"
Private flgAdvanced As Boolean = False
Public Sub Form_Open()
DataView1.View.Columns.Width = -1
Directors.Connection = modMain.$Con
Directors.Table = "tbldirectors"
Directors.Sort = "Director"
Directors.MoveFirst
Me.Caption = "Officers"
Me.Height = Basic_Height
Me.DataCombo1.Table = "tbllocation"
Me.DataCombo1.Display = "Location"
Me.DataCombo1.Field = "Locator"
Me.DataCombo2.Table = "tblofficers"
Me.DataCombo2.Display = "Position"
Me.DataCombo2.Field = "Office"
Me.Height = Basic_Height
lblAdvanced.Text = Advanced_Cmd
lblAdvanced.Foreground = modMain.Red
lblAdvanced.Visible = False
btnAdd.Visible = False
btnDelete.Visible = False
btnSave.Visible = False
btnCancel.Visible = False
modMain.Lock_Controls(frmDirectors)
End
Public Sub btnClose_Click()
Dim intResult As Integer
intResult = Message.Question("Closing", "OK", "Cancel")
If intResult = 1 Then
If modMain.flgAdd Or modMain.flgDirty Then
btnSave_Click()
Endif
Endif
Me.Close
End
Public Sub btnCancel_Click()
Dim intResult As Integer
intResult = Message.Question("Cancel", "OK", "No")
If intResult = 1 Then
If modMain.flgEdit Then
'modData.Read_Buffer(frmDirectors)
Directors.Cancel
Endif
modMain.flgEdit = False
modMain.flgAdd = False
modMain.flgDirty = False
btnAdd.Visible = False
btnDelete.Visible = False
btnSave.Visible = False
btnCancel.Visible = False
Hope this helps.
Marty
- BruceSteers
- Posts: 1578
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Move project to new pc
cd /project/folder
rm -f ".src/*~*"
rm -f ".src/*(*"
or press Ctrl-h to show all files in your file browser and find the files to deletethe files with ~ are backup files, just copies of the original ones.
the files with (1) etc are because you have repeatedly copied files when they already existed..
the above commands from the source dir should clear your backup/copies
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- BruceSteers
- Posts: 1578
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Move project to new pc
You probably need to know this.....
By default when dragging files/folders most file managers like caja, dolphin, nautilus will not copy hidden or backup files unless you have selected to show the files first.
Any file/folder that begins with a dot like .src .gambas etc are "hidden"
Any file that ends with a tilde~ is a backup file.
Brassero may have a "Show hidden files" option or if you drag-dropped from desktop then show hidden files first (or make an archive).
Most file managers use Ctrl-h to show/hide hidden files.
Caja (MATE desktop file manager) uses Ctrl-h to show hidden files and Ctrl-k to show backup files but also those options are in the "View" menu.
PS.
If you right click a project folder and select "Compress" to make an archive most archivers WILL include hidden files regardless of the view.
THE most important files of your project are the .project file and the .src directory (both are hidden)
By default when dragging files/folders most file managers like caja, dolphin, nautilus will not copy hidden or backup files unless you have selected to show the files first.
Any file/folder that begins with a dot like .src .gambas etc are "hidden"
Any file that ends with a tilde~ is a backup file.
Brassero may have a "Show hidden files" option or if you drag-dropped from desktop then show hidden files first (or make an archive).
Most file managers use Ctrl-h to show/hide hidden files.
Caja (MATE desktop file manager) uses Ctrl-h to show hidden files and Ctrl-k to show backup files but also those options are in the "View" menu.
PS.
If you right click a project folder and select "Compress" to make an archive most archivers WILL include hidden files regardless of the view.
THE most important files of your project are the .project file and the .src directory (both are hidden)
If at first you don't succeed , try doing something differently.
BruceS
BruceS
Re: Move project to new pc
Thank you all for your input! I have almost got the project back on track. I do have one other problem that shows up when I run the project. There is a library that the project cannot find. When I run the project it tells me that it cannot find the library. I checked the libraries and there is a library that the project cannot find. Maybe from a previous iteration. Tried to remove it using the project properties - library - remove but, it will not remove it. Is there there way I can remove this library or work around it? If I can get rid of it I can move on to debuging the project.
Regards,
Marty
Regards,
Marty
- BruceSteers
- Posts: 1578
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Move project to new pc
If you copied folder to a cd then copied to disk you may need to set write properties as cd files are read only so all files in project folder may also now be read only.
chmod -R +w /project/dir/*
Can't think of any other reason you can't remove a library?
chmod -R +w /project/dir/*
Can't think of any other reason you can't remove a library?
If at first you don't succeed , try doing something differently.
BruceS
BruceS
- BruceSteers
- Posts: 1578
- Joined: Thursday 23rd July 2020 5:20pm
- Location: Isle of Wight
- Contact:
Re: Move project to new pc
ps , the easiest way for us to help debug a program for you is if you posted it here then we could take a look for you ![Smile :)](./images/smilies/icon_e_smile.gif)
![Smile :)](./images/smilies/icon_e_smile.gif)
If at first you don't succeed , try doing something differently.
BruceS
BruceS