PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Directory - Diretorios in Mobile SDCARD
Directory - Diretorios in Mobile SDCARD
Débuté par adrianoboller, 18 nov. 2014 13:54 - 1 réponse
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 18 novembre 2014 - 13:54
Procedure DB_Diretorios()

ok is boolean = False

//Verifica
IF InSimulatorMode() = False THEN

gsDirTempPhotos = gsAppDir + ["/"] + "VideosFotos/"
gsArquivosTXT = gsAppDir + ["/"] + "Arquivos/"
gsAutorunPath = gsAppDir + ["/"] + "Arquivos/autorun.ini"

gsAppDir = "/mnt/sdcard/TaxiFv/"
IF fDirectoryExist(gsAppDir) = False THEN
ok = fMakeDir(gsAppDir)
END


IF INIRead("Camera","DiretorioRaiz","",gsAutorunPath) <> ""
gsAppDir = INIRead("Camera","DiretorioRaiz","",gsAutorunPath)
END

IF fDirectoryExist(gsAppDir) = False THEN
ok = fMakeDir(gsAppDir)
END

IF fDirectoryExist(gsAppDir) = False AND INIRead("Camera","DiretorioRaiz","",gsAutorunPath) = ""
gsAppDir = "/mnt/sdcard/TaxiFv/"
fMakeDir(gsAppDir)
END

IF gsAppDir = ""
gsAppDir = "/sdcard/TaxiFv/"
fMakeDir(gsAppDir)
END

IF fDirectoryExist(gsDirTempPhotos) = False THEN
ok = fMakeDir(gsDirTempPhotos)
IF ok = False THEN
gsDirTempPhotos = gsAppDir + ["/"] + "VideosFotos/"
fMakeDir(gsDirTempPhotos)
END
END

IF fDirectoryExist(gsAppDir + ["/"] + "Arquivos/") = False THEN
ok = fMakeDir(gsAppDir + ["/"] + "Arquivos/")
END

IF fDirectoryExist(gsAppDir + ["/"] + "Agenda/") = False THEN
ok = fMakeDir(gsAppDir + ["/"] + "Agenda/")
END

IF fDirectoryExist(gsAppDir + ["/"] + "Install/") = False THEN
ok = fMakeDir(gsAppDir + ["/"] + "Install/")
END

IF NOT fDirectoryExist(gsAppDir) THEN
fMakeDir(gsAppDir)
END

DirDb is string = gsAppDir + ["/"] + "DB/"
IF NOT fDirectoryExist(DirDb) THEN
fMakeDir(DirDb)
END

Arquivos is string = gsAppDir + ["/"] + "Arquivos/"
IF NOT fDirectoryExist(Arquivos) THEN
fMakeDir(Arquivos)
END

Notas is string = gsAppDir + ["/"] + "Notas/"
IF NOT fDirectoryExist(Notas) THEN
fMakeDir(Notas)
END

VideosFotos is string = gsAppDir + ["/"] + "VideosFotos/"
IF NOT fDirectoryExist(VideosFotos) THEN
fMakeDir(VideosFotos)
END

backup is string = gsAppDir + ["/"] + "Backup/"
IF NOT fDirectoryExist(backup) THEN
fMakeDir(backup)
END

Temprestore is string = gsAppDir + ["/"] + "Restore/"
IF NOT fDirectoryExist(Temprestore) THEN
fMakeDir(Temprestore)
END


ELSE

gsAppDir = "c:\Temp"
gsDirTempPhotos = "c:\Temp\VideosFotos"
gsArquivosTXT = "c:\Temp\Arquivos"
gsAutorunPath = "c:\Temp\Arquivos\autorun.ini"

Dirarq is string = "c:\Temp\Arquivos"
IF NOT fDirectoryExist(Dirarq) THEN
fMakeDir(Dirarq)
END

DirDbs is string = "c:\Temp\DB\"
IF NOT fDirectoryExist(DirDbs) THEN
fMakeDir(DirDbs)
END

Dirvf is string = "c:\Temp\VideosFotos"
IF NOT fDirectoryExist(Dirvf) THEN
fMakeDir(Dirvf)
END

Dirnotas is string = "c:\Temp\Notas"
IF NOT fDirectoryExist(Dirnotas) THEN
fMakeDir(Dirnotas)
END

Dirbkp is string = "c:\Temp\Backup"
IF NOT fDirectoryExist(Dirbkp) THEN
fMakeDir(Dirbkp)
END

Dirres is string = "c:\Temp\Restore"
IF NOT fDirectoryExist(Dirres) THEN
fMakeDir(Dirres)
END

END
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 14 novembre 2016 - 12:25
Dear,

If you do not attach the .fic files in the project root to Others, the base is created empty.

This applies not only to database, but also to images and .jar files or third-party SDK libraries as bluetooth printers.

If you do not call there in "others" that is a little above Analysis and below procedures, it will remain as empty null tables.

I hope you understood my explanation.

Click on other, search the .fic and ok

If you want to put .fic files in another location on the sdcard, it is also possible with this link:

http://forum.pcsoft.fr/fr-FR/pcsoft.us.windevmobile/596-directory-diretorios-mobile-sdcard/read.awp

Connection = http://help.windev.com/en-US/…

HCreationIfNotFound = http://help.windev.com/en-US/…

Simple like that, strong hug.

==

Prezados,

Se voce nao anexar em Others os arquivos .fic na raiz do projeto, a base é criada vazia.

Isso vale não só para base de dados, mas tambem para imagens e arquivos .jar ou blibliotecas SDK de terceiros como impressoras bluetooth.

Se não ligar ali em "others" que fica um pouco acima da Analysis e abaixo de procedures, vai ficar como tabelas nulas, vazias.

Espero que tenha entendido a minha explicação.

Clica em other, busca os .fic e ok

Caso queira colocar os arquivos .fic em outro local do sdcard tambem é possivel com esse link:

http://forum.pcsoft.fr/fr-FR/pcsoft.us.windevmobile/596-directory-diretorios-mobile-sdcard/read.awp

Connection = http://help.windev.com/en-US/…

HCreationIfNotFound = http://help.windev.com/en-US/…

Simples assim, forte abraço.

:merci:

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modifié, 14 novembre 2016 - 12:26