Though Touch Portal has its own backup mechanism and you can use that to share settings it does take a few clicks and a bit of attention. When you quickly want to share stuff that's not what you want.
I created a few batch files and two buttons to speed things up. Here's my approach.
0. Remember that this is my setup!
You'll have to adjust the paths and modify the batch files to match your setup!
1. In Touch Portal I created two buttons:
2. This button copies the Touch Portal settings and my batch files to a Google Drive folder.
3. When selected I launch a batch file tp_tptogdrive.bat.
- rem *** copy touchportal data TO googledrive ***
- rem exit touch portal manually, then press any key
- pause
- rem *** copy touchportal files TO googledrive ***
- rmdir c:\googledrive\touchportal\appdata /s
- mkdir c:\googledrive\touchportal\appdata
- xcopy %appdata%\TouchPortal\ c:\googledrive\touchportal\appdata\ /s
- rem *** copy any other files TO googledrive ***
- rem I make a copy of my batch files as well as my wallx.cfg file
- rmdir c:\googledrive\touchportal\batchfiles /s
- mdkir c:\googledrive\touchportal\batchfiles
- xcopy c:\software\batch c:\googledrive\touchportal\batchfiles\ /s
- rmdir c:\googledrive\touchportal\wallx /s
- mkdir c:\googledrive\touchportal\wallx
- copy c:\software\utils\wallx.cfg c:\googledrive\touchportal\wallx
- rem *** wait for google drive to finish syncing ***
- rem check if googledrive is done syncing, then press any key
- pause
- rem *** clean up ***
- c:
- cd c:\googledrive\touchportal\appdata
- rmdir "pages (1)"
- rmdir "pages (2)"
- rmdir "pages (3)"
- rmdir "pages (4)"
- rmdir "icons (1)"
- rmdir "icons (2)"
- rmdir "icons (3)"
- rmdir "icons (4)"
- cd ..
- start "" /B "C:\Program Files (x86)\Touch Portal\TouchPortal.exe"
- exit
This batch file creates a few folders, and copies the Touch Portal settings, as well as all my batch files to Google Drive. You can use it to sync some other stuff.
I didn't share the files through Google Drive directly, but instead use a copy. This allows me a bit more flexibility when configuring, and gives me an additional backup in case of accidental edit mistakes. Also, having TWO copies of Touch Portal (one on each PC) accessing the same config files may confuse Touch Portal.
4. This button copies the Touch Portal settings from the Google Drive folder to the local settings folder.
5. Here's the associated batch file:
- rem *** copy touchportal data FROM googledrive ***
- rem exit touch portal manually, then press any key
- pause
- c:
- cd c:\googledrive\touchportal\appdata
- rmdir "pages (1)"
- rmdir "pages (2)"
- rmdir "pages (3)"
- rmdir "pages (4)"
- rmdir "icons (1)"
- rmdir "icons (2)"
- rmdir "icons (3)"
- rmdir "icons (4)"
- cd ..
- rmdir %appdata%\TouchPortal /s
- mkdir %appdata%\TouchPortal
- xcopy c:\googledrive\touchportal\appdata %appdata%\TouchPortal\ /s
- rem *** batch files and wallx config are NOT automatically overwritten ***
- rem if you need any (newer) batchfiles etc. check this by hand
- rem each machine may have customized batch files, don't want to mess them up
- rem press any key to continue
- pause
- start "" /B "C:\Program Files (x86)\Touch Portal\TouchPortal.exe"
- exit
This batch file does NOT copy the folder with batch files. I may have modified the batch files to accomodate differences between both PCs (for example, the Google Chrome profiles on both machines are different).
Again, you'll have to adjust the batch file to match your setup!
5. My icons folder resides on the Google Drive.
That way, I have all the icons / images available when changing things. I know Touch Portal keeps a copy of the images, but when you change the pages you might have to modify or change something.
I use WallX to create .JPG files for Touch Portal as it can't handle .ICO files directly.
More
No comments:
Post a Comment